[pypy-svn] r26595 - pypy/dist/pypy/rpython/rctypes

arigo at codespeak.net arigo at codespeak.net
Sun Apr 30 14:16:38 CEST 2006


Author: arigo
Date: Sun Apr 30 14:16:37 2006
New Revision: 26595

Modified:
   pypy/dist/pypy/rpython/rctypes/rchar_p.py
Log:
Fix for objspace/cpy/test/*.


Modified: pypy/dist/pypy/rpython/rctypes/rchar_p.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/rchar_p.py	(original)
+++ pypy/dist/pypy/rpython/rctypes/rchar_p.py	Sun Apr 30 14:16:37 2006
@@ -35,7 +35,7 @@
         llops.gendirectcall(ll_setstring, v_box, v_str)
 
     def convert_const(self, value):
-        if not isinstance(value, (str, c_char_p)):
+        if value is not None and not isinstance(value, (str, c_char_p)):
             # maybe an array of characters? cast to a c_char_p
             assert type(value)._type_ == c_char
             value = cast(value, c_char_p)



More information about the Pypy-commit mailing list