annotate Python/getplatform.c @ 37756:7b2e436a4a21 legacy-trunk

Use Py_VISIT in all tp_traverse methods, instead of traversing manually or using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
author Thomas Wouters <thomas@python.org>
date Sat, 15 Apr 2006 21:47:09 +0000
parents 6f6f965c5e2d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3621
f158edccc72c grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents: 2896
diff changeset
1
f158edccc72c grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents: 2896
diff changeset
2 #include "Python.h"
f158edccc72c grand renaming; added copyright to some files
Guido van Rossum <guido@python.org>
parents: 2896
diff changeset
3
2896
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 #ifndef PLATFORM
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 #define PLATFORM "unknown"
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 #endif
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
7
5860
728a083242a2 Make it return a _const_ char*.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
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_GetPlatform(void)
2896
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 {
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 return PLATFORM;
f0d9f800a4aa Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 }