mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update pkpy.c
This commit is contained in:
parent
169e825197
commit
bc51c5e19d
@ -469,6 +469,9 @@ static void pkpy_configmacros_add(py_Ref dict, const char* key, int val) {
|
|||||||
|
|
||||||
static bool pkpy_profiler_begin(int argc, py_Ref argv) {
|
static bool pkpy_profiler_begin(int argc, py_Ref argv) {
|
||||||
PY_CHECK_ARGC(0);
|
PY_CHECK_ARGC(0);
|
||||||
|
if(pk_current_vm->trace_info.func != py_LineProfiler_tracefunc) {
|
||||||
|
return RuntimeError("py_LineProfiler_tracefunc() should be set as the trace function");
|
||||||
|
}
|
||||||
LineProfiler__begin(&pk_current_vm->line_profiler);
|
LineProfiler__begin(&pk_current_vm->line_profiler);
|
||||||
py_newnone(py_retval());
|
py_newnone(py_retval());
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user