From c37a33baefeb691e8b826b00e7c3c95892a19fe9 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 19 Feb 2019 13:45:37 +0100 Subject: [PATCH] interrogate: don't export bindings for global operators linmath exports a global __mul__, which isn't really useful. --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 5f351dbbc1..03c3352d13 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -7526,6 +7526,12 @@ is_remap_legal(FunctionRemap *remap) { } } + // Don't export global operators. + if (!remap->_has_this && + remap->_cppfunc->get_simple_name().compare(0, 9, "operator ") == 0) { + return false; + } + // ok all looks ok. return true; }