Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 21509:568c75dd5078 2.1
backport 2.9:
PySymtableEntry_New(): I'm not sure what this
routine is doing, but it was obviously leaking an int object when
whatever the heck it's looking for was found. Repaired that. This
accounts for why entering function and class definitions at an
interactive prompt leaked a reference to the integer 1 each time.
| author | Anthony Baxter <anthonybaxter@gmail.com> |
|---|---|
| date | Fri, 21 Dec 2001 03:45:15 +0000 |
| parents | 6f6f965c5e2d |
| children | 379fc66f4c96 |
| rev | line source |
|---|---|
|
3621
f158edccc72c
grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents:
3212
diff
changeset
|
1 |
| 2896 | 2 /* Return the full version string. */ |
| 3 | |
| 3101 | 4 #include "Python.h" |
| 5 | |
| 2896 | 6 #include "patchlevel.h" |
| 7 | |
| 8 const char * | |
|
13658
f79434ee41fa
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
Thomas Wouters <thomas@python.org>
parents:
13256
diff
changeset
|
9 Py_GetVersion(void) |
| 2896 | 10 { |
|
10668
8c6ffe670963
Allow longer strings (up to 80 chars each) for version, build,
Guido van Rossum <guido@python.org>
parents:
9970
diff
changeset
|
11 static char version[250]; |
|
8c6ffe670963
Allow longer strings (up to 80 chars each) for version, build,
Guido van Rossum <guido@python.org>
parents:
9970
diff
changeset
|
12 sprintf(version, "%.80s (%.80s) %.80s", PY_VERSION, |
|
9745
6fc58d79dac5
Use PY_VERSION instead of PATCHLEVEL.
Guido van Rossum <guido@python.org>
parents:
5860
diff
changeset
|
13 Py_GetBuildInfo(), Py_GetCompiler()); |
| 2896 | 14 return version; |
| 15 } |
