blueloveTH 1 год назад
Родитель
Сommit
6c6e4f0512
2 измененных файлов с 1 добавлено и 5 удалено
  1. 0 3
      include/pocketpy/pocketpy.h
  2. 1 2
      src/public/values.c

+ 0 - 3
include/pocketpy/pocketpy.h

@@ -39,8 +39,6 @@ typedef py_TValue* py_TmpRef;
 /// @return true if the function is successful.
 typedef bool (*py_CFunction)(int argc, py_StackRef argv) PY_RAISE;
 
-enum py_BindType { bt_function, bt_staticmethod, bt_classmethod };
-
 enum py_CompileMode { EXEC_MODE, EVAL_MODE, REPL_MODE, CELL_MODE };
 
 extern py_GlobalRef py_True;
@@ -92,7 +90,6 @@ void py_newnativefunc(py_Ref out, py_CFunction);
 py_Name py_newfunction(py_Ref out,
                     const char* sig,
                     py_CFunction f,
-                    enum py_BindType bt,
                     const char* docstring,
                     int slots);
 

+ 1 - 2
src/public/values.c

@@ -62,14 +62,13 @@ void py_bindfunc(py_Ref obj, const char* name, py_CFunction f) {
 
 void py_bind(py_Ref obj, const char* sig, py_CFunction f) {
     py_TValue tmp;
-    py_Name name = py_newfunction(&tmp, sig, f, bt_function, NULL, 0);
+    py_Name name = py_newfunction(&tmp, sig, f, NULL, 0);
     py_setdict(obj, name, &tmp);
 }
 
 py_Name py_newfunction(py_Ref out,
                        const char* sig,
                        py_CFunction f,
-                       enum py_BindType bt,
                        const char* docstring,
                        int slots) {
     char buffer[256];