Kaydet (Commit) 89b3325d authored tarafından Guido van Rossum's avatar Guido van Rossum

* import.c (MAGIC): Changed magic word to avoid confusion about exec

  function vs. exec statement
* bltinmodule.c: renamed the module to __builtin__.
* posixmodule.c (posix_execv): renamed exec --> execv since it is now a
  reserved word.
üst b3b09c97
...@@ -582,7 +582,7 @@ posix__exit(self, args) ...@@ -582,7 +582,7 @@ posix__exit(self, args)
/* XXX To do: exece, execp */ /* XXX To do: exece, execp */
static object * static object *
posix_exec(self, args) posix_execv(self, args)
object *self; object *self;
object *args; object *args;
{ {
...@@ -592,7 +592,7 @@ posix_exec(self, args) ...@@ -592,7 +592,7 @@ posix_exec(self, args)
int i, argc; int i, argc;
object *(*getitem) PROTO((object *, int)); object *(*getitem) PROTO((object *, int));
/* exec has two arguments: (path, argv), where /* execv has two arguments: (path, argv), where
argv is a list or tuple of strings. */ argv is a list or tuple of strings. */
if (!getargs(args, "(sO)", &path, &argv)) if (!getargs(args, "(sO)", &path, &argv))
...@@ -1180,7 +1180,7 @@ static struct methodlist posix_methods[] = { ...@@ -1180,7 +1180,7 @@ static struct methodlist posix_methods[] = {
#ifndef MSDOS #ifndef MSDOS
{"_exit", posix__exit}, {"_exit", posix__exit},
{"exec", posix_exec}, {"execv", posix_execv},
{"fork", posix_fork}, {"fork", posix_fork},
{"getegid", posix_getegid}, {"getegid", posix_getegid},
{"geteuid", posix_geteuid}, {"geteuid", posix_geteuid},
......
...@@ -844,7 +844,7 @@ void ...@@ -844,7 +844,7 @@ void
initbuiltin() initbuiltin()
{ {
object *m; object *m;
m = initmodule("builtin", builtin_methods); m = initmodule("__builtin__", builtin_methods);
builtin_dict = getmoduledict(m); builtin_dict = getmoduledict(m);
INCREF(builtin_dict); INCREF(builtin_dict);
initerrors(); initerrors();
......
...@@ -61,7 +61,7 @@ extern char *argv0; ...@@ -61,7 +61,7 @@ extern char *argv0;
/* Magic word to reject .pyc files generated by other Python versions */ /* Magic word to reject .pyc files generated by other Python versions */
#define MAGIC 0x999901L /* Increment by one for each incompatible change */ #define MAGIC 0x999902L /* Increment by one for each incompatible change */
static object *modules; static object *modules;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment