Author: Amaury Forgeot d'Arc <[email protected]>
Branch: remove-PYPY_NOT_MAIN_FILE
Changeset: r57751:b7aba3fd9ad8
Date: 2012-10-02 22:58 +0200
http://bitbucket.org/pypy/pypy/changeset/b7aba3fd9ad8/
Log: Fix fix fix. Also rename main.c into entrypoint.c, to avoid
collision in case of --shared build.
diff --git a/pypy/rpython/module/ll_strtod.py b/pypy/rpython/module/ll_strtod.py
--- a/pypy/rpython/module/ll_strtod.py
+++ b/pypy/rpython/module/ll_strtod.py
@@ -14,7 +14,7 @@
_compilation_info_ = ExternalCompilationInfo(
includes = ['src/ll_strtod.h'],
include_dirs = [str(py.path.local(pypydir).join('translator', 'c'))],
- separate_module_sources = ['#include <src/ll_strtod.h>'],
+ separate_module_sources = ['#include <src/ll_strtod.c>'],
export_symbols = ['LL_strtod_formatd', 'LL_strtod_parts_to_float'],
)
diff --git a/pypy/translator/c/genc.py b/pypy/translator/c/genc.py
--- a/pypy/translator/c/genc.py
+++ b/pypy/translator/c/genc.py
@@ -907,7 +907,7 @@
def add_extra_files(eci):
srcdir = py.path.local(autopath.pypydir).join('translator', 'c', 'src')
files = [
- srcdir / 'main.c', # ifdef PYPY_STANDALONE
+ srcdir / 'entrypoint.c', # ifdef PYPY_STANDALONE
srcdir / 'allocator.c', # ifdef PYPY_STANDALONE
srcdir / 'mem.c',
srcdir / 'exception.c',
diff --git a/pypy/translator/c/src/main.c b/pypy/translator/c/src/entrypoint.c
rename from pypy/translator/c/src/main.c
rename to pypy/translator/c/src/entrypoint.c
--- a/pypy/translator/c/src/main.c
+++ b/pypy/translator/c/src/entrypoint.c
@@ -3,7 +3,7 @@
#include "structdef.h"
#include "forwarddecl.h"
#include "preimpl.h"
-#include <src/main.h>
+#include <src/entrypoint.h>
#include <src/commondefs.h>
#include <src/mem.h>
#include <src/instrument.h>
diff --git a/pypy/translator/c/src/main.h b/pypy/translator/c/src/entrypoint.h
rename from pypy/translator/c/src/main.h
rename to pypy/translator/c/src/entrypoint.h
diff --git a/pypy/translator/c/src/g_include.h
b/pypy/translator/c/src/g_include.h
--- a/pypy/translator/c/src/g_include.h
+++ b/pypy/translator/c/src/g_include.h
@@ -50,7 +50,7 @@
#ifdef PYPY_STANDALONE
# include "src/allocator.h"
-# include "src/main.h"
+# include "src/entrypoint.h"
#endif
/* suppress a few warnings in the generated code */
diff --git a/pypy/translator/c/src/mem.c b/pypy/translator/c/src/mem.c
--- a/pypy/translator/c/src/mem.c
+++ b/pypy/translator/c/src/mem.c
@@ -1,6 +1,7 @@
#include "common_header.h"
#include "src/support.h"
#include <stdlib.h>
+#include <stdio.h>
/*** tracking raw mallocs and frees for debugging ***/
diff --git a/pypy/translator/c/src/pyobj.c b/pypy/translator/c/src/pyobj.c
--- a/pypy/translator/c/src/pyobj.c
+++ b/pypy/translator/c/src/pyobj.c
@@ -1,3 +1,4 @@
+#include "common_header.h"
#include <src/pyobj.h>
/************************************************************/
diff --git a/pypy/translator/c/src/pyobj.h b/pypy/translator/c/src/pyobj.h
--- a/pypy/translator/c/src/pyobj.h
+++ b/pypy/translator/c/src/pyobj.h
@@ -217,6 +217,12 @@
#define OP_NEWDICT(args,r) if (!(r=PyDict_Pack args)) CFAIL()
#define OP_NEWTUPLE(args,r) if (!(r=PyTuple_Pack args)) CFAIL()
+#if (PY_VERSION_HEX < 0x02040000)
+unsigned long RPyLong_AsUnsignedLong(PyObject *v);
+#else
+#define RPyLong_AsUnsignedLong PyLong_AsUnsignedLong
+#endif
+
unsigned long long RPyLong_AsUnsignedLongLong(PyObject *v);
long long RPyLong_AsLongLong(PyObject *v);
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit