[pypy-svn] r28128 - pypy/dist/pypy/rpython/ootypesystem/module

nik at codespeak.net nik at codespeak.net
Sat Jun 3 10:11:55 CEST 2006


Author: nik
Date: Sat Jun  3 10:11:55 2006
New Revision: 28128

Added:
   pypy/dist/pypy/rpython/ootypesystem/module/support.py   (contents, props changed)
Log:
argh! forgot to check in this file yesterday. most failures in the nightly
test run were due to this ...


Added: pypy/dist/pypy/rpython/ootypesystem/module/support.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/rpython/ootypesystem/module/support.py	Sat Jun  3 10:11:55 2006
@@ -0,0 +1,10 @@
+from pypy.rpython.ootypesystem.ootype import oostring
+
+def from_rstr(rs):
+    if not rs:   # null pointer
+        return None
+    else:
+        return "".join([rs.ll_stritem_nonneg(i) for i in range(rs.ll_strlen())])
+
+def to_rstr(s):
+    return oostring(s, -1)



More information about the Pypy-commit mailing list