Author: Armin Rigo <ar...@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): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit