[pypy-dev] framework gcs and NULL termination

Michael Hudson mwh at python.net
Fri Mar 10 19:12:38 CET 2006

So earlier on today I built the first pypy-c using for its memory
management one of the frameworks written by Carl last summer, which I
think is pretty cool!

After one more bugfix, it seems reasonably solid, running at least a
few of CPython's regression tests fine, if a little slowly for now.

However, all is not perfect.  The build occasionally dies with a
random (PyPy level) OSError and string formatting with floats doesn't
quite work right:

>>>> "%f"%1.0

I think the cause of these is related: rpython strings are not always
being NULL terminated, and this causes fun when they get passed to
functions expecting a C string.

This lead to a "how did this ever work" moment: for example, I don't
see how ll_join_strs ensures NULL termination, even with the
refcounting GC.  But float formatting works fine with that, so maybe
I'm barking up the wrong tree here.


  ZAPHOD:  You know what I'm thinking?
    FORD:  No.
  ZAPHOD:  Neither do I.  Frightening isn't it?
                   -- The Hitch-Hikers Guide to the Galaxy, Episode 11

More information about the Pypy-dev mailing list