diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index fd10974a..fd7a9c5d 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -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 PyObject* bind_method(PyObject*, Str, NativeFuncC); diff --git a/src/ceval.cpp b/src/ceval.cpp index d323a3ef..3c709f6f 100644 --- a/src/ceval.cpp +++ b/src/ceval.cpp @@ -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){ diff --git a/src/vm.cpp b/src/vm.cpp index 70f41a6e..5c7978ab 100644 --- a/src/vm.cpp +++ b/src/vm.cpp @@ -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]){