[pypy-commit] pypy default: RPython_StartupCode() never returns non-null
arigo
noreply at buildbot.pypy.org
Mon Oct 5 16:14:33 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r79989:ea1c9b81f55c
Date: 2015-10-05 15:54 +0200
http://bitbucket.org/pypy/pypy/changeset/ea1c9b81f55c/
Log: RPython_StartupCode() never returns non-null
diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -763,8 +763,7 @@
def gen_startupcode(f, database):
# generate the start-up code and put it into a function
- print >> f, 'char *RPython_StartupCode(void) {'
- print >> f, '\tchar *error = NULL;'
+ print >> f, 'void RPython_StartupCode(void) {'
bk = database.translator.annotator.bookkeeper
if bk.thread_local_fields:
@@ -778,18 +777,12 @@
for dest, value in database.late_initializations:
print >> f, "\t%s = %s;" % (dest, value)
- firsttime = True
for node in database.containerlist:
lines = list(node.startupcode())
if lines:
- if firsttime:
- firsttime = False
- else:
- print >> f, '\tif (error) return error;'
for line in lines:
print >> f, '\t'+line
- print >> f, '\treturn error;'
print >> f, '}'
def commondefs(defines):
diff --git a/rpython/translator/c/src/entrypoint.c b/rpython/translator/c/src/entrypoint.c
--- a/rpython/translator/c/src/entrypoint.c
+++ b/rpython/translator/c/src/entrypoint.c
@@ -61,8 +61,7 @@
}
#endif
- errmsg = RPython_StartupCode();
- if (errmsg) goto error;
+ RPython_StartupCode();
list = _RPyListOfString_New(argc);
if (RPyExceptionOccurred()) goto memory_out;
diff --git a/rpython/translator/c/src/entrypoint.h b/rpython/translator/c/src/entrypoint.h
--- a/rpython/translator/c/src/entrypoint.h
+++ b/rpython/translator/c/src/entrypoint.h
@@ -8,6 +8,6 @@
#define PYPY_MAIN_FUNCTION main
#endif
-RPY_EXTERN char *RPython_StartupCode(void);
+RPY_EXTERN void RPython_StartupCode(void);
RPY_EXPORTED int PYPY_MAIN_FUNCTION(int argc, char *argv[]);
#endif /* PYPY_STANDALONE */
More information about the pypy-commit
mailing list