Author: Amaury Forgeot d'Arc <[email protected]>
Branch: remove-PYPY_NOT_MAIN_FILE
Changeset: r57734:8144ea8e6de4
Date: 2012-10-02 16:37 +0200
http://bitbucket.org/pypy/pypy/changeset/8144ea8e6de4/
Log: Some #ifdef and documentation.
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,21 +907,21 @@
def add_extra_files(eci):
srcdir = py.path.local(autopath.pypydir).join('translator', 'c', 'src')
files = [
- srcdir / 'main.c',
- srcdir / 'allocator.c',
+ srcdir / 'main.c', # ifdef PYPY_STANDALONE
+ srcdir / 'allocator.c', # ifdef PYPY_STANDALONE
srcdir / 'mem.c',
srcdir / 'exception.c',
- srcdir / 'rtyper.c',
+ srcdir / 'rtyper.c', # ifdef HAVE_RTYPER
srcdir / 'support.c',
srcdir / 'pyobj.c',
srcdir / 'profiling.c',
srcdir / 'debug_print.c',
- srcdir / 'debug_traceback.c',
+ srcdir / 'debug_traceback.c', # ifdef HAVE_RTYPER
srcdir / 'stack.c',
srcdir / 'thread.c',
srcdir / 'asm.c',
srcdir / 'instrument.c',
- srcdir / 'll_strtod.c',
+ srcdir / 'll_strtod.c', # ifdef HAVE_RTYPER
srcdir / 'int.c',
]
if _CYGWIN:
diff --git a/pypy/translator/c/src/allocator.c
b/pypy/translator/c/src/allocator.c
--- a/pypy/translator/c/src/allocator.c
+++ b/pypy/translator/c/src/allocator.c
@@ -1,5 +1,6 @@
/* allocation functions */
#include "common_header.h"
+#ifdef PYPY_STANDALONE
#include <malloc.h>
#include <stdlib.h>
@@ -24,3 +25,5 @@
# include "src/obmalloc.c"
#endif
+
+#endif /* PYPY_STANDALONE */
diff --git a/pypy/translator/c/src/allocator.h
b/pypy/translator/c/src/allocator.h
--- a/pypy/translator/c/src/allocator.h
+++ b/pypy/translator/c/src/allocator.h
@@ -1,5 +1,7 @@
+#ifdef PYPY_STANDALONE
/* allocation functions prototypes */
void *PyObject_Malloc(size_t n);
void *PyObject_Realloc(void *p, size_t n);
void PyObject_Free(void *p);
+#endif /* PYPY_STANDALONE */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit