Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r52094:f32cbb5713dd Date: 2012-02-04 16:03 +0100 http://bitbucket.org/pypy/pypy/changeset/f32cbb5713dd/
Log: merge heads diff --git a/pypy/annotation/test/test_annrpython.py b/pypy/annotation/test/test_annrpython.py --- a/pypy/annotation/test/test_annrpython.py +++ b/pypy/annotation/test/test_annrpython.py @@ -479,6 +479,18 @@ assert isinstance(s, annmodel.SomeList) assert s.listdef.listitem.resized + def test_str_strip(self): + a = self.RPythonAnnotator() + def f(n, a_str): + if n == 0: + return a_str.strip(' ') + elif n == 1: + return a_str.rstrip(' ') + else: + return a_str.lstrip(' ') + s = a.build_types(f, [int, annmodel.SomeString(no_nul=True)]) + assert s.no_nul + def test_str_mul(self): a = self.RPythonAnnotator() def f(a_str): diff --git a/pypy/annotation/unaryop.py b/pypy/annotation/unaryop.py --- a/pypy/annotation/unaryop.py +++ b/pypy/annotation/unaryop.py @@ -480,13 +480,13 @@ return SomeInteger(nonneg=True) def method_strip(str, chr): - return str.basestringclass() + return str.basestringclass(no_nul=str.no_nul) def method_lstrip(str, chr): - return str.basestringclass() + return str.basestringclass(no_nul=str.no_nul) def method_rstrip(str, chr): - return str.basestringclass() + return str.basestringclass(no_nul=str.no_nul) def method_join(str, s_list): if s_None.contains(s_list): diff --git a/pypy/module/cpyext/include/pythonrun.h b/pypy/module/cpyext/include/pythonrun.h --- a/pypy/module/cpyext/include/pythonrun.h +++ b/pypy/module/cpyext/include/pythonrun.h @@ -13,6 +13,7 @@ #define Py_FrozenFlag 0 #define Py_VerboseFlag 0 +#define Py_DebugFlag 1 typedef struct { int cf_flags; /* bitmask of CO_xxx flags relevant to future */ _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit