From 2f29429e88151bd91228f05181075d95f4e9732c Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 14 Oct 2010 00:54:16 +0100 Subject: [PATCH] Expose the Xid object in the extension module. --- lib/extensions.py | 2 +- psycopg/psycopgmodule.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/extensions.py b/lib/extensions.py index 3fd9803f..fca79738 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -56,7 +56,7 @@ try: except: pass -from _psycopg import adapt, adapters, encodings, connection, cursor, lobject +from _psycopg import adapt, adapters, encodings, connection, cursor, lobject, Xid from _psycopg import string_types, binary_types, new_type, register_type from _psycopg import ISQLQuote, Notify diff --git a/psycopg/psycopgmodule.c b/psycopg/psycopgmodule.c index 2fff7242..4764b8ea 100644 --- a/psycopg/psycopgmodule.c +++ b/psycopg/psycopgmodule.c @@ -826,6 +826,7 @@ init_psycopg(void) PyModule_AddObject(module, "cursor", (PyObject*)&cursorType); PyModule_AddObject(module, "ISQLQuote", (PyObject*)&isqlquoteType); PyModule_AddObject(module, "Notify", (PyObject*)&NotifyType); + PyModule_AddObject(module, "Xid", (PyObject*)&XidType); #ifdef PSYCOPG_EXTENSIONS PyModule_AddObject(module, "lobject", (PyObject*)&lobjectType); #endif