diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-05-20 08:11:19 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-05-20 08:11:19 +0000 |
commit | 4dd019fde36b53b30e69a2ce9cee3f2f9f25c2a6 (patch) | |
tree | 49969f2e7cf34f52d29252ecc038a35362f77246 /Python/sysmodule.c | |
parent | b7e419ebb9c815ad74d20e6e26f61b56eb2bc929 (diff) | |
download | cpython-git-4dd019fde36b53b30e69a2ce9cee3f2f9f25c2a6.tar.gz |
Patch #2488: Add sys.maxsize.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index c8842503be..f706a7d42d 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -992,6 +992,7 @@ PyDoc_STR( Static objects:\n\ \n\ maxint -- the largest supported integer (the smallest is -maxint-1)\n\ +maxsize -- the largest supported length of containers.\n\ maxunicode -- the largest supported character\n\ builtin_module_names -- tuple of module names built into this interpreter\n\ version -- the version of this interpreter as a string\n\ @@ -1345,6 +1346,8 @@ _PySys_Init(void) PyString_FromString(Py_GetPrefix())); SET_SYS_FROM_STRING("exec_prefix", PyString_FromString(Py_GetExecPrefix())); + SET_SYS_FROM_STRING("maxsize", + PyInt_FromSsize_t(PY_SSIZE_T_MAX)); SET_SYS_FROM_STRING("maxint", PyInt_FromLong(PyInt_GetMax())); SET_SYS_FROM_STRING("py3kwarning", |