mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some fix
This commit is contained in:
parent
b0a74ffe27
commit
f91c4db49d
@ -441,7 +441,7 @@ public:
|
||||
|
||||
/***** Private *****/
|
||||
void __breakpoint();
|
||||
PyObject* __format_string(Str, PyObject*);
|
||||
PyObject* __format_object(PyObject*, Str);
|
||||
PyObject* __run_top_frame();
|
||||
void __pop_frame();
|
||||
PyObject* __py_generator(Frame&& frame, ArgsView buffer);
|
||||
|
@ -945,7 +945,7 @@ __NEXT_STEP:;
|
||||
case OP_FORMAT_STRING: {
|
||||
PyObject* _0 = POPX();
|
||||
const Str& spec = CAST(Str&, co->consts[byte.arg]);
|
||||
PUSH(__format_string(spec, _0));
|
||||
PUSH(__format_object(_0, spec));
|
||||
} DISPATCH();
|
||||
/*****************************************/
|
||||
case OP_INC_FAST:{
|
||||
|
@ -499,7 +499,7 @@ i64 VM::py_hash(PyObject* obj){
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* VM::__format_string(Str spec, PyObject* obj){
|
||||
PyObject* VM::__format_object(PyObject* obj, Str spec){
|
||||
if(spec.empty()) return py_str(obj);
|
||||
char type;
|
||||
switch(spec.end()[-1]){
|
||||
|
Loading…
x
Reference in New Issue
Block a user