Compare commits

..

1 Commits

5 changed files with 5 additions and 7 deletions

View File

@ -36,7 +36,6 @@ Please see https://pocketpy.dev for details and try the following resources.
+ [Godot Extension](https://github.com/pocketpy/godot-pocketpy): Use pocketpy in Godot Engine
+ [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy): Debug and profile pocketpy scripts in VSCode
+ [Flutter Plugin](https://pub.dev/packages/pocketpy): Use pocketpy in Flutter apps
+ [Raylib Bindings](https://github.com/pocketpy/raylib-bindings): Use raylib with pocketpy
## Supported Platforms
@ -112,7 +111,7 @@ int main() {
if(!ok) goto __ERROR;
// Create a list: [1, 2, 3]
py_Ref r0 = py_tmpr0();
py_Ref r0 = py_getreg(0);
py_newlistn(r0, 3);
py_newint(py_list_getitem(r0, 0), 1);
py_newint(py_list_getitem(r0, 1), 2);

View File

@ -15,7 +15,6 @@ Developers are able to write Python bindings via C-API or pybind11 compatible in
+ [Godot Extension](https://github.com/pocketpy/godot-pocketpy): Use pocketpy in Godot Engine
+ [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy): Debug and profile pocketpy scripts in VSCode
+ [Flutter Plugin](https://pub.dev/packages/pocketpy): Use pocketpy in Flutter apps
+ [Raylib Bindings](https://github.com/pocketpy/raylib-bindings): Use raylib with pocketpy
## What it looks like

View File

@ -85,7 +85,7 @@ int main() {
if(!ok) goto __ERROR;
// Create a list: [1, 2, 3]
py_Ref r0 = py_tmpr0();
py_Ref r0 = py_getreg(0);
py_newlistn(r0, 3);
py_newint(py_list_getitem(r0, 0), 1);
py_newint(py_list_getitem(r0, 1), 2);

View File

@ -19,14 +19,14 @@ class Library:
self.functions = [] # type: list[Function]
self.callbacks = set() # type: set[str]
def unalias(self, name: str) -> c_ast.Node | str:
def unalias(self, name: str) -> c_ast.Node:
while name in self.aliases:
node = self.aliases[name]
if isinstance(node, str):
name = node
else:
return node
return name
assert False, f'alias {name} not found'
def build(self, *, glue_dir='.', stub_dir='.', includes: list[str] | None = None):
self.remove_unsupported()

View File

@ -20,7 +20,7 @@ int main() {
if(!ok) goto __ERROR;
// Create a list: [1, 2, 3]
py_Ref r0 = py_tmpr0();
py_Ref r0 = py_getreg(0);
py_newlistn(r0, 3);
py_newint(py_list_getitem(r0, 0), 1);
py_newint(py_list_getitem(r0, 1), 2);