Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1733)

Side by Side Diff: Modules/dtracemodule.c

Issue 13405: Add DTrace probes
Patch Set: Created 1 year, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Makefile.pre.in ('k') | Modules/gcmodule.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "Python.h"
2
3 static PyMethodDef dtrace_methods[] = {
4 {NULL, NULL} /* sentinel */
5 };
6
7
8 static struct PyModuleDef dtracemodule = {
9 PyModuleDef_HEAD_INIT,
10 "dtrace",
11 NULL,
12 -1,
13 dtrace_methods,
14 NULL,
15 NULL,
16 NULL,
17 NULL
18 };
19
20 PyMODINIT_FUNC
21 PyInit_dtrace(void)
22 {
23 PyObject *m, *v;
24
25 m = PyModule_Create(&dtracemodule);
26 if (m) {
27 #ifdef WITH_DTRACE
28 v = Py_True;
29 #else
30 v = Py_False;
31 #endif
32 Py_INCREF(v);
33 if (PyModule_AddObject(m, "available", v) < 0) {
34 Py_DECREF(m);
35 return NULL;
36 }
37 }
38 return m;
39 }
OLDNEW
« no previous file with comments | « Makefile.pre.in ('k') | Modules/gcmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7