mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
* Add HIDDEN attribute to datetime related global variables.
* Make const strings static, which essentially makes them labels for the strings.
This commit is contained in:
parent
fe853d0261
commit
6c2e3ab49b
|
@ -38,14 +38,14 @@
|
|||
|
||||
/* the pointer to the datetime module API is initialized by the module init
|
||||
code, we just need to grab it */
|
||||
extern PyObject* pyDateTimeModuleP;
|
||||
extern PyObject *pyDateTypeP;
|
||||
extern PyObject *pyTimeTypeP;
|
||||
extern PyObject *pyDateTimeTypeP;
|
||||
extern PyObject *pyDeltaTypeP;
|
||||
extern HIDDEN PyObject* pyDateTimeModuleP;
|
||||
extern HIDDEN PyObject *pyDateTypeP;
|
||||
extern HIDDEN PyObject *pyTimeTypeP;
|
||||
extern HIDDEN PyObject *pyDateTimeTypeP;
|
||||
extern HIDDEN PyObject *pyDeltaTypeP;
|
||||
|
||||
extern PyObject *pyPsycopgTzModule;
|
||||
extern PyObject *pyPsycopgTzLOCAL;
|
||||
extern HIDDEN PyObject *pyPsycopgTzModule;
|
||||
extern HIDDEN PyObject *pyPsycopgTzLOCAL;
|
||||
|
||||
/* datetime_str, datetime_getquoted - return result of quoting */
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
/* the pointer to the mxDateTime API is initialized by the module init code,
|
||||
we just need to grab it */
|
||||
extern mxDateTimeModule_APIObject *mxDateTimeP;
|
||||
extern HIDDEN mxDateTimeModule_APIObject *mxDateTimeP;
|
||||
|
||||
|
||||
/* mxdatetime_str, mxdatetime_getquoted - return result of quoting */
|
||||
|
|
|
@ -67,14 +67,14 @@ conn_connect(connectionObject *self)
|
|||
|
||||
/* we need the initial date style to be ISO, for typecasters; if the user
|
||||
later change it, she must know what she's doing... */
|
||||
const char datestyle[] = "SET DATESTYLE TO 'ISO'";
|
||||
const char encoding[] = "SHOW client_encoding";
|
||||
const char isolevel[] = "SHOW default_transaction_isolation";
|
||||
static const char datestyle[] = "SET DATESTYLE TO 'ISO'";
|
||||
static const char encoding[] = "SHOW client_encoding";
|
||||
static const char isolevel[] = "SHOW default_transaction_isolation";
|
||||
|
||||
const char lvl1a[] = "read uncommitted";
|
||||
const char lvl1b[] = "read committed";
|
||||
const char lvl2a[] = "repeatable read";
|
||||
const char lvl2b[] = "serializable";
|
||||
static const char lvl1a[] = "read uncommitted";
|
||||
static const char lvl1b[] = "read committed";
|
||||
static const char lvl2a[] = "repeatable read";
|
||||
static const char lvl2b[] = "serializable";
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
pgconn = PQconnectdb(self->dsn);
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
|
||||
/* the pointer to the datetime module API is initialized by the module init
|
||||
code, we just need to grab it */
|
||||
extern PyObject* pyDateTimeModuleP;
|
||||
extern PyObject *pyDateTypeP;
|
||||
extern PyObject *pyTimeTypeP;
|
||||
extern PyObject *pyDateTimeTypeP;
|
||||
extern PyObject *pyDeltaTypeP;
|
||||
extern HIDDEN PyObject* pyDateTimeModuleP;
|
||||
extern HIDDEN PyObject *pyDateTypeP;
|
||||
extern HIDDEN PyObject *pyTimeTypeP;
|
||||
extern HIDDEN PyObject *pyDateTimeTypeP;
|
||||
extern HIDDEN PyObject *pyDeltaTypeP;
|
||||
|
||||
/** DATE - cast a date into a date python object **/
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/* the pointer to the mxDateTime API is initialized by the module init code,
|
||||
we just need to grab it */
|
||||
extern mxDateTimeModule_APIObject *mxDateTimeP;
|
||||
extern HIDDEN mxDateTimeModule_APIObject *mxDateTimeP;
|
||||
|
||||
/** DATE - cast a date into mx.DateTime python object **/
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user