diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 20:33:56 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 20:33:56 +0000 |
commit | e6eb7b5307da2a446e1c8c6b0cb6b11fc6705b00 (patch) | |
tree | 3315ae510245c0a0b4d791b7c1d73f1bc01afdce /_dbus_bindings/module.c | |
parent | 73457d0e435f4a9be9a9980fb06dd004b87c6647 (diff) | |
download | dbus-python-e6eb7b5307da2a446e1c8c6b0cb6b11fc6705b00.tar.gz |
Switch to autotools and test with Python 2.5 as well as 2.4.
In the process:
HACKING.txt: update
include/dbus-python.h: add some typedefs to make it saner
bus.c, conn.c, conn-methods.c: further alter docstrings to keep epydoc happy
exceptions.c: create exceptions in a more longwinded way for Python 2.5 compatibility
message-get-args.c, bus/__init__.py: tweak docstrings
dbus/introspect_parser.py: make docstring valid reStructuredText
run-test.sh: simplify, since configure now does some of the work
test/*.py: use paths from run-test.sh, cope with out-of-tree builds
test-standalone.py: carry out additional sanity checks
Diffstat (limited to '_dbus_bindings/module.c')
-rw-r--r-- | _dbus_bindings/module.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/_dbus_bindings/module.c b/_dbus_bindings/module.c index 3e0e932..616579c 100644 --- a/_dbus_bindings/module.c +++ b/_dbus_bindings/module.c @@ -21,6 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include "config.h" #include <Python.h> #include <structmember.h> @@ -237,11 +238,11 @@ init_dbus_bindings(void) { PyObject *this_module, *c_api; static const int API_count = DBUS_BINDINGS_API_COUNT; - static void *dbus_bindings_API[DBUS_BINDINGS_API_COUNT]; + static _dbus_py_func_ptr dbus_bindings_API[DBUS_BINDINGS_API_COUNT]; - dbus_bindings_API[0] = (void *)&API_count; - dbus_bindings_API[1] = (void *)Connection_BorrowDBusConnection; - dbus_bindings_API[2] = (void *)NativeMainLoop_New4; + dbus_bindings_API[0] = (_dbus_py_func_ptr)&API_count; + dbus_bindings_API[1] = (_dbus_py_func_ptr)DBusPyConnection_BorrowDBusConnection; + dbus_bindings_API[2] = (_dbus_py_func_ptr)DBusPyNativeMainLoop_New4; default_main_loop = NULL; @@ -354,6 +355,12 @@ init_dbus_bindings(void) if (PyModule_AddStringConstant(this_module, "__docformat__", "restructuredtext") < 0) return; + if (PyModule_AddStringConstant(this_module, "__version__", + PACKAGE_VERSION) < 0) return; + + if (PyModule_AddIntConstant(this_module, "_python_version", + PY_VERSION_HEX) < 0) return; + c_api = PyCObject_FromVoidPtr ((void *)dbus_bindings_API, NULL); if (!c_api) { return; |