[pypy-svn] pypy psycopg2compatibility: I must have been out of it when I wrote this test, PyFloat_FromString() takes a PyObject *
ademan
commits-noreply at bitbucket.org
Tue Dec 21 13:06:56 CET 2010
Author: Daniel Roberts <Ademan555 at gmail.com>
Branch: psycopg2compatibility
Changeset: r40155:2f54d43d54d6
Date: 2010-12-21 03:58 -0800
http://bitbucket.org/pypy/pypy/changeset/2f54d43d54d6/
Log: I must have been out of it when I wrote this test,
PyFloat_FromString() takes a PyObject *
diff --git a/pypy/module/cpyext/test/test_floatobject.py b/pypy/module/cpyext/test/test_floatobject.py
--- a/pypy/module/cpyext/test/test_floatobject.py
+++ b/pypy/module/cpyext/test/test_floatobject.py
@@ -23,9 +23,8 @@
def test_from_string(self, space, api):
def test_number(n, expectfail=False):
np = lltype.nullptr(rffi.CCHARPP.TO)
- n_str = rffi.str2charp(str(n))
- f = api.PyFloat_FromString(n_str, np)
- rffi.free_charp(n_str)
+ w_n = space.wrap(n)
+ f = api.PyFloat_FromString(w_n, np)
if expectfail:
assert f == None
else:
More information about the Pypy-commit
mailing list