diff options
| author | James Henstridge <james@jamesh.id.au> | 2008-05-05 10:37:24 +0800 |
|---|---|---|
| committer | James Henstridge <james@jamesh.id.au> | 2008-05-05 10:37:24 +0800 |
| commit | 938c456cee54e5642491f4214c23aee293df791e (patch) | |
| tree | 8c486596f838e44ee89413bbf6ca348fc71a7f14 /psycopg/psycopgmodule.c | |
| parent | fedfd53d544d7d1083703705c67637bd401d69e3 (diff) | |
| parent | 31ef9355c21a45d62fdb01293863fe26cd33109a (diff) | |
| download | psycopg2-938c456cee54e5642491f4214c23aee293df791e.tar.gz | |
Merge changes from psycopg2/trunk via psycopg2.r243.
Diffstat (limited to 'psycopg/psycopgmodule.c')
| -rw-r--r-- | psycopg/psycopgmodule.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/psycopg/psycopgmodule.c b/psycopg/psycopgmodule.c index a26aac1..6c658fc 100644 --- a/psycopg/psycopgmodule.c +++ b/psycopg/psycopgmodule.c @@ -28,6 +28,7 @@ #include "psycopg/psycopg.h" #include "psycopg/connection.h" #include "psycopg/cursor.h" +#include "psycopg/lobject.h" #include "psycopg/typecast.h" #include "psycopg/microprotocols.h" #include "psycopg/microprotocols_proto.h" @@ -719,6 +720,11 @@ init_psycopg(void) if (PyType_Ready(&listType) == -1) return; if (PyType_Ready(&chunkType) == -1) return; +#ifdef PSYCOPG_EXTENSIONS + lobjectType.ob_type = &PyType_Type; + if (PyType_Ready(&lobjectType) == -1) return; +#endif + #ifdef HAVE_PYBOOL pbooleanType.ob_type = &PyType_Type; if (PyType_Ready(&pbooleanType) == -1) return; @@ -794,6 +800,9 @@ init_psycopg(void) PyModule_AddObject(module, "connection", (PyObject*)&connectionType); PyModule_AddObject(module, "cursor", (PyObject*)&cursorType); PyModule_AddObject(module, "ISQLQuote", (PyObject*)&isqlquoteType); +#ifdef PSYCOPG_EXTENSIONS + PyModule_AddObject(module, "lobject", (PyObject*)&lobjectType); +#endif /* encodings dictionary in module dictionary */ PyModule_AddObject(module, "encodings", psycoEncodings); @@ -820,6 +829,10 @@ init_psycopg(void) listType.tp_alloc = PyType_GenericAlloc; chunkType.tp_alloc = PyType_GenericAlloc; +#ifdef PSYCOPG_EXTENSIONS + lobjectType.tp_alloc = PyType_GenericAlloc; +#endif + #ifdef HAVE_PYDATETIME pydatetimeType.tp_alloc = PyType_GenericAlloc; #endif |
