Commit e886ea91 authored by Barry Warsaw's avatar Barry Warsaw

(puremodule.c): New module which exports the Purify and Quantify C API

to Python.  Minimal documentation is included in comments at the top
of the file, and in the Misc/PURIFY.README file.  Note that this
module must be statically linked since Pure doesn't provide shared
stubs libraries.

(Setup.in): Added commented template for pure module

(syslogmodule.c): ins() function wasn't declared static.
parent bb779ec4
......@@ -101,6 +101,13 @@ signal signalmodule.c # signal(2)
#thread threadmodule.c
# Pure module. Cannot be linked dynamically.
# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
#WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE
#PURE_INCLS=-I/usr/local/include
#PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs
#pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS)
# Uncommenting the following line tells makesetup that all following
# modules are to be built as shared libraries (see above for more
# detail):
......
This diff is collapsed.
......@@ -155,14 +155,17 @@ static PyMethodDef syslog_methods[] = {
/* Initialization function for the module */
void ins(d, s, x)
static void
ins(d, s, x)
PyObject *d;
char *s;
long x;
{
PyObject *xl = PyInt_FromLong(x);
PyDict_SetItemString(d, s, xl);
Py_XDECREF(xl);
PyObject *v = PyInt_FromLong(x);
if (v) {
PyDict_SetItemString(d, s, v);
Py_DECREF(v);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment