diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 18cbc3a22a..788ba7fa42 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -333,6 +333,18 @@ get_slotted_function_def(Object *obj, Function *func, FunctionRemap *remap, return true; } + if (method_name == "__truediv__") { + def._answer_location = "nb_true_divide"; + def._wrapper_type = WT_binary_operator; + return true; + } + + if (method_name == "__floordiv__") { + def._answer_location = "nb_floor_divide"; + def._wrapper_type = WT_binary_operator; + return true; + } + if (method_name == "operator %") { def._answer_location = "nb_remainder"; def._wrapper_type = WT_binary_operator; @@ -405,6 +417,18 @@ get_slotted_function_def(Object *obj, Function *func, FunctionRemap *remap, return true; } + if (method_name == "__itruediv__") { + def._answer_location = "nb_inplace_true_divide"; + def._wrapper_type = WT_binary_operator; + return true; + } + + if (method_name == "__ifloordiv__") { + def._answer_location = "nb_inplace_floor_divide"; + def._wrapper_type = WT_binary_operator; + return true; + } + if (method_name == "operator %=") { def._answer_location = "nb_inplace_remainder"; def._wrapper_type = WT_inplace_binary_operator;