Created
January 23, 2019 20:56
-
-
Save mattip/fcea33b6001be1f7f9eb012a48c6f919 to your computer and use it in GitHub Desktop.
diff to fix test_site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 49aade4a2c18 pypy/module/_cppyy/pythonify.py | |
--- a/pypy/module/_cppyy/pythonify.py Sun Jan 20 19:10:23 2019 +0200 | |
+++ b/pypy/module/_cppyy/pythonify.py Wed Jan 23 22:55:42 2019 +0200 | |
@@ -1,8 +1,10 @@ | |
# NOT_RPYTHON | |
# do not load _cppyy here, see _post_import_startup() | |
-import types | |
import sys | |
+class _C: | |
+ def _m(self): pass | |
+MethodType = type(_C()._m) | |
# Metaclasses are needed to store C++ static data members as properties and to | |
# provide Python language features such as a customized __dir__ for namespaces | |
@@ -238,7 +240,7 @@ | |
# prepare dictionary for python-side C++ class representation | |
def dispatch(self, m_name, signature): | |
cppol = decl.__dispatch__(m_name, signature) | |
- return types.MethodType(cppol, self, type(self)) | |
+ return MethodType(cppol, self, type(self)) | |
d_class = {"__cppdecl__" : decl, | |
"__new__" : make_new(decl), | |
"__module__" : make_module_name(scope), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment