[pypy-commit] cffi default: Tweak
arigo
noreply at buildbot.pypy.org
Fri Jun 8 10:29:37 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r274:1fb08aaf9fc1
Date: 2012-06-08 10:29 +0200
http://bitbucket.org/cffi/cffi/changeset/1fb08aaf9fc1/
Log: Tweak
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -84,7 +84,7 @@
corresponding Python type: <class 'ffi.CData<...>'>.
It can also be used on 'cdata' instance to get its C type.
"""
- if isinstance(cdecl, (str, unicode)):
+ if isinstance(cdecl, basestring):
try:
return self._parsed_types[cdecl]
except KeyError:
@@ -99,7 +99,7 @@
"""Return the size in bytes of the argument. It can be a
string naming a C type, or a 'cdata' instance.
"""
- if isinstance(cdecl, (str, unicode)):
+ if isinstance(cdecl, basestring):
BType = self.typeof(cdecl)
return self._backend.sizeof_type(BType)
else:
More information about the pypy-commit
mailing list