[pypy-svn] pypy shorter-float-repr: Compilation fixes to let tests pass in test_rarithmetic.py

amauryfa commits-noreply at bitbucket.org
Thu Jan 20 22:39:50 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: shorter-float-repr
Changeset: r41099:264bc6960d59
Date: 2011-01-20 22:39 +0100
http://bitbucket.org/pypy/pypy/changeset/264bc6960d59/

Log:	Compilation fixes to let tests pass in test_rarithmetic.py

diff --git a/pypy/translator/c/src/dtoa.c b/pypy/translator/c/src/dtoa.c
--- a/pypy/translator/c/src/dtoa.c
+++ b/pypy/translator/c/src/dtoa.c
@@ -129,6 +129,9 @@
 #include <stdio.h>
 #define PyMem_Malloc PyObject_Malloc
 #define PyMem_Free PyObject_Free
+#define _Py_dg_strtod _PyPy_dg_strtod
+#define _Py_dg_dtoa _PyPy_dg_dtoa
+#define _Py_dg_freedtoa _PyPy_dg_freedtoa
 /* End PYPY hacks */
 
 

diff --git a/pypy/rpython/module/ll_dtoa.py b/pypy/rpython/module/ll_dtoa.py
--- a/pypy/rpython/module/ll_dtoa.py
+++ b/pypy/rpython/module/ll_dtoa.py
@@ -16,26 +16,25 @@
     separate_module_sources = ['''
        #include <stdlib.h>
        #include <assert.h>
-       #define WITH_PYMALLOC
-       #include "src/obmalloc.c"
+       #include "src/allocator.h"
     '''],
-    export_symbols = ['_Py_dg_strtod',
-                      '_Py_dg_dtoa',
-                      '_Py_dg_freedtoa',
+    export_symbols = ['_PyPy_dg_strtod',
+                      '_PyPy_dg_dtoa',
+                      '_PyPy_dg_freedtoa',
                       ],
     )
 
 dg_strtod = rffi.llexternal(
-    '_Py_dg_strtod', [rffi.CCHARP, rffi.CCHARPP], rffi.DOUBLE,
+    '_PyPy_dg_strtod', [rffi.CCHARP, rffi.CCHARPP], rffi.DOUBLE,
     compilation_info=eci)
 
 dg_dtoa = rffi.llexternal(
-    '_Py_dg_dtoa', [rffi.DOUBLE, rffi.INT, rffi.INT,
+    '_PyPy_dg_dtoa', [rffi.DOUBLE, rffi.INT, rffi.INT,
                     rffi.INTP, rffi.INTP, rffi.CCHARPP], rffi.CCHARP,
     compilation_info=eci)
 
 dg_freedtoa = rffi.llexternal(
-    '_Py_dg_freedtoa', [rffi.CCHARP], lltype.Void,
+    '_PyPy_dg_freedtoa', [rffi.CCHARP], lltype.Void,
     compilation_info=eci)
 
 def strtod(input):


More information about the Pypy-commit mailing list