Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 3680:8721fafdb67a legacy-trunk
Define sys.prefix and sys.exec_prefix (see Modules/getpath.c; from Makefile).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 17 Jun 1996 17:02:48 +0000 |
| parents | 0b0c4ed1936a |
| children | ce74bba8a6a6 |
line wrap: on
line diff
--- a/Python/sysmodule.c Mon Jun 17 16:59:33 1996 +0000 +++ b/Python/sysmodule.c Mon Jun 17 17:02:48 1996 +0000 @@ -235,6 +235,8 @@ extern char *getversion PROTO((void)); extern char *getcopyright PROTO((void)); extern char *getplatform PROTO((void)); + extern char *Py_GetPrefix PROTO((void)); + extern char *Py_GetExecPrefix PROTO((void)); extern int fclose PROTO((FILE *)); object *m = initmodule("sys", sys_methods); object *v; @@ -256,6 +258,11 @@ XDECREF(v); dictinsert(sysdict, "platform", v = newstringobject(getplatform())); XDECREF(v); + dictinsert(sysdict, "prefix", v = newstringobject(Py_GetPrefix())); + XDECREF(v); + dictinsert(sysdict, "exec_prefix", + v = newstringobject(Py_GetExecPrefix())); + XDECREF(v); dictinsert(sysdict, "maxint", v = newintobject(getmaxint())); XDECREF(v); dictinsert(sysdict, "modules", get_modules());
