mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 20:10:17 +00:00
some fix
This commit is contained in:
parent
db725f8b5f
commit
0c9e49a30d
@ -172,6 +172,7 @@ obj_get_t<T> PyVar::obj_get(){
|
||||
if constexpr(is_sso_v<T>){
|
||||
return as<T>();
|
||||
}else{
|
||||
PK_DEBUG_ASSERT(!is_sso)
|
||||
return ((Py_<T>*)(_1))->_value;
|
||||
}
|
||||
}
|
||||
|
@ -999,14 +999,14 @@ PyVar VM::vectorcall(int ARGC, int KWARGC, bool op_call){
|
||||
PyVar* p0 = p1 - ARGC - 2;
|
||||
// [callable, <self>, args..., kwargs...]
|
||||
// ^p0 ^p1 ^_sp
|
||||
PyVar callable = p1[-(ARGC + 2)];
|
||||
PyVar callable = p1[-ARGC-2];
|
||||
Type callable_t = _tp(callable);
|
||||
|
||||
int method_call = p0[1] != PY_NULL;
|
||||
|
||||
// handle boundmethod, do a patch
|
||||
if(callable_t == tp_bound_method){
|
||||
if(method_call) PK_FATAL_ERROR();
|
||||
PK_DEBUG_ASSERT(!method_call)
|
||||
BoundMethod& bm = PK_OBJ_GET(BoundMethod, callable);
|
||||
callable = bm.func; // get unbound method
|
||||
callable_t = _tp(callable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user