Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 20737:00a581bdedeb legacy-trunk
When overriding __str__ or __repr__, set the tp_print slot to NULL.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 29 Oct 2001 14:33:44 +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 } |
