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