[pypy-svn] r79209 - pypy/branch/reflex-support/pypy/module/cppyy
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Nov 17 18:57:21 CET 2010
Author: cfbolz
Date: Wed Nov 17 18:57:20 2010
New Revision: 79209
Modified:
pypy/branch/reflex-support/pypy/module/cppyy/converter.py
Log:
use the official way to check whether w_value is an int
Modified: pypy/branch/reflex-support/pypy/module/cppyy/converter.py
==============================================================================
--- pypy/branch/reflex-support/pypy/module/cppyy/converter.py (original)
+++ pypy/branch/reflex-support/pypy/module/cppyy/converter.py Wed Nov 17 18:57:20 2010
@@ -2,7 +2,6 @@
from pypy.interpreter.error import OperationError
from pypy.rpython.lltypesystem import rffi, lltype
from pypy.rlib.rarithmetic import r_singlefloat
-from pypy.objspace.std.intobject import W_IntObject
from pypy.module._rawffi.interp_rawffi import unpack_simple_shape
@@ -74,7 +73,7 @@
class CharConverter(TypeConverter):
def _from_space(self, space, w_value):
# allow int to pass to char and make sure that str is of length 1
- if type(w_value) == W_IntObject:
+ if space.isinstance_w(w_value, space.w_int):
try:
value = chr(space.c_int_w(w_value))
except ValueError, e:
More information about the Pypy-commit
mailing list