diff --git a/docs/retype.yml b/docs/retype.yml index df4b8e82..e5063e0a 100644 --- a/docs/retype.yml +++ b/docs/retype.yml @@ -3,7 +3,7 @@ output: .retype url: https://pocketpy.dev branding: title: pocketpy - label: v2.0.7 + label: v2.0.8 logo: "./static/logo.png" favicon: "./static/logo.png" meta: diff --git a/include/pocketpy/config.h b/include/pocketpy/config.h index 18615f6a..421f3068 100644 --- a/include/pocketpy/config.h +++ b/include/pocketpy/config.h @@ -1,10 +1,10 @@ #pragma once // clang-format off -#define PK_VERSION "2.0.7" +#define PK_VERSION "2.0.8" #define PK_VERSION_MAJOR 2 #define PK_VERSION_MINOR 0 -#define PK_VERSION_PATCH 7 +#define PK_VERSION_PATCH 8 /*************** feature settings ***************/ diff --git a/plugins/flutter/pocketpy/lib/pocketpy_bindings_generated.dart b/plugins/flutter/pocketpy/lib/pocketpy_bindings_generated.dart index 3339db80..d7d58f28 100644 --- a/plugins/flutter/pocketpy/lib/pocketpy_bindings_generated.dart +++ b/plugins/flutter/pocketpy/lib/pocketpy_bindings_generated.dart @@ -166,6 +166,42 @@ class PocketpyBindings { ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); + /// Python equivalent to `globals()` with respect to the given frame. + void py_Frame_newglobals( + ffi.Pointer frame, + py_OutRef out, + ) { + return _py_Frame_newglobals( + frame, + out, + ); + } + + late final _py_Frame_newglobalsPtr = _lookup< + ffi + .NativeFunction, py_OutRef)>>( + 'py_Frame_newglobals'); + late final _py_Frame_newglobals = _py_Frame_newglobalsPtr + .asFunction, py_OutRef)>(); + + /// Python equivalent to `locals()` with respect to the given frame. + void py_Frame_newlocals( + ffi.Pointer frame, + py_OutRef out, + ) { + return _py_Frame_newlocals( + frame, + out, + ); + } + + late final _py_Frame_newlocalsPtr = _lookup< + ffi + .NativeFunction, py_OutRef)>>( + 'py_Frame_newlocals'); + late final _py_Frame_newlocals = _py_Frame_newlocalsPtr + .asFunction, py_OutRef)>(); + /// Get the function object of the frame. /// Returns `NULL` if not available. py_StackRef py_Frame_function( @@ -2225,7 +2261,7 @@ class PocketpyBindings { /// Call a function. /// It prepares the stack and then performs a `vectorcall(argc, 0, false)`. /// The result will be set to `py_retval()`. - /// The stack remains unchanged after the operation. + /// The stack remains unchanged if successful. bool py_call( py_Ref f, int argc, @@ -2306,16 +2342,19 @@ class PocketpyBindings { /// Python equivalent to `json.dumps(val)`. bool py_json_dumps( py_Ref val, + int indent, ) { return _py_json_dumps( val, + indent, ); } late final _py_json_dumpsPtr = - _lookup>('py_json_dumps'); + _lookup>( + 'py_json_dumps'); late final _py_json_dumps = - _py_json_dumpsPtr.asFunction(); + _py_json_dumpsPtr.asFunction(); /// Python equivalent to `json.loads(val)`. bool py_json_loads( @@ -3106,15 +3145,15 @@ abstract class py_CompileMode { typedef py_TraceFunc = ffi.Pointer< ffi.NativeFunction, ffi.Int32)>>; +/// An output reference for returning a value. +typedef py_OutRef = ffi.Pointer; + /// A specific location in the value stack of the VM. typedef py_StackRef = ffi.Pointer; /// A generic reference to a python object. typedef py_Ref = ffi.Pointer; -/// An output reference for returning a value. -typedef py_OutRef = ffi.Pointer; - /// A global reference which has the same lifespan as the VM. typedef py_GlobalRef = ffi.Pointer; @@ -3329,13 +3368,13 @@ abstract class py_PredefinedType { static const int tp_chunked_array2d = 62; } -const String PK_VERSION = '2.0.7'; +const String PK_VERSION = '2.0.8'; const int PK_VERSION_MAJOR = 2; const int PK_VERSION_MINOR = 0; -const int PK_VERSION_PATCH = 7; +const int PK_VERSION_PATCH = 8; const int PK_LOW_MEMORY_MODE = 0; diff --git a/plugins/flutter/pocketpy/pubspec.yaml b/plugins/flutter/pocketpy/pubspec.yaml index 67645ec4..525aa36d 100644 --- a/plugins/flutter/pocketpy/pubspec.yaml +++ b/plugins/flutter/pocketpy/pubspec.yaml @@ -1,6 +1,6 @@ name: pocketpy description: A lightweight Python interpreter for game engines. It supports Android/iOS/Windows/Linux/MacOS. -version: 2.0.7 +version: 2.0.8 homepage: https://pocketpy.dev repository: https://github.com/pocketpy/pocketpy