summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-10-14 00:54:16 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-11-05 09:34:49 +0000
commit2f29429e88151bd91228f05181075d95f4e9732c (patch)
tree02bfa8463e7fb4d4d17c1bc3c6323913cd861ba1
parentf0f5f095c7fd7982c1f34528214df252cdebffc9 (diff)
downloadpsycopg2-2f29429e88151bd91228f05181075d95f4e9732c.tar.gz
Expose the Xid object in the extension module.
-rw-r--r--lib/extensions.py2
-rw-r--r--psycopg/psycopgmodule.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/extensions.py b/lib/extensions.py
index 3fd9803..fca7973 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 2fff724..4764b8e 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