blueloveTH 2 年 前
コミット
f7fb3c1c98
3 ファイル変更3 行追加3 行削除
  1. 1 1
      include/pocketpy/vm.h
  2. 1 1
      src/ceval.cpp
  3. 1 1
      src/vm.cpp

+ 1 - 1
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<int ARGC>
     PyObject* bind_method(PyObject*, Str, NativeFuncC);

+ 1 - 1
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){

+ 1 - 1
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]){