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

added sys.platform

üst e40bddc3
...@@ -194,6 +194,7 @@ initsys() ...@@ -194,6 +194,7 @@ initsys()
extern long getmaxint PROTO((void)); extern long getmaxint PROTO((void));
extern char *getversion PROTO((void)); extern char *getversion PROTO((void));
extern char *getcopyright PROTO((void)); extern char *getcopyright PROTO((void));
extern char *getplatform PROTO((void));
extern int fclose PROTO((FILE *)); extern int fclose PROTO((FILE *));
object *m = initmodule("sys", sys_methods); object *m = initmodule("sys", sys_methods);
object *v; object *v;
...@@ -213,6 +214,8 @@ initsys() ...@@ -213,6 +214,8 @@ initsys()
XDECREF(v); XDECREF(v);
dictinsert(sysdict, "copyright", v = newstringobject(getcopyright())); dictinsert(sysdict, "copyright", v = newstringobject(getcopyright()));
XDECREF(v); XDECREF(v);
dictinsert(sysdict, "platform", v = newstringobject(getplatform()));
XDECREF(v);
dictinsert(sysdict, "maxint", v = newintobject(getmaxint())); dictinsert(sysdict, "maxint", v = newintobject(getmaxint()));
XDECREF(v); XDECREF(v);
dictinsert(sysdict, "modules", get_modules()); dictinsert(sysdict, "modules", get_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