File: common.c

package info (click to toggle)
python-ldap 1.9.999.pre04-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 312 kB
  • ctags: 475
  • sloc: ansic: 2,973; python: 1,141; makefile: 84; sh: 4
file content (22 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* David Leonard <david.leonard@csee.uq.edu.au>, 1999. Public domain. */

/*
 * Miscellaneous common routines
 * $Id: common.c,v 1.1 2000/07/27 16:08:58 leonard Exp $
 */

#include "common.h"

/* dynamically add the methods into the module dictionary d */

void
LDAPadd_methods( PyObject* d, PyMethodDef* methods ) 
{
    PyMethodDef *meth;

    for( meth = methods; meth->ml_meth; meth++ ) {
        PyObject *f = PyCFunction_New( meth, NULL );
        PyDict_SetItemString( d, meth->ml_name, f );
        Py_DECREF(f);
    }
}