Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 16893:f1c8ea92ee85 legacy-trunk
Suppress a compiler warning under OpenVMS; time_t is unsigned on (at least)
the more recent versions of that platform, so we use the value (time_t)(-1)
as the error value. This is the type used in the OpenVMS documentation:
http://www.openvms.compaq.com/commercial/c/5763p048.htm#inde
This closes SF tracker bug #404240.
Also clean up an exception message when detecting overflow of time_t values
beyond 4 bytes.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 01 Mar 2001 06:33:32 +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 } |
