Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 38536:175cbdf9a5fb legacy-trunk
[ 1497053 ] Let dicts propagate the exceptions in user __eq__().
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
| author | Armin Rigo <arigo@tunes.org> |
|---|---|
| date | Thu, 01 Jun 2006 13:19:12 +0000 |
| parents | 379fc66f4c96 |
| children | 9f2fbee420da |
| 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]; |
|
21077
379fc66f4c96
Use PyOS_snprintf instead of sprintf.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
14375
diff
changeset
|
12 PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", |
|
379fc66f4c96
Use PyOS_snprintf instead of sprintf.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
14375
diff
changeset
|
13 PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); |
| 2896 | 14 return version; |
| 15 } |
