Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r63930:0423d458c98d
Date: 2013-05-08 23:54 +0200
http://bitbucket.org/pypy/pypy/changeset/0423d458c98d/

Log:    shuffle stuff around

diff --git a/rpython/rlib/entrypoint.py b/rpython/rlib/entrypoint.py
--- a/rpython/rlib/entrypoint.py
+++ b/rpython/rlib/entrypoint.py
@@ -8,7 +8,7 @@
     if key == 'main' than it's included by default
     """
     from rpython.translator.tool.cbuild import ExternalCompilationInfo
-    
+
     def deco(func):
         secondary_entrypoints.setdefault(key, []).append((func, argtypes))
         if c_name is not None:
@@ -20,3 +20,15 @@
         return func
     return deco
 
+# the point of dance below is so the call to rpython_startup_code actually
+# does call asm_stack_bottom. It's here because there is no other good place.
+# This thing is imported by any target which has any API, so it'll get
+# registered
+
+from rpython.rtyper.lltypesystem import lltype, rffi
+
+RPython_StartupCode = rffi.llexternal('RPython_StartupCode', [], lltype.Void)
+
+@entrypoint('main', [], c_name='rpython_startup_code')
+def rpython_startup_code():
+    return RPython_StartupCode()
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
@@ -727,15 +727,6 @@
     for line in preimplementationlines:
         print >> f, line
 
-# the point of dance below is so the call to rpython_startup_code actually
-# does call asm_stack_bottom
-
-RPython_StartupCode = rffi.llexternal('RPython_StartupCode', [], lltype.Void)
-
-@entrypoint('main', [], c_name='rpython_startup_code')
-def rpython_startup_code():
-    return RPython_StartupCode()
-
 def gen_startupcode(f, database):
     # generate the start-up code and put it into a function
     print >> f, 'char *RPython_StartupCode(void) {'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to