mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
* psycopg/typecast.c (typecast_pydatetime): make array static.
(typecast_mxdatetime): same here. * psycopg/typecast_builtins.c (typecast_builtins): make array static. * psycopg/psycopgmodule.c: add hidden visibility to a bunch of global variables here. * psycopg/psycopg.h: add set QueryCanceledError and TransactionRollbackError to hidden visibility.
This commit is contained in:
parent
e054004e8f
commit
fe853d0261
12
ChangeLog
12
ChangeLog
|
@ -1,5 +1,17 @@
|
|||
2008-01-22 James Henstridge <james@jamesh.id.au>
|
||||
|
||||
* psycopg/typecast.c (typecast_pydatetime): make array static.
|
||||
(typecast_mxdatetime): same here.
|
||||
|
||||
* psycopg/typecast_builtins.c (typecast_builtins): make array
|
||||
static.
|
||||
|
||||
* psycopg/psycopgmodule.c: add hidden visibility to a bunch of
|
||||
global variables here.
|
||||
|
||||
* psycopg/psycopg.h: add set QueryCanceledError and
|
||||
TransactionRollbackError to hidden visibility.
|
||||
|
||||
* psycopg/*.[ch]: add const qualifier to various string arguments
|
||||
to functions (typecast functions and conn_switch_isolation_level).
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ extern HIDDEN PyObject *Error, *Warning, *InterfaceError, *DatabaseError,
|
|||
*InternalError, *OperationalError, *ProgrammingError,
|
||||
*IntegrityError, *DataError, *NotSupportedError;
|
||||
#ifdef PSYCOPG_EXTENSIONS
|
||||
extern PyObject *QueryCanceledError, *TransactionRollbackError;
|
||||
extern HIDDEN PyObject *QueryCanceledError, *TransactionRollbackError;
|
||||
#endif
|
||||
|
||||
/* python versions and compatibility stuff */
|
||||
|
|
|
@ -42,29 +42,29 @@
|
|||
#ifdef HAVE_MXDATETIME
|
||||
#include <mxDateTime.h>
|
||||
#include "psycopg/adapter_mxdatetime.h"
|
||||
mxDateTimeModule_APIObject *mxDateTimeP = NULL;
|
||||
HIDDEN mxDateTimeModule_APIObject *mxDateTimeP = NULL;
|
||||
#endif
|
||||
|
||||
/* some module-level variables, like the datetime module */
|
||||
#ifdef HAVE_PYDATETIME
|
||||
#include <datetime.h>
|
||||
#include "psycopg/adapter_datetime.h"
|
||||
PyObject *pyDateTimeModuleP = NULL;
|
||||
PyObject *pyDateTypeP = NULL;
|
||||
PyObject *pyTimeTypeP = NULL;
|
||||
PyObject *pyDateTimeTypeP = NULL;
|
||||
PyObject *pyDeltaTypeP = NULL;
|
||||
HIDDEN PyObject *pyDateTimeModuleP = NULL;
|
||||
HIDDEN PyObject *pyDateTypeP = NULL;
|
||||
HIDDEN PyObject *pyTimeTypeP = NULL;
|
||||
HIDDEN PyObject *pyDateTimeTypeP = NULL;
|
||||
HIDDEN PyObject *pyDeltaTypeP = NULL;
|
||||
#endif
|
||||
|
||||
/* pointers to the psycopg.tz classes */
|
||||
PyObject *pyPsycopgTzModule = NULL;
|
||||
PyObject *pyPsycopgTzLOCAL = NULL;
|
||||
PyObject *pyPsycopgTzFixedOffsetTimezone = NULL;
|
||||
HIDDEN PyObject *pyPsycopgTzModule = NULL;
|
||||
HIDDEN PyObject *pyPsycopgTzLOCAL = NULL;
|
||||
HIDDEN PyObject *pyPsycopgTzFixedOffsetTimezone = NULL;
|
||||
|
||||
PyObject *psycoEncodings = NULL;
|
||||
HIDDEN PyObject *psycoEncodings = NULL;
|
||||
|
||||
#ifdef PSYCOPG_DEBUG
|
||||
int psycopg_debug_enabled = 0;
|
||||
HIDDEN int psycopg_debug_enabled = 0;
|
||||
#endif
|
||||
|
||||
/** connect module-level function **/
|
||||
|
|
|
@ -180,7 +180,7 @@ typecast_parse_time(const char* s, const char** t, Py_ssize_t* len,
|
|||
|
||||
/* a list of initializers, used to make the typecasters accessible anyway */
|
||||
#ifdef HAVE_PYDATETIME
|
||||
typecastObject_initlist typecast_pydatetime[] = {
|
||||
static typecastObject_initlist typecast_pydatetime[] = {
|
||||
{"PYDATETIME", typecast_DATETIME_types, typecast_PYDATETIME_cast},
|
||||
{"PYTIME", typecast_TIME_types, typecast_PYTIME_cast},
|
||||
{"PYDATE", typecast_DATE_types, typecast_PYDATE_cast},
|
||||
|
@ -191,7 +191,7 @@ typecastObject_initlist typecast_pydatetime[] = {
|
|||
|
||||
/* a list of initializers, used to make the typecasters accessible anyway */
|
||||
#ifdef HAVE_MXDATETIME
|
||||
typecastObject_initlist typecast_mxdatetime[] = {
|
||||
static typecastObject_initlist typecast_mxdatetime[] = {
|
||||
{"MXDATETIME", typecast_DATETIME_types, typecast_MXDATE_cast},
|
||||
{"MXTIME", typecast_TIME_types, typecast_MXTIME_cast},
|
||||
{"MXDATE", typecast_DATE_types, typecast_MXDATE_cast},
|
||||
|
|
|
@ -27,7 +27,7 @@ static long int typecast_BINARYARRAY_types[] = {1001, 0};
|
|||
static long int typecast_ROWIDARRAY_types[] = {1028, 1013, 0};
|
||||
|
||||
|
||||
typecastObject_initlist typecast_builtins[] = {
|
||||
static typecastObject_initlist typecast_builtins[] = {
|
||||
{"NUMBER", typecast_NUMBER_types, typecast_NUMBER_cast, NULL},
|
||||
{"LONGINTEGER", typecast_LONGINTEGER_types, typecast_LONGINTEGER_cast, NULL},
|
||||
{"INTEGER", typecast_INTEGER_types, typecast_INTEGER_cast, NULL},
|
||||
|
|
Loading…
Reference in New Issue
Block a user