Mercurial > cpython-lru_cache-weakref
annotate Python/getversion.c @ 3024:54aa87b1ccee legacy-trunk
Implemented two new functions in sys:
getcounts() returns a list of counts of allocations and
deallocations for all different object types.
getobjects(n [, type ]) returns a list of recently allocated
and not-yet-freed objects of the given type (all
objects if no type given). Only the n most recent
(all if n==0) objects are returned.
getcounts is only available if compiled with -DCOUNT_ALLOCS,
getobjects is only available if compiled with -DTRACE_REFS. Note that
everything must be compiled with these options!
| author | Sjoerd Mullender <sjoerd@acm.org> |
|---|---|
| date | Tue, 29 Aug 1995 09:18:14 +0000 |
| parents | f0d9f800a4aa |
| children | 237c3b2a6187 |
| rev | line source |
|---|---|
| 2896 | 1 /* Return the full version string. */ |
| 2 | |
| 3 #include "patchlevel.h" | |
| 4 | |
| 5 #define VERSION "%s (%s) %s" | |
| 6 | |
| 7 #ifdef __DATE__ | |
| 8 #define DATE __DATE__ | |
| 9 #else | |
| 10 #define DATE "August 1 1995" | |
| 11 #endif | |
| 12 | |
| 13 extern const char *getcompiler(); | |
| 14 | |
| 15 const char * | |
| 16 getversion() | |
| 17 { | |
| 18 static char version[80]; | |
| 19 sprintf(version, VERSION, PATCHLEVEL, DATE, getcompiler()); | |
| 20 return version; | |
| 21 } |
