diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 12:03:27 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 12:03:27 +0000 |
commit | 358403cd0cba20ccda4961a39644c092a0f05b74 (patch) | |
tree | b15809f59616a487df2d3564f592dc8db57bf240 | |
parent | f4bb2ca522a39fbbf2cce536410c973a73b9059c (diff) |
include/dbus_bindings.h: Rename to include/dbus-python.h, improve namespacing.
_dbus_bindings/conn-internal.h, _dbus_bindings/dbus_bindings-internal.h,
_dbus_glib_bindings/module.c: Use dbus-python.h instead of dbus_bindings.h
-rw-r--r-- | _dbus_bindings/conn-internal.h | 2 | ||||
-rw-r--r-- | _dbus_bindings/dbus_bindings-internal.h | 4 | ||||
-rw-r--r-- | _dbus_glib_bindings/module.c | 13 | ||||
-rw-r--r-- | include/dbus-python.h (renamed from include/dbus_bindings.h) | 6 |
4 files changed, 13 insertions, 12 deletions
diff --git a/_dbus_bindings/conn-internal.h b/_dbus_bindings/conn-internal.h index 4ae0dee..b34d737 100644 --- a/_dbus_bindings/conn-internal.h +++ b/_dbus_bindings/conn-internal.h @@ -24,7 +24,7 @@ #ifndef DBUS_BINDINGS_CONN_H #define DBUS_BINDINGS_CONN_H -#include "dbus_bindings.h" +#include "dbus_bindings-internal.h" typedef struct { PyObject_HEAD diff --git a/_dbus_bindings/dbus_bindings-internal.h b/_dbus_bindings/dbus_bindings-internal.h index 82b52ba..aedb343 100644 --- a/_dbus_bindings/dbus_bindings-internal.h +++ b/_dbus_bindings/dbus_bindings-internal.h @@ -26,8 +26,8 @@ #define DBUS_BINDINGS_INTERNAL_H #include <Python.h> -#define INSIDE_DBUS_BINDINGS -#include "dbus_bindings.h" +#define INSIDE_DBUS_PYTHON_BINDINGS +#include "dbus-python.h" /* no need for extern "C", this is only for internal use */ diff --git a/_dbus_glib_bindings/module.c b/_dbus_glib_bindings/module.c index a3225c6..ddd0ef2 100644 --- a/_dbus_glib_bindings/module.c +++ b/_dbus_glib_bindings/module.c @@ -23,7 +23,7 @@ */ #include <Python.h> -#include "dbus_bindings.h" +#include "dbus-python.h" #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> @@ -68,10 +68,11 @@ dbus_py_glib_unref_mainctx(void *data) static PyObject * dbus_glib_native_mainloop(GMainContext *ctx) { - PyObject *loop = NativeMainLoop_New4(dbus_py_glib_set_up_conn, - dbus_py_glib_set_up_srv, - dbus_py_glib_unref_mainctx, - ctx ? g_main_context_ref(ctx) : NULL); + PyObject *loop = DBusPyNativeMainLoop_New4(dbus_py_glib_set_up_conn, + dbus_py_glib_set_up_srv, + dbus_py_glib_unref_mainctx, + ctx ? g_main_context_ref(ctx) + : NULL); if (!loop && ctx) { g_main_context_unref(ctx); } @@ -141,7 +142,7 @@ setup_with_g_main (PyObject *always_null UNUSED, PyObject *args) PyObject *conn; if (!PyArg_ParseTuple(args, "O:setup_with_g_main", &conn)) return NULL; - dbc = Connection_BorrowDBusConnection (conn); + dbc = DBusPyConnection_BorrowDBusConnection (conn); if (!dbc) return NULL; dbus_py_glib_set_up_conn(dbc, NULL); Py_RETURN_NONE; diff --git a/include/dbus_bindings.h b/include/dbus-python.h index bd1ee55..9d6d581 100644 --- a/include/dbus_bindings.h +++ b/include/dbus-python.h @@ -33,7 +33,7 @@ DBUS_BEGIN_DECLS #define DBUS_BINDINGS_API_COUNT 3 -#ifdef INSIDE_DBUS_BINDINGS +#ifdef INSIDE_DBUS_PYTHON_BINDINGS #define Connection_BorrowDBusConnection DBusPyConnection_BorrowDBusConnection #define NativeMainLoop_New4 DBusPyNativeMainLoop_New4 @@ -48,9 +48,9 @@ extern PyObject *DBusPyNativeMainLoop_New4(dbus_bool_t (*)(DBusConnection *, voi static PyObject *_dbus_bindings_module = NULL; static void **dbus_bindings_API; -#define Connection_BorrowDBusConnection \ +#define DBusPyConnection_BorrowDBusConnection \ (*(DBusConnection *(*)(PyObject *))dbus_bindings_API[1]) -#define NativeMainLoop_New4 \ +#define DBusPyNativeMainLoop_New4 \ ((PyObject *(*)(dbus_bool_t (*)(DBusConnection *, void *),\ dbus_bool_t (*)(DBusServer *, void *),\ void (*)(void *),\ |