mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
(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.
This commit is contained in:
parent
bb779ec4d9
commit
e886ea916e
3 changed files with 1169 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue