[pypy-commit] pypy default: allow Nones
pjenvey
noreply at buildbot.pypy.org
Thu Apr 18 05:40:58 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r63472:0147ac3c2583
Date: 2013-04-17 20:31 -0700
http://bitbucket.org/pypy/pypy/changeset/0147ac3c2583/
Log: allow Nones
diff --git a/rpython/rtyper/lltypesystem/rffi.py b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -1059,7 +1059,7 @@
self.buf = str2charp(value)
else:
self.buf = lltype.nullptr(CCHARP.TO)
- __init__._annenforceargs_ = [None, str]
+ __init__._annenforceargs_ = [None, annmodel.SomeString(can_be_None=True)]
def __enter__(self):
return self.buf
def __exit__(self, *args):
@@ -1073,7 +1073,8 @@
self.buf = unicode2wcharp(value)
else:
self.buf = lltype.nullptr(CWCHARP.TO)
- __init__._annenforceargs_ = [None, unicode]
+ __init__._annenforceargs_ = [None,
+ annmodel.SomeUnicodeString(can_be_None=True)]
def __enter__(self):
return self.buf
def __exit__(self, *args):
More information about the pypy-commit
mailing list