summaryrefslogtreecommitdiff
path: root/psycopg
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-17 22:26:02 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-17 22:26:02 +0000
commit458254c49e3852f9268a6f18cccb83ada8ed81f6 (patch)
treea046c5f980e505cf696fa94d4292957ca7006581 /psycopg
parentdc5dd3052612fa79aa7416f100d982a5d8cb477b (diff)
downloadpsycopg2-458254c49e3852f9268a6f18cccb83ada8ed81f6.tar.gz
Windows doesn't like the name "connect" for a function
Diffstat (limited to 'psycopg')
-rw-r--r--psycopg/psycopgmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/psycopg/psycopgmodule.c b/psycopg/psycopgmodule.c
index 0dde27c..8ee2328 100644
--- a/psycopg/psycopgmodule.c
+++ b/psycopg/psycopgmodule.c
@@ -76,11 +76,11 @@ HIDDEN PyObject *psyco_null = NULL;
#define str(s) #s
/** connect module-level function **/
-#define connect_doc \
+#define psyco_connect_doc \
"_connect(dsn, [connection_factory], [async]) -- New database connection.\n\n"
static PyObject *
-connect(PyObject *self, PyObject *args, PyObject *keywds)
+psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
{
PyObject *conn = NULL;
PyObject *factory = NULL;
@@ -96,7 +96,7 @@ connect(PyObject *self, PyObject *args, PyObject *keywds)
if (async_) { async = async_; }
- Dprintf("connect: dsn = '%s', async = %d", dsn, async);
+ Dprintf("psyco_connect: dsn = '%s', async = %d", dsn, async);
/* allocate connection, fill with errors and return it */
if (factory == NULL || factory == Py_None) {
@@ -986,8 +986,8 @@ mxdatetime_init(PyObject *module)
/** method table and module initialization **/
static PyMethodDef psycopgMethods[] = {
- {"_connect", (PyCFunction)connect,
- METH_VARARGS|METH_KEYWORDS, connect_doc},
+ {"_connect", (PyCFunction)psyco_connect,
+ METH_VARARGS|METH_KEYWORDS, psyco_connect_doc},
{"parse_dsn", (PyCFunction)parse_dsn,
METH_VARARGS|METH_KEYWORDS, parse_dsn_doc},
{"quote_ident", (PyCFunction)quote_ident,