[pypy-svn] pypy jitypes2: kill outdated XXX, and small refactor
antocuni
commits-noreply at bitbucket.org
Thu Jan 13 14:37:51 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r40646:750adf9839cd
Date: 2011-01-13 14:37 +0100
http://bitbucket.org/pypy/pypy/changeset/750adf9839cd/
Log: kill outdated XXX, and small refactor
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -361,7 +361,6 @@
return wrapped_args
- # XXX: maybe the following two methods should be done inside _ffi?
def _unwrap_args(self, argtypes, args):
"""
Convert from ctypes high-level values to low-level values suitables to
@@ -371,9 +370,7 @@
newargs = []
for argtype, arg in zip(argtypes, args):
shape = argtype._ffiargshape
- if shape == 'P' or shape == 'O':
- value = arg._get_buffer_value()
- elif shape == 'z' or shape == 'Z':
+ if isinstance(shape, str) and shape in "POszZ": # pointer types
value = arg._get_buffer_value()
elif is_struct_shape(shape):
value = arg._buffer
More information about the Pypy-commit
mailing list