[pypy-svn] pypy shorter-float-repr: Somehow this fixes a segfault in rlib/test/test_rmarshal.py

amauryfa commits-noreply at bitbucket.org
Sat Jan 22 00:11:58 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: shorter-float-repr
Changeset: r41190:638fb9e58d33
Date: 2011-01-21 22:41 +0100
http://bitbucket.org/pypy/pypy/changeset/638fb9e58d33/

Log:	Somehow this fixes a segfault in rlib/test/test_rmarshal.py

diff --git a/pypy/rlib/rdtoa.py b/pypy/rlib/rdtoa.py
--- a/pypy/rlib/rdtoa.py
+++ b/pypy/rlib/rdtoa.py
@@ -11,6 +11,7 @@
 
 eci = ExternalCompilationInfo(
     include_dirs = [cdir],
+    includes = ['src/dtoa.h'],
     libraries = [],
     separate_module_files = [cdir / 'src' / 'dtoa.c'],
     separate_module_sources = ['''

diff --git a/pypy/translator/c/src/dtoa.h b/pypy/translator/c/src/dtoa.h
new file mode 100644
--- /dev/null
+++ b/pypy/translator/c/src/dtoa.h
@@ -0,0 +1,7 @@
+/* Exported functions from dtoa.c */
+
+double _PyPy_dg_strtod(const char *str, char **ptr);
+char * _PyPy_dg_dtoa(double d, int mode, int ndigits,
+		     int *decpt, int *sign, char **rve);
+void _PyPy_dg_freedtoa(char *s);
+


More information about the Pypy-commit mailing list