This commit is contained in:
blueloveTH 2024-07-30 18:37:18 +08:00
parent ccca4791ae
commit 66cefad078
2 changed files with 4 additions and 4 deletions

View File

@ -39,9 +39,9 @@ typedef py_TValue* py_TmpRef;
typedef bool (*py_CFunction)(int argc, py_StackRef argv);
enum py_BindType {
py_BindType_FUNCTION,
py_BindType_STATICMETHOD,
py_BindType_CLASSMETHOD
bt_function,
bt_staticmethod,
bt_classmethod,
};
enum py_CompileMode { EXEC_MODE, EVAL_MODE, REPL_MODE, CELL_MODE };

View File

@ -49,7 +49,7 @@ void py_newnativefunc(py_Ref out, py_CFunction f) {
}
void py_bindmethod(py_Type type, const char* name, py_CFunction f) {
py_bindmethod2(type, name, f, py_BindType_FUNCTION);
py_bindmethod2(type, name, f, bt_function);
}
void py_bindmethod2(py_Type type, const char* name, py_CFunction f, enum py_BindType bt) {