1. Pypy
  2. Untitled project
  3. pypy

Commits

Carl Friedrich Bolz  committed cf4c83c

make it possible to have the target return just the main function, which is by
far the most common case nowadays.

  • Participants
  • Parent commits 27316db
  • Branches default

Comments (0)

Files changed (3)

File rpython/translator/driver.py

View file
 
         try:
             entry_point, inputtypes, policy = spec
+        except TypeError:
+            # not a tuple at all
+            entry_point = spec
+            inputtypes = policy = None
         except ValueError:
+            policy = None
             entry_point, inputtypes = spec
-            policy = None
+
 
         driver.setup(entry_point, inputtypes,
                      policy=policy,

File rpython/translator/goal/targetnopstandalone.py

View file
 # _____ Define and setup target ___
 
 def target(*args):
-    return entry_point, None
+    return entry_point

File rpython/translator/goal/targetrpystonedalone.py

View file
 # _____ Define and setup target ___
 
 def target(*args):
-    return entry_point, None
+    return entry_point
 
 """
 Why is this a stand-alone target?
 
-The above target specifies None as the argument types list.
-This is a case treated specially in the driver.py . If the list
-of input types is empty, it is meant to be a list of strings,
-actually implementing argv of the executable.
+The above target specifies no argument types list.
+This is a case treated specially in the driver.py . The only argument is meant
+to be a list of strings, actually implementing argv of the executable.
 """