[pypy-commit] pypy ffi-backend: Test passes
arigo
noreply at buildbot.pypy.org
Sat Jun 23 12:36:09 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r55771:d376ee50e4a2
Date: 2012-06-23 11:58 +0200
http://bitbucket.org/pypy/pypy/changeset/d376ee50e4a2/
Log: Test passes
diff --git a/pypy/module/_ffi_backend/ctypeobj.py b/pypy/module/_ffi_backend/ctypeobj.py
--- a/pypy/module/_ffi_backend/ctypeobj.py
+++ b/pypy/module/_ffi_backend/ctypeobj.py
@@ -166,6 +166,20 @@
"index too large for cdata '%s' (expected %d < %d)",
self.name, i, w_cdata.get_array_length())
+ def convert_from_object(self, cdata, w_ob):
+ space = self.space
+ if (space.isinstance_w(w_ob, space.w_list) or
+ space.isinstance_w(w_ob, space.w_tuple)):
+ lst = space.listview(w_ob)
+ if self.length >= 0 and len(lst) > self.length:
+ xxx
+ ctitem = self.ctitem
+ for i in range(len(lst)):
+ ctitem.convert_from_object(cdata, lst[i])
+ cdata = rffi.ptradd(cdata, ctitem.size)
+ else:
+ xxx
+
class W_CTypePrimitive(W_CType):
More information about the pypy-commit
mailing list