[pypy-commit] pypy reflex-support: simplification
wlav
noreply at buildbot.pypy.org
Fri Sep 20 08:36:35 CEST 2013
Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r67017:a5f2ba76c332
Date: 2013-09-17 14:08 -0700
http://bitbucket.org/pypy/pypy/changeset/a5f2ba76c332/
Log: simplification
diff --git a/pypy/module/cppyy/interp_cppyy.py b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -1142,7 +1142,7 @@
rawobject = rffi.cast(capi.C_OBJECT, rawobject)
# cast to actual if requested and possible
- w_pycppclass = space.w_None
+ w_pycppclass = None
if do_cast and rawobject:
actual = capi.c_actual_class(space, cppclass, rawobject)
if actual != cppclass.handle:
@@ -1158,7 +1158,7 @@
# the variables are re-assigned yet)
pass
- if space.is_w(w_pycppclass, space.w_None):
+ if w_pycppclass is None:
w_pycppclass = get_pythonized_cppclass(space, cppclass.handle)
# try to recycle existing object if this one is not newly created
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
@@ -372,8 +372,6 @@
static inline G__value cppyy_call_T(cppyy_method_t method,
cppyy_object_t self, int nargs, void* args) {
- R__LOCKGUARD2(gCINTMutex);
-
G__param* libp = (G__param*)((char*)args - offsetof(G__param, para));
assert(libp->paran == nargs);
fixup_args(libp);
@@ -1009,7 +1007,7 @@
long cppyy_tfn_install(const char* funcname, int npar) {
// make a new function placeholder known to CINT
- static Long_t s_fid = (Long_t)cppyy_tfn_install;
+ static Long_t s_fid = (Long_t)cppyy_tfn_install; // ensures no user function lives there
++s_fid;
const char* signature = "D - - 0 - - D - - 0 - -";
More information about the pypy-commit
mailing list