Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 2810:fc2190ec1bea legacy-trunk
added sys.platform
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 07 Jul 1995 22:45:02 +0000 |
| parents | 6cc637c60ce6 |
| children | 54aa87b1ccee |
line wrap: on
line diff
--- a/Python/sysmodule.c Fri Jul 07 22:44:10 1995 +0000 +++ b/Python/sysmodule.c Fri Jul 07 22:45:02 1995 +0000 @@ -194,6 +194,7 @@ extern long getmaxint PROTO((void)); extern char *getversion PROTO((void)); extern char *getcopyright PROTO((void)); + extern char *getplatform PROTO((void)); extern int fclose PROTO((FILE *)); object *m = initmodule("sys", sys_methods); object *v; @@ -213,6 +214,8 @@ XDECREF(v); dictinsert(sysdict, "copyright", v = newstringobject(getcopyright())); XDECREF(v); + dictinsert(sysdict, "platform", v = newstringobject(getplatform())); + XDECREF(v); dictinsert(sysdict, "maxint", v = newintobject(getmaxint())); XDECREF(v); dictinsert(sysdict, "modules", get_modules());
