mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Compare commits
3 Commits
01f04b2e41
...
7d85da5ad3
Author | SHA1 | Date | |
---|---|---|---|
|
7d85da5ad3 | ||
|
bc64efe57a | ||
|
f1d4ef5e1c |
@ -67,7 +67,7 @@ typedef struct VM {
|
|||||||
NameDict compile_time_funcs;
|
NameDict compile_time_funcs;
|
||||||
|
|
||||||
py_StackRef curr_class;
|
py_StackRef curr_class;
|
||||||
py_StackRef curr_decl_based_function;
|
py_StackRef curr_decl_based_function; // this is for get current function without frame
|
||||||
TraceInfo trace_info;
|
TraceInfo trace_info;
|
||||||
WatchdogInfo watchdog_info;
|
WatchdogInfo watchdog_info;
|
||||||
LineProfiler line_profiler;
|
LineProfiler line_profiler;
|
||||||
|
@ -300,7 +300,7 @@ PK_API void* py_newobject(py_OutRef out, py_Type type, int slots, int udsize);
|
|||||||
|
|
||||||
/// Convert an `int` object in python to `int64_t`.
|
/// Convert an `int` object in python to `int64_t`.
|
||||||
PK_API py_i64 py_toint(py_Ref);
|
PK_API py_i64 py_toint(py_Ref);
|
||||||
/// Convert a trivial value object in python to `int64_t`.
|
/// Get the address of the trivial value object.
|
||||||
PK_API void* py_totrivial(py_Ref);
|
PK_API void* py_totrivial(py_Ref);
|
||||||
/// Convert a `float` object in python to `double`.
|
/// Convert a `float` object in python to `double`.
|
||||||
PK_API py_f64 py_tofloat(py_Ref);
|
PK_API py_f64 py_tofloat(py_Ref);
|
||||||
|
@ -232,6 +232,7 @@ bool pk_loadmethod(py_StackRef self, py_Name name) {
|
|||||||
if(ti->getunboundmethod) {
|
if(ti->getunboundmethod) {
|
||||||
bool ok = ti->getunboundmethod(self, name);
|
bool ok = ti->getunboundmethod(self, name);
|
||||||
if(ok) {
|
if(ok) {
|
||||||
|
assert(py_retval()->type == tp_nativefunc || py_retval()->type == tp_function);
|
||||||
self[0] = *py_retval();
|
self[0] = *py_retval();
|
||||||
self[1] = self_bak;
|
self[1] = self_bak;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user