[pypy-commit] pypy reflex-support: fix for name matching if a class lives in a namespace

wlav noreply at buildbot.pypy.org
Tue Feb 28 07:38:29 CET 2012


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r52956:1174528adf73
Date: 2012-02-27 21:52 -0800
http://bitbucket.org/pypy/pypy/changeset/1174528adf73/

Log:	fix for name matching if a class lives in a namespace

diff --git a/pypy/module/cppyy/src/cintcwrapper.cxx b/pypy/module/cppyy/src/cintcwrapper.cxx
--- a/pypy/module/cppyy/src/cintcwrapper.cxx
+++ b/pypy/module/cppyy/src/cintcwrapper.cxx
@@ -206,7 +206,7 @@
 /* method/function dispatching -------------------------------------------- */
 static inline G__value cppyy_call_T(cppyy_method_t method,
         cppyy_object_t self, int nargs, void* args) {
-    
+
     G__InterfaceMethod meth = (G__InterfaceMethod)method;
     G__param* libp = (G__param*)((char*)args - offsetof(G__param, para));
     assert(libp->paran == nargs);
@@ -466,7 +466,7 @@
 int cppyy_is_constructor(cppyy_type_t handle, int method_index) {
     TClassRef cr = type_from_handle(handle);
     TMethod* m = (TMethod*)cr->GetListOfMethods()->At(method_index);
-    return strcmp(m->GetName(), cr->GetName()) == 0;
+    return strcmp(m->GetName(), ((G__ClassInfo*)cr->GetClassInfo())->Name()) == 0;
 }
 
 int cppyy_is_staticmethod(cppyy_type_t handle, int method_index) {


More information about the pypy-commit mailing list