[pypy-svn] pypy jitypes2: support for python objects as arguments
antocuni
commits-noreply at bitbucket.org
Thu Dec 30 17:59:05 CET 2010
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r40286:430de02fbd77
Date: 2010-12-30 14:34 +0100
http://bitbucket.org/pypy/pypy/changeset/430de02fbd77/
Log: support for python objects as arguments
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
@@ -401,7 +401,7 @@
value = arg.value
assert isinstance(value, basestring) and len(value) == 1
value = ord(value)
- elif shape == 'P':
+ elif shape == 'P' or shape == 'O':
value = arg._get_buffer_value()
elif shape == 'z' or shape == 'Z':
value = arg._get_buffer_value()
More information about the Pypy-commit
mailing list