[pypy-commit] pypy reflex-support: cleanup
wlav
noreply at buildbot.pypy.org
Thu Feb 23 01:41:45 CET 2012
Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r52783:6884cdf7f445
Date: 2012-02-22 13:38 -0800
http://bitbucket.org/pypy/pypy/changeset/6884cdf7f445/
Log: cleanup
diff --git a/pypy/module/cppyy/converter.py b/pypy/module/cppyy/converter.py
--- a/pypy/module/cppyy/converter.py
+++ b/pypy/module/cppyy/converter.py
@@ -495,14 +495,13 @@
_immutable_ = True
def __init__(self, space, cpptype, name):
+ from pypy.module.cppyy.interp_cppyy import W_CPPType
+ assert isinstance(cpptype, W_CPPType)
self.cpptype = cpptype
self.name = name
def _unwrap_object(self, space, w_obj):
from pypy.module.cppyy.interp_cppyy import W_CPPInstance
- w_cppinstance = space.findattr(w_obj, space.wrap("_cppinstance"))
- if w_cppinstance:
- w_obj = w_cppinstance
obj = space.interpclass_w(w_obj)
if isinstance(obj, W_CPPInstance):
if capi.c_is_subtype(obj.cppclass.handle, self.cpptype.handle):
More information about the pypy-commit
mailing list