[pypy-dev] lltype Questions

Dan Roberts ademan555 at gmail.com
Fri Jun 18 05:16:37 CEST 2010

Hey Everybody,
	It seems no one's in #pypy at the moment, so I figured I'd post to the
mailing list for non-realtime questioning.  I wrote my implementation of
PyUnicode_DecodeUTF16() which is correct as best I can tell (and it
passes its test, but I wrote the test too :-) ).
	The code is here: http://paste.pocoo.org/show/226753/ and its test is
here: http://paste.pocoo.org/show/226752/ . I have a few questions, like
I said, the test passes, but I'm unsure of some of the code I've
written.  There are XXX and FIXME and other comments throughout the
code, those represent places where I'm unsure.
   In the test code, line 6 I'm not sure if that malloc() is correct,
and even if it is, would it have been better (and also valid) to
lltype.malloc(lltype.Signed, ...) ?  Then from line 7 to 12 I assign
"native" integers to the malloc-ed memory, is this done correctly? ex.
pendian[0] = -1 or should it be pendian[0] = rffi.cast(lltype.Signed,
-1) ?
   In the implementation, I'm fairly certain I've marked everything with
FIXME or XXX, so there's not much more to say about that...  I'd really
appreciate anyone who's willing to take a look.


More information about the Pypy-dev mailing list