mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some fix
This commit is contained in:
parent
a6b3163635
commit
68e8536c89
@ -78,16 +78,6 @@ void py_newnotimplemented(py_Ref out);
|
||||
/// @param slots number of slots. Use -1 to create a `__dict__`.
|
||||
/// @param udsize size of your userdata. You can use `py_touserdata()` to get the pointer to it.
|
||||
void py_newobject(py_Ref out, py_Type type, int slots, int udsize);
|
||||
/************* Stack Values Creation *************/
|
||||
void py_pushint(int64_t);
|
||||
void py_pushfloat(double);
|
||||
void py_pushbool(bool);
|
||||
void py_pushstr(const char*);
|
||||
void py_pushstrn(const char*, int);
|
||||
|
||||
void py_pushnone();
|
||||
void py_pushnull();
|
||||
|
||||
/************* Type Cast *************/
|
||||
int64_t py_toint(const py_Ref);
|
||||
double py_tofloat(const py_Ref);
|
||||
@ -177,12 +167,10 @@ bool py_repr(const py_Ref, py_Ref out);
|
||||
/// It consumes `argc + kwargc` arguments from the stack.
|
||||
/// The result will be set to `vm->last_retval`.
|
||||
int pk_vectorcall(int argc, int kwargc, bool op_call);
|
||||
|
||||
/// Call a function.
|
||||
/// It prepares the stack and then performs a `vectorcall(argc, 0, false)`.
|
||||
/// The result will be set to `vm->last_retval`.
|
||||
bool py_call(py_Ref f, int argc, py_Ref argv);
|
||||
|
||||
/// Call a method.
|
||||
/// It prepares the stack and then performs a `vectorcall(argc+1, 0, false)`.
|
||||
/// The result will be set to `vm->last_retval`.
|
||||
|
@ -92,19 +92,3 @@ void py_newobject(py_Ref out, py_Type type, int slots, int udsize){
|
||||
out->is_ptr = true;
|
||||
out->_obj = obj;
|
||||
}
|
||||
|
||||
|
||||
void py_pushint(int64_t val) { py_newint(pk_current_vm->stack.sp++, val); }
|
||||
|
||||
void py_pushfloat(double val) { py_newfloat(pk_current_vm->stack.sp++, val); }
|
||||
|
||||
void py_pushbool(bool val) { py_newbool(pk_current_vm->stack.sp++, val); }
|
||||
|
||||
void py_pushstr(const char* val) { py_newstr(pk_current_vm->stack.sp++, val); }
|
||||
|
||||
void py_pushstrn(const char* val, int size) { py_newstrn(pk_current_vm->stack.sp++, val, size); }
|
||||
|
||||
void py_pushnone() { py_newnone(pk_current_vm->stack.sp++); }
|
||||
|
||||
void py_pushnull() { py_newnull(pk_current_vm->stack.sp++); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user