[pypy-commit] pypy reflex-support: add return type to function signatures
wlav
noreply at buildbot.pypy.org
Thu Apr 5 07:27:59 CEST 2012
Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r54192:db42c62fffbc
Date: 2012-04-04 11:56 -0700
http://bitbucket.org/pypy/pypy/changeset/db42c62fffbc/
Log: add return type to function signatures
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
@@ -546,6 +546,9 @@
TFunction* f = type_get_method(handle, method_index);
TClassRef cr = type_from_handle(handle);
std::ostringstream sig;
+ if (cr.GetClass() && cr->GetClassInfo()
+ && strcmp(f->GetName(), ((G__ClassInfo*)cr->GetClassInfo())->Name()) != 0)
+ sig << f->GetReturnTypeName() << " ";
sig << cr.GetClassName() << "::" << f->GetName() << "(";
int nArgs = f->GetNargs();
for (int iarg = 0; iarg < nArgs; ++iarg) {
diff --git a/pypy/module/cppyy/src/reflexcwrapper.cxx b/pypy/module/cppyy/src/reflexcwrapper.cxx
--- a/pypy/module/cppyy/src/reflexcwrapper.cxx
+++ b/pypy/module/cppyy/src/reflexcwrapper.cxx
@@ -361,6 +361,8 @@
Reflex::Member m = s.FunctionMemberAt(method_index);
Reflex::Type mt = m.TypeOf();
std::ostringstream sig;
+ if (!m.IsConstructor())
+ sig << mt.ReturnType().Name() << " ";
sig << s.Name(Reflex::SCOPED) << "::" << m.Name() << "(";
int nArgs = m.FunctionParameterSize();
for (int iarg = 0; iarg < nArgs; ++iarg) {
More information about the pypy-commit
mailing list