Erik Grinaker is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againRevelation / wrap / authmanagermodule.c
- commit
- 8d3661dc2974
- parent
- 117efb089a91
- branch
- default
- tags
- revelation-0.4.0-pre1
don't use stock module
1 |
5d99fc2aa75a
|
#include <Python.h> |
2 |
5d99fc2aa75a
|
#include "pygobject.h" |
3 |
5d99fc2aa75a
|
|
4 |
5d99fc2aa75a
|
void authmanager_register_classes (PyObject *d); |
5 |
5d99fc2aa75a
|
extern PyMethodDef authmanager_functions[]; |
6 |
5d99fc2aa75a
|
|
7 |
5d99fc2aa75a
|
DL_EXPORT(void) |
8 |
5d99fc2aa75a
|
initauthmanager(void) |
9 |
5d99fc2aa75a
|
{ |
10 |
5d99fc2aa75a
|
PyObject *m, *d; |
11 |
5d99fc2aa75a
|
|
12 |
5d99fc2aa75a
|
init_pygobject (); |
13 |
5d99fc2aa75a
|
m = Py_InitModule ("authmanager", authmanager_functions); |
14 |
5d99fc2aa75a
|
d = PyModule_GetDict(m); |
15 |
5d99fc2aa75a
|
|
16 |
5d99fc2aa75a
|
authmanager_register_classes (d); |
17 |
5d99fc2aa75a
|
|
18 |
5d99fc2aa75a
|
if (PyErr_Occurred ()) { |
19 |
5d99fc2aa75a
|
Py_FatalError ("can't initialize module authmanager"); |
20 |
5d99fc2aa75a
|
} |
21 |
5d99fc2aa75a
|
} |
22 |
5d99fc2aa75a
|