Mercurial > cpython-lru_cache-weakref
annotate Modules/puremodule.c @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | fd25030223b0 |
| children |
| rev | line source |
|---|---|
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
1 /* This module exports the C API to such Pure Software Inc. (tm) (now |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
2 * called Pure Atria Corporation) products as Purify (tm) and Quantify |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
3 * (tm). Other packages could be added, but I didn't have those products |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
4 * and thus lack the API documentation. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
5 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
6 * Currently supported: Quantify 2.x, Purify 3.x |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
7 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
8 * You need to decide which products you want to incorporate into the |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
9 * module when you compile this file. The way to do this is to edit |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
10 * <Python>/Modules/Setup to pass the appropriate flags to the compiler. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
11 * -DWITH_PURIFY compiles in the Purify support, and -DWITH_QUANTIFY |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
12 * compiles in the Quantify support. -DWITH_ALL_PURE compiles in both. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
13 * You can also build a Purify'd or Quantify'd interpreter by passing in |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
14 * the LINKCC variable to make. E.g. if you want to build a Purify'd |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
15 * interpreter and are using gcc, build Python with this command: |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
16 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
17 * make LINKCC='purify gcc' |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
18 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
19 * It would be nice (and probably easy) to provide this file as a shared |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
20 * library, however since it doesn't appear that Pure gives us shared |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
21 * libraries of the stubs, it doesn't really matter. For now, you have to |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
22 * link this file in statically. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
23 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
24 * Major bogosity. The purify.h header file exports purify_exit(), but |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
25 * guess what? It is not defined in the libpurify_stubs.a file! I tried |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
26 * to fake one here, hoping the Pure linker would Do The Right Thing when |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
27 * instrumented for Purify, but it doesn't seem to, so I don't export |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
28 * purify_exit() to the Python layer. In Python you should raise a |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
29 * SystemExit exception anyway. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
30 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
31 * The actual purify.h and quantify.h files which embody the APIs are |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
32 * copyrighted by Pure Software, Inc. and are only attainable through them. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
33 * This module assumes you have legally installed licenses of their |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
34 * software. Contact them on the Web via <http://www.pureatria.com/> |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
35 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
36 * Author: Barry Warsaw <bwarsaw@python.org> |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
37 * <bwarsaw@cnri.reston.va.us> |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
38 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
39 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
40 #include "Python.h" |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
41 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
42 #if defined(WITH_PURIFY) || defined(WITH_ALL_PURE) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
43 # include <purify.h> |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
44 # define HAS_PURIFY_EXIT 0 /* See note at top of file */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
45 # define PURE_PURIFY_VERSION 3 /* not provided by purify.h */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
46 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
47 #if defined(WITH_QUANTIFY) || defined(WITH_ALL_PURE) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
48 # include <quantify.h> |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
49 # define PURE_QUANTIFY_VERSION 2 /* not provided by quantify.h */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
50 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
51 #if defined(PURIFY_H) || defined(QUANTIFY_H) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
52 # define COMMON_PURE_FUNCTIONS |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
53 #endif /* PURIFY_H || QUANTIFY_H */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
54 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
55 typedef int (*VoidArgFunc)(void); |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
56 typedef int (*StringArgFunc)(char*); |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
57 typedef int (*PrintfishFunc)(const char*, ...); |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
58 typedef int (*StringIntArgFunc)(const char*, int); |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
59 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
60 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
61 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
62 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
63 call_voidarg_function(VoidArgFunc func, PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
64 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
65 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
66 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
67 if (!PyArg_ParseTuple(args, "")) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
68 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
69 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
70 status = func(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
71 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
72 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
73 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
74 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
75 call_stringarg_function(StringArgFunc func, PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
76 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
77 int status; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
78 char* stringarg; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
79 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
80 if (!PyArg_ParseTuple(args, "s", &stringarg)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
81 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
82 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
83 status = func(stringarg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
84 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
85 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
86 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
87 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
88 call_stringorint_function(StringArgFunc func, PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
89 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
90 int status; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
91 int intarg; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
92 char* stringarg; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
93 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
94 /* according to the quantify.h file, the argument to |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
95 * quantify_*_recording_system_call can be an integer or a string, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
96 * but the functions are prototyped as taking a single char* |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
97 * argument. Yikes! |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
98 */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
99 if (PyArg_ParseTuple(args, "i", &intarg)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
100 /* func is prototyped as int(*)(char*) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
101 * better shut up the compiler |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
102 */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
103 status = func((char*)intarg); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
104 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
105 else { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
106 PyErr_Clear(); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
107 if (!PyArg_ParseTuple(args, "s", &stringarg)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
108 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
109 else |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
110 status = func(stringarg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
111 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
112 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
113 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
114 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
115 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
116 call_printfish_function(PrintfishFunc func, PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
117 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
118 /* we support the printf() style vararg functions by requiring the |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
119 * formatting be done in Python. At the C level we pass just a string |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
120 * to the printf() style function. |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
121 */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
122 int status; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
123 char* argstring; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
124 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
125 if (!PyArg_ParseTuple(args, "s", &argstring)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
126 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
127 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
128 status = func("%s", argstring); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
129 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
130 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
131 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
132 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
133 call_intasaddr_function(StringArgFunc func, PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
134 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
135 long memrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
136 int id; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
137 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
138 if (!PyArg_ParseTuple(args, "l", &memrep)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
139 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
140 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
141 id = func((char*)memrep); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
142 return Py_BuildValue("i", id); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
143 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
144 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
145 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
146 call_stringandint_function(StringIntArgFunc func, PyObject *self, |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
147 PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
148 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
149 long srcrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
150 int size; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
151 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
152 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
153 if (!PyArg_ParseTuple(args, "li", &srcrep, &size)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
154 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
155 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
156 status = func((char*)srcrep, size); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
157 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
158 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
159 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
160 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
161 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
162 /* functions common to all products |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
163 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
164 * N.B. These printf() style functions are a bit of a kludge. Since the |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
165 * API doesn't provide vprintf versions of them, we can't call them |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
166 * directly. They don't support all the standard printf % modifiers |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
167 * anyway. The way to use these is to use Python's % string operator to do |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
168 * the formatting. By the time these functions get the thing to print, |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
169 * it's already a string, and they just use "%s" as the format string. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
170 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
171 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
172 #ifdef COMMON_PURE_FUNCTIONS |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
173 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
174 static PyObject* |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
175 pure_pure_logfile_printf(PyObject* self, PyObject* args) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
176 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
177 return call_printfish_function(pure_logfile_printf, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
178 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
179 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
180 static PyObject* |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
181 pure_pure_printf(PyObject* self, PyObject* args) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
182 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
183 return call_printfish_function(pure_printf, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
184 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
185 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
186 static PyObject* |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
187 pure_pure_printf_with_banner(PyObject* self, PyObject* args) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
188 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
189 return call_printfish_function(pure_printf_with_banner, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
190 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
191 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
192 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
193 #endif /* COMMON_PURE_FUNCTIONS */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
194 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
195 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
196 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
197 /* Purify functions |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
198 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
199 * N.B. There are some interfaces described in the purify.h file that are |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
200 * not described in the manual. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
201 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
202 * Unsigned longs purify_report_{address,number,type,result} are not |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
203 * accessible from the Python layer since they seem mostly useful when |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
204 * purify_stop_here() is called by the (C) debugger. The same is true of |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
205 * the purify_stop_here_internal() function so it isn't exported either. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
206 * And purify_stop_here() should never be called directly. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
207 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
208 * The header file says purify_{new,all,clear_new}_reports() are obsolete |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
209 * so they aren't exported. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
210 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
211 * None of the custom dynamic loader functions are exported. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
212 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
213 * purify_unsafe_memcpy() isn't exported. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
214 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
215 * purify_{start,size}_of_block() aren't exported. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
216 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
217 * The manual that I have says that the prototype for the second argument |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
218 * to purify_map_pool is: |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
219 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
220 * void (*fn)(char*) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
221 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
222 * but the purify.h file declares it as: |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
223 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
224 * void (*fn)(char*, int, void*) |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
225 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
226 * and does not explain what the other arguments are for. I support the |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
227 * latter but I don't know if I do it right or usefully. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
228 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
229 * The header file says that purify_describe() returns a char* which is the |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
230 * pointer passed to it. The manual says it returns an int, but I believe |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
231 * that is a typo. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
232 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
233 #ifdef PURIFY_H |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
234 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
235 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
236 pure_purify_all_inuse(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
237 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
238 return call_voidarg_function(purify_all_inuse, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
239 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
240 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
241 pure_purify_all_leaks(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
242 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
243 return call_voidarg_function(purify_all_leaks, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
244 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
245 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
246 pure_purify_new_inuse(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
247 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
248 return call_voidarg_function(purify_new_inuse, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
249 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
250 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
251 pure_purify_new_leaks(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
252 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
253 return call_voidarg_function(purify_new_leaks, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
254 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
255 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
256 pure_purify_clear_inuse(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
257 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
258 return call_voidarg_function(purify_clear_inuse, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
259 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
260 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
261 pure_purify_clear_leaks(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
262 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
263 return call_voidarg_function(purify_clear_leaks, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
264 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
265 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
266 pure_purify_all_fds_inuse(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
267 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
268 return call_voidarg_function(purify_all_fds_inuse, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
269 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
270 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
271 pure_purify_new_fds_inuse(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
272 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
273 return call_voidarg_function(purify_new_fds_inuse, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
274 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
275 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
276 pure_purify_printf_with_call_chain(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
277 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
278 return call_printfish_function(purify_printf_with_call_chain, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
279 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
280 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
281 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
282 pure_purify_set_pool_id(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
283 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
284 long memrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
285 int id; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
286 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
287 if (!PyArg_ParseTuple(args, "li:purify_set_pool_id", &memrep, &id)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
288 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
289 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
290 purify_set_pool_id((char*)memrep, id); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
291 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
292 return Py_None; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
293 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
294 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
295 pure_purify_get_pool_id(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
296 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
297 return call_intasaddr_function(purify_get_pool_id, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
298 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
299 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
300 pure_purify_set_user_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
301 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
302 long memrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
303 long datarep; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
304 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
305 if (!PyArg_ParseTuple(args, "ll:purify_set_user_data", &memrep, &datarep)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
306 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
307 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
308 purify_set_user_data((char*)memrep, (void*)datarep); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
309 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
310 return Py_None; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
311 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
312 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
313 pure_purify_get_user_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
314 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
315 /* can't use call_intasaddr_function() since purify_get_user_data() |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
316 * returns a void* |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
317 */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
318 long memrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
319 void* data; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
320 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
321 if (!PyArg_ParseTuple(args, "l:purify_get_user_data", &memrep)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
322 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
323 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
324 data = purify_get_user_data((char*)memrep); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
325 return Py_BuildValue("l", (long)data); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
326 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
327 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
328 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
329 /* this global variable is shared by both mapping functions: |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
330 * pure_purify_map_pool() and pure_purify_map_pool_id(). Since they cache |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
331 * this variable it should be safe in the face of recursion or cross |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
332 * calling. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
333 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
334 * Further note that the prototype for the callback function is wrong in |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
335 * the Purify manual. The manual says the function takes a single char*, |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
336 * but the header file says it takes an additional int and void*. I have |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
337 * no idea what these are for! |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
338 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
339 static PyObject* MapCallable = NULL; |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
340 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
341 static void |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
342 map_pool_callback(char* mem, int user_size, void *user_aux_data) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
343 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
344 long memrep = (long)mem; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
345 long user_aux_data_rep = (long)user_aux_data; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
346 PyObject* result; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
347 PyObject* memobj = Py_BuildValue("lil", memrep, user_size, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
348 user_aux_data_rep); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
349 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
350 if (memobj == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
351 return; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
352 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
353 result = PyEval_CallObject(MapCallable, memobj); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
354 Py_DECREF(result); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
355 Py_DECREF(memobj); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
356 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
357 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
358 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
359 pure_purify_map_pool(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
360 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
361 /* cache global variable in case of recursion */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
362 PyObject* saved_callable = MapCallable; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
363 PyObject* arg_callable; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
364 int id; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
365 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
366 if (!PyArg_ParseTuple(args, "iO:purify_map_pool", &id, &arg_callable)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
367 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
368 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
369 if (!PyCallable_Check(arg_callable)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
370 PyErr_SetString(PyExc_TypeError, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
371 "Second argument must be callable"); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
372 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
373 } |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
374 MapCallable = arg_callable; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
375 purify_map_pool(id, map_pool_callback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
376 MapCallable = saved_callable; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
377 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
378 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
379 return Py_None; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
380 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
381 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
382 static void |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
383 PurifyMapPoolIdCallback(int id) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
384 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
385 PyObject* result; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
386 PyObject* intobj = Py_BuildValue("i", id); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
387 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
388 if (intobj == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
389 return; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
390 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
391 result = PyEval_CallObject(MapCallable, intobj); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
392 Py_DECREF(result); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
393 Py_DECREF(intobj); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
394 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
395 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
396 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
397 pure_purify_map_pool_id(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
398 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
399 /* cache global variable in case of recursion */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
400 PyObject* saved_callable = MapCallable; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
401 PyObject* arg_callable; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
402 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
403 if (!PyArg_ParseTuple(args, "O:purify_map_pool_id", &arg_callable)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
404 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
405 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
406 if (!PyCallable_Check(arg_callable)) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
407 PyErr_SetString(PyExc_TypeError, "Argument must be callable."); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
408 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
409 } |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
410 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
411 MapCallable = arg_callable; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
412 purify_map_pool_id(PurifyMapPoolIdCallback); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
413 MapCallable = saved_callable; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
414 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
415 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
416 return Py_None; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
417 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
418 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
419 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
420 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
421 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
422 pure_purify_new_messages(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
423 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
424 return call_voidarg_function(purify_new_messages, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
425 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
426 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
427 pure_purify_all_messages(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
428 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
429 return call_voidarg_function(purify_all_messages, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
430 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
431 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
432 pure_purify_clear_messages(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
433 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
434 return call_voidarg_function(purify_clear_messages, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
435 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
436 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
437 pure_purify_clear_new_messages(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
438 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
439 return call_voidarg_function(purify_clear_new_messages, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
440 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
441 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
442 pure_purify_start_batch(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
443 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
444 return call_voidarg_function(purify_start_batch, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
445 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
446 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
447 pure_purify_start_batch_show_first(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
448 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
449 return call_voidarg_function(purify_start_batch_show_first, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
450 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
451 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
452 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
453 pure_purify_stop_batch(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
454 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
455 return call_voidarg_function(purify_stop_batch, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
456 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
457 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
458 pure_purify_name_thread(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
459 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
460 /* can't strictly use call_stringarg_function since |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
461 * purify_name_thread takes a const char*, not a char* |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
462 */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
463 int status; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
464 char* stringarg; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
465 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
466 if (!PyArg_ParseTuple(args, "s:purify_name_thread", &stringarg)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
467 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
468 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
469 status = purify_name_thread(stringarg); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
470 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
471 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
472 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
473 pure_purify_watch(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
474 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
475 return call_intasaddr_function(purify_watch, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
476 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
477 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
478 pure_purify_watch_1(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
479 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
480 return call_intasaddr_function(purify_watch_1, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
481 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
482 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
483 pure_purify_watch_2(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
484 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
485 return call_intasaddr_function(purify_watch_2, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
486 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
487 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
488 pure_purify_watch_4(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
489 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
490 return call_intasaddr_function(purify_watch_4, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
491 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
492 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
493 pure_purify_watch_8(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
494 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
495 return call_intasaddr_function(purify_watch_8, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
496 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
497 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
498 pure_purify_watch_w_1(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
499 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
500 return call_intasaddr_function(purify_watch_w_1, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
501 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
502 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
503 pure_purify_watch_w_2(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
504 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
505 return call_intasaddr_function(purify_watch_w_2, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
506 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
507 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
508 pure_purify_watch_w_4(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
509 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
510 return call_intasaddr_function(purify_watch_w_4, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
511 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
512 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
513 pure_purify_watch_w_8(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
514 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
515 return call_intasaddr_function(purify_watch_w_8, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
516 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
517 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
518 pure_purify_watch_r_1(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
519 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
520 return call_intasaddr_function(purify_watch_r_1, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
521 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
522 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
523 pure_purify_watch_r_2(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
524 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
525 return call_intasaddr_function(purify_watch_r_2, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
526 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
527 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
528 pure_purify_watch_r_4(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
529 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
530 return call_intasaddr_function(purify_watch_r_4, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
531 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
532 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
533 pure_purify_watch_r_8(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
534 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
535 return call_intasaddr_function(purify_watch_r_8, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
536 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
537 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
538 pure_purify_watch_rw_1(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
539 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
540 return call_intasaddr_function(purify_watch_rw_1, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
541 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
542 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
543 pure_purify_watch_rw_2(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
544 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
545 return call_intasaddr_function(purify_watch_rw_2, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
546 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
547 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
548 pure_purify_watch_rw_4(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
549 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
550 return call_intasaddr_function(purify_watch_rw_4, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
551 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
552 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
553 pure_purify_watch_rw_8(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
554 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
555 return call_intasaddr_function(purify_watch_rw_8, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
556 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
557 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
558 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
559 pure_purify_watch_n(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
560 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
561 long addrrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
562 unsigned int size; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
563 char* type; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
564 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
565 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
566 if (!PyArg_ParseTuple(args, "lis:purify_watch_n", &addrrep, &size, &type)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
567 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
568 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
569 status = purify_watch_n((char*)addrrep, size, type); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
570 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
571 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
572 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
573 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
574 pure_purify_watch_info(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
575 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
576 return call_voidarg_function(purify_watch_info, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
577 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
578 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
579 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
580 pure_purify_watch_remove(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
581 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
582 int watchno; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
583 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
584 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
585 if (!PyArg_ParseTuple(args, "i:purify_watch_remove", &watchno)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
586 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
587 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
588 status = purify_watch_remove(watchno); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
589 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
590 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
591 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
592 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
593 pure_purify_watch_remove_all(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
594 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
595 return call_voidarg_function(purify_watch_remove_all, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
596 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
597 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
598 pure_purify_describe(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
599 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
600 long addrrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
601 char* rtn; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
602 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
603 if (!PyArg_ParseTuple(args, "l:purify_describe", &addrrep)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
604 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
605 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
606 rtn = purify_describe((char*)addrrep); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
607 return Py_BuildValue("l", (long)rtn); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
608 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
609 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
610 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
611 pure_purify_what_colors(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
612 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
613 long addrrep; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
614 unsigned int size; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
615 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
616 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
617 if (!PyArg_ParseTuple(args, "li:purify_what_colors", &addrrep, &size)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
618 return NULL; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
619 |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
620 status = purify_what_colors((char*)addrrep, size); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
621 return Py_BuildValue("i", status); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
622 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
623 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
624 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
625 pure_purify_is_running(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
626 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
627 return call_voidarg_function(purify_is_running, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
628 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
629 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
630 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
631 pure_purify_assert_is_readable(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
632 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
633 return call_stringandint_function(purify_assert_is_readable, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
634 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
635 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
636 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
637 pure_purify_assert_is_writable(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
638 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
639 return call_stringandint_function(purify_assert_is_writable, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
640 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
641 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
642 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
643 #if HAS_PURIFY_EXIT |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
644 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
645 /* I wish I could include this, but I can't. See the notes at the top of |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
646 * the file. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
647 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
648 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
649 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
650 pure_purify_exit(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
651 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
652 int status; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
653 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
654 if (!PyArg_ParseTuple(args, "i:purify_exit", &status)) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
655 return NULL; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
656 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
657 /* purify_exit doesn't always act like exit(). See the manual */ |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
658 purify_exit(status); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
659 Py_INCREF(Py_None); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
660 return Py_None; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
661 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
662 #endif /* HAS_PURIFY_EXIT */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
663 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
664 #endif /* PURIFY_H */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
665 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
666 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
667 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
668 /* Quantify functions |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
669 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
670 * N.B. Some of these functions are only described in the quantify.h file, |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
671 * not in the version of the hardcopy manual that I had. If you're not |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
672 * sure what some of these do, check the header file, it is documented |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
673 * fairly well. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
674 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
675 * None of the custom dynamic loader functions are exported. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
676 * |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
677 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
678 #ifdef QUANTIFY_H |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
679 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
680 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
681 pure_quantify_is_running(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
682 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
683 return call_voidarg_function(quantify_is_running, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
684 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
685 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
686 pure_quantify_help(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
687 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
688 return call_voidarg_function(quantify_help, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
689 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
690 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
691 pure_quantify_print_recording_state(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
692 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
693 return call_voidarg_function(quantify_print_recording_state, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
694 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
695 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
696 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
697 pure_quantify_start_recording_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
698 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
699 return call_voidarg_function(quantify_start_recording_data, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
700 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
701 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
702 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
703 pure_quantify_stop_recording_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
704 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
705 return call_voidarg_function(quantify_stop_recording_data, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
706 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
707 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
708 pure_quantify_is_recording_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
709 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
710 return call_voidarg_function(quantify_is_recording_data, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
711 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
712 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
713 pure_quantify_start_recording_system_calls(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
714 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
715 return call_voidarg_function(quantify_start_recording_system_calls, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
716 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
717 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
718 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
719 pure_quantify_stop_recording_system_calls(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
720 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
721 return call_voidarg_function(quantify_stop_recording_system_calls, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
722 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
723 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
724 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
725 pure_quantify_is_recording_system_calls(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
726 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
727 return call_voidarg_function(quantify_is_recording_system_calls, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
728 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
729 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
730 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
731 pure_quantify_start_recording_system_call(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
732 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
733 return call_stringorint_function(quantify_start_recording_system_call, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
734 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
735 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
736 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
737 pure_quantify_stop_recording_system_call(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
738 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
739 return call_stringorint_function(quantify_stop_recording_system_call, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
740 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
741 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
742 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
743 pure_quantify_is_recording_system_call(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
744 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
745 return call_stringorint_function(quantify_is_recording_system_call, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
746 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
747 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
748 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
749 pure_quantify_start_recording_dynamic_library_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
750 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
751 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
752 quantify_start_recording_dynamic_library_data, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
753 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
754 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
755 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
756 pure_quantify_stop_recording_dynamic_library_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
757 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
758 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
759 quantify_stop_recording_dynamic_library_data, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
760 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
761 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
762 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
763 pure_quantify_is_recording_dynamic_library_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
764 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
765 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
766 quantify_is_recording_dynamic_library_data, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
767 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
768 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
769 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
770 pure_quantify_start_recording_register_window_traps(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
771 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
772 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
773 quantify_start_recording_register_window_traps, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
774 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
775 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
776 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
777 pure_quantify_stop_recording_register_window_traps(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
778 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
779 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
780 quantify_stop_recording_register_window_traps, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
781 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
782 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
783 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
784 pure_quantify_is_recording_register_window_traps(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
785 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
786 return call_voidarg_function( |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
787 quantify_is_recording_register_window_traps, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
788 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
789 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
790 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
791 pure_quantify_disable_recording_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
792 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
793 return call_voidarg_function(quantify_disable_recording_data, |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
794 self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
795 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
796 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
797 pure_quantify_clear_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
798 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
799 return call_voidarg_function(quantify_clear_data, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
800 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
801 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
802 pure_quantify_save_data(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
803 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
804 return call_voidarg_function(quantify_save_data, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
805 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
806 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
807 pure_quantify_save_data_to_file(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
808 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
809 return call_stringarg_function(quantify_save_data_to_file, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
810 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
811 static PyObject* |
|
14058
f69a372409fc
ANSI-fy function headers. Not much more can be done since I don't
Barry Warsaw <barry@python.org>
parents:
11882
diff
changeset
|
812 pure_quantify_add_annotation(PyObject *self, PyObject *args) |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
813 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
814 return call_stringarg_function(quantify_add_annotation, self, args); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
815 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
816 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
817 #endif /* QUANTIFY_H */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
818 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
819 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
820 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
821 /* external interface |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
822 */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
823 static struct PyMethodDef |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
824 pure_methods[] = { |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
825 #ifdef COMMON_PURE_FUNCTIONS |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
826 {"pure_logfile_printf", pure_pure_logfile_printf, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
827 {"pure_printf", pure_pure_printf, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
828 {"pure_printf_with_banner", pure_pure_printf_with_banner, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
829 #endif /* COMMON_PURE_FUNCTIONS */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
830 #ifdef PURIFY_H |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
831 {"purify_all_inuse", pure_purify_all_inuse, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
832 {"purify_all_leaks", pure_purify_all_leaks, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
833 {"purify_new_inuse", pure_purify_new_inuse, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
834 {"purify_new_leaks", pure_purify_new_leaks, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
835 {"purify_clear_inuse", pure_purify_clear_inuse, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
836 {"purify_clear_leaks", pure_purify_clear_leaks, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
837 {"purify_all_fds_inuse", pure_purify_all_fds_inuse, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
838 {"purify_new_fds_inuse", pure_purify_new_fds_inuse, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
839 /* see purify.h */ |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
840 {"purify_logfile_printf", pure_pure_logfile_printf, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
841 {"purify_printf", pure_pure_printf, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
842 {"purify_printf_with_banner", pure_pure_printf_with_banner, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
843 /**/ |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
844 {"purify_printf_with_call_chain", pure_purify_printf_with_call_chain, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
845 {"purify_set_pool_id", pure_purify_set_pool_id, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
846 {"purify_get_pool_id", pure_purify_get_pool_id, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
847 {"purify_set_user_data", pure_purify_set_user_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
848 {"purify_get_user_data", pure_purify_get_user_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
849 {"purify_map_pool", pure_purify_map_pool, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
850 {"purify_map_pool_id", pure_purify_map_pool_id, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
851 {"purify_new_messages", pure_purify_new_messages, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
852 {"purify_all_messages", pure_purify_all_messages, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
853 {"purify_clear_messages", pure_purify_clear_messages, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
854 {"purify_clear_new_messages", pure_purify_clear_new_messages, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
855 {"purify_start_batch", pure_purify_start_batch, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
856 {"purify_start_batch_show_first", pure_purify_start_batch_show_first, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
857 {"purify_stop_batch", pure_purify_stop_batch, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
858 {"purify_name_thread", pure_purify_name_thread, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
859 {"purify_watch", pure_purify_watch, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
860 {"purify_watch_1", pure_purify_watch_1, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
861 {"purify_watch_2", pure_purify_watch_2, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
862 {"purify_watch_4", pure_purify_watch_4, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
863 {"purify_watch_8", pure_purify_watch_8, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
864 {"purify_watch_w_1", pure_purify_watch_w_1, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
865 {"purify_watch_w_2", pure_purify_watch_w_2, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
866 {"purify_watch_w_4", pure_purify_watch_w_4, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
867 {"purify_watch_w_8", pure_purify_watch_w_8, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
868 {"purify_watch_r_1", pure_purify_watch_r_1, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
869 {"purify_watch_r_2", pure_purify_watch_r_2, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
870 {"purify_watch_r_4", pure_purify_watch_r_4, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
871 {"purify_watch_r_8", pure_purify_watch_r_8, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
872 {"purify_watch_rw_1", pure_purify_watch_rw_1, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
873 {"purify_watch_rw_2", pure_purify_watch_rw_2, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
874 {"purify_watch_rw_4", pure_purify_watch_rw_4, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
875 {"purify_watch_rw_8", pure_purify_watch_rw_8, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
876 {"purify_watch_n", pure_purify_watch_n, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
877 {"purify_watch_info", pure_purify_watch_info, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
878 {"purify_watch_remove", pure_purify_watch_remove, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
879 {"purify_watch_remove_all", pure_purify_watch_remove_all, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
880 {"purify_describe", pure_purify_describe, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
881 {"purify_what_colors", pure_purify_what_colors, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
882 {"purify_is_running", pure_purify_is_running, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
883 {"purify_assert_is_readable", pure_purify_assert_is_readable, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
884 {"purify_assert_is_writable", pure_purify_assert_is_writable, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
885 #if HAS_PURIFY_EXIT |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
886 /* I wish I could include this, but I can't. See the notes at the |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
887 * top of the file. |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
888 */ |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
889 {"purify_exit", pure_purify_exit, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
890 #endif /* HAS_PURIFY_EXIT */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
891 #endif /* PURIFY_H */ |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
892 #ifdef QUANTIFY_H |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
893 {"quantify_is_running", pure_quantify_is_running, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
894 {"quantify_help", pure_quantify_help, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
895 {"quantify_print_recording_state", pure_quantify_print_recording_state, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
896 {"quantify_start_recording_data", pure_quantify_start_recording_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
897 {"quantify_stop_recording_data", pure_quantify_stop_recording_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
898 {"quantify_is_recording_data", pure_quantify_is_recording_data, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
899 {"quantify_start_recording_system_calls", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
900 pure_quantify_start_recording_system_calls, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
901 {"quantify_stop_recording_system_calls", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
902 pure_quantify_stop_recording_system_calls, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
903 {"quantify_is_recording_system_calls", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
904 pure_quantify_is_recording_system_calls, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
905 {"quantify_start_recording_system_call", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
906 pure_quantify_start_recording_system_call, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
907 {"quantify_stop_recording_system_call", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
908 pure_quantify_stop_recording_system_call, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
909 {"quantify_is_recording_system_call", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
910 pure_quantify_is_recording_system_call, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
911 {"quantify_start_recording_dynamic_library_data", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
912 pure_quantify_start_recording_dynamic_library_data, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
913 {"quantify_stop_recording_dynamic_library_data", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
914 pure_quantify_stop_recording_dynamic_library_data, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
915 {"quantify_is_recording_dynamic_library_data", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
916 pure_quantify_is_recording_dynamic_library_data, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
917 {"quantify_start_recording_register_window_traps", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
918 pure_quantify_start_recording_register_window_traps, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
919 {"quantify_stop_recording_register_window_traps", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
920 pure_quantify_stop_recording_register_window_traps, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
921 {"quantify_is_recording_register_window_traps", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
922 pure_quantify_is_recording_register_window_traps, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
923 {"quantify_disable_recording_data", |
|
21757
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
924 pure_quantify_disable_recording_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
925 {"quantify_clear_data", pure_quantify_clear_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
926 {"quantify_save_data", pure_quantify_save_data, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
927 {"quantify_save_data_to_file", pure_quantify_save_data_to_file, METH_VARARGS}, |
|
40631ae74b17
Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents:
14346
diff
changeset
|
928 {"quantify_add_annotation", pure_quantify_add_annotation, METH_VARARGS}, |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
929 #endif /* QUANTIFY_H */ |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
930 {NULL, NULL} /* sentinel */ |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
931 }; |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
932 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
933 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
934 |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
935 static void |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
936 ins(d, name, val) |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
937 PyObject *d; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
938 char* name; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
939 long val; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
940 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
941 PyObject *v = PyInt_FromLong(val); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
942 if (v) { |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
943 (void)PyDict_SetItemString(d, name, v); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
944 Py_DECREF(v); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
945 } |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
946 } |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
947 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
948 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
949 void |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
950 initpure() |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
951 { |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
952 PyObject *m, *d; |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
953 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
954 if (PyErr_WarnPy3k("the pure module has been removed in " |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
955 "Python 3.0", 2) < 0) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
956 return; |
|
46807
c56e83d08d0b
Deprecate the pure module for 3.0.
Brett Cannon <bcannon@gmail.com>
parents:
36324
diff
changeset
|
957 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
958 m = Py_InitModule("pure", pure_methods); |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
959 if (m == NULL) |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
960 return; |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
961 d = PyModule_GetDict(m); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
962 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
963 /* this is bogus because we should be able to find this information |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
964 * out from the header files. Pure's current versions don't |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
965 * include this information! |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
966 */ |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
967 #ifdef PURE_PURIFY_VERSION |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
968 ins(d, "PURIFY_VERSION", PURE_PURIFY_VERSION); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
969 #else |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
970 PyDict_SetItemString(d, "PURIFY_VERSION", Py_None); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
971 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
972 |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
973 /* these aren't terribly useful because purify_exit() isn't |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
974 * exported correctly. See the note at the top of the file. |
|
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
975 */ |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
976 #ifdef PURIFY_EXIT_ERRORS |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
977 ins(d, "PURIFY_EXIT_ERRORS", PURIFY_EXIT_ERRORS); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
978 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
979 #ifdef PURIFY_EXIT_LEAKS |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
980 ins(d, "PURIFY_EXIT_LEAKS", PURIFY_EXIT_LEAKS); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
981 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
982 #ifdef PURIFY_EXIT_PLEAKS |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
983 ins(d, "PURIFY_EXIT_PLEAKS", PURIFY_EXIT_PLEAKS); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
984 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
985 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
986 |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
987 #ifdef PURE_QUANTIFY_VERSION |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
988 ins(d, "QUANTIFY_VERSION", PURE_QUANTIFY_VERSION); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
989 #else |
|
61463
fd25030223b0
Untabify C files. Will watch buildbots.
Antoine Pitrou <solipsis@pitrou.net>
parents:
46807
diff
changeset
|
990 PyDict_SetItemString(d, "QUANTIFY_VERSION", Py_None); |
|
4981
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
991 #endif |
|
994376af9064
(puremodule.c): New module which exports the Purify and Quantify C API
Barry Warsaw <barry@python.org>
parents:
diff
changeset
|
992 } |
