diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c index b2b0555e..98922d3c 100644 --- a/psycopg/adapter_datetime.c +++ b/psycopg/adapter_datetime.c @@ -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 */ diff --git a/psycopg/adapter_mxdatetime.c b/psycopg/adapter_mxdatetime.c index 797daf25..48ead92e 100644 --- a/psycopg/adapter_mxdatetime.c +++ b/psycopg/adapter_mxdatetime.c @@ -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 */ diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index c5ba1ece..aef2ec31 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -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); diff --git a/psycopg/typecast_datetime.c b/psycopg/typecast_datetime.c index 6748c6a6..99f4b608 100644 --- a/psycopg/typecast_datetime.c +++ b/psycopg/typecast_datetime.c @@ -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 **/ diff --git a/psycopg/typecast_mxdatetime.c b/psycopg/typecast_mxdatetime.c index bdd2955b..a6e9509e 100644 --- a/psycopg/typecast_mxdatetime.c +++ b/psycopg/typecast_mxdatetime.c @@ -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 **/