mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 03:50:16 +00:00
...
This commit is contained in:
parent
783f3b7ebd
commit
f7fb3c1c98
@ -465,7 +465,7 @@ public:
|
||||
void delattr(PyObject* obj, StrName name);
|
||||
PyObject* get_unbound_method(PyObject* obj, StrName name, PyObject** self, bool throw_err=true, bool fallback=false);
|
||||
void parse_int_slice(const Slice& s, int length, int& start, int& stop, int& step);
|
||||
PyObject* format(Str, PyObject*);
|
||||
PyObject* _format_string(Str, PyObject*);
|
||||
void setattr(PyObject* obj, StrName name, PyObject* value);
|
||||
template<int ARGC>
|
||||
PyObject* bind_method(PyObject*, Str, NativeFuncC);
|
||||
|
@ -805,7 +805,7 @@ __NEXT_STEP:;
|
||||
TARGET(FORMAT_STRING) {
|
||||
PyObject* _0 = POPX();
|
||||
const Str& spec = CAST(Str&, co_consts[byte.arg]);
|
||||
PUSH(format(spec, _0));
|
||||
PUSH(_format_string(spec, _0));
|
||||
} DISPATCH();
|
||||
/*****************************************/
|
||||
TARGET(INC_FAST){
|
||||
|
@ -475,7 +475,7 @@ i64 VM::py_hash(PyObject* obj){
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* VM::format(Str spec, PyObject* obj){
|
||||
PyObject* VM::_format_string(Str spec, PyObject* obj){
|
||||
if(spec.empty()) return py_str(obj);
|
||||
char type;
|
||||
switch(spec.end()[-1]){
|
||||
|
Loading…
x
Reference in New Issue
Block a user