Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 14268:cd8b815cb196 legacy-trunk
Better error message with UnboundLocalError
| author | Paul Prescod <prescod@prescod.net> |
|---|---|
| date | Wed, 30 Aug 2000 20:25:01 +0000 |
| parents | f79434ee41fa |
| children | 6f6f965c5e2d |
| rev | line source |
|---|---|
|
3621
f158edccc72c
grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents:
3212
diff
changeset
|
1 /*********************************************************** |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
2 Copyright (c) 2000, BeOpen.com. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
3 Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
4 Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
5 All rights reserved. |
|
3621
f158edccc72c
grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents:
3212
diff
changeset
|
6 |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
7 See the file "Misc/COPYRIGHT" for information on usage and |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
10668
diff
changeset
|
8 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|
3621
f158edccc72c
grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents:
3212
diff
changeset
|
9 ******************************************************************/ |
|
f158edccc72c
grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents:
3212
diff
changeset
|
10 |
| 2896 | 11 /* Return the full version string. */ |
| 12 | |
| 3101 | 13 #include "Python.h" |
| 14 | |
| 2896 | 15 #include "patchlevel.h" |
| 16 | |
| 17 const char * | |
|
13658
f79434ee41fa
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
Thomas Wouters <thomas@python.org>
parents:
13256
diff
changeset
|
18 Py_GetVersion(void) |
| 2896 | 19 { |
|
10668
8c6ffe670963
Allow longer strings (up to 80 chars each) for version, build,
Guido van Rossum <guido@python.org>
parents:
9970
diff
changeset
|
20 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
|
21 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
|
22 Py_GetBuildInfo(), Py_GetCompiler()); |
| 2896 | 23 return version; |
| 24 } |
