Author: Christian Tismer <tis...@stackless.com> Branch: Changeset: r53467:97974009393e Date: 2012-03-13 11:57 -0700 http://bitbucket.org/pypy/pypy/changeset/97974009393e/
Log: merge diff --git a/pypy/module/cpyext/test/test_stringobject.py b/pypy/module/cpyext/test/test_stringobject.py --- a/pypy/module/cpyext/test/test_stringobject.py +++ b/pypy/module/cpyext/test/test_stringobject.py @@ -105,6 +105,15 @@ )]) assert module.string_as_string("huheduwe") == "huhe" + def test_py_string_as_string_None(self): + module = self.import_extension('foo', [ + ("string_None", "METH_VARARGS", + ''' + return PyString_AsString(Py_None); + ''' + )]) + raises(TypeError, module.string_None) + def test_AsStringAndSize(self): module = self.import_extension('foo', [ ("getstring", "METH_NOARGS", diff --git a/pypy/rlib/rfloat.py b/pypy/rlib/rfloat.py --- a/pypy/rlib/rfloat.py +++ b/pypy/rlib/rfloat.py @@ -375,8 +375,7 @@ def log1p(x): "NOT_RPYTHON" - from pypy.rlib import rfloat - if abs(x) < rfloat.DBL_EPSILON // 2.: + if abs(x) < DBL_EPSILON // 2.: return x elif -.5 <= x <= 1.: y = 1. + x _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit