diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | psycopg/adapter_asis.c | 4 | ||||
-rw-r--r-- | psycopg/adapter_binary.c | 6 | ||||
-rw-r--r-- | psycopg/adapter_datetime.c | 4 | ||||
-rw-r--r-- | psycopg/adapter_list.c | 8 | ||||
-rw-r--r-- | psycopg/adapter_pboolean.c | 4 | ||||
-rw-r--r-- | psycopg/adapter_qstring.c | 6 | ||||
-rw-r--r-- | psycopg/connection_int.c | 2 | ||||
-rw-r--r-- | psycopg/cursor_type.c | 6 | ||||
-rw-r--r-- | psycopg/pqpath.c | 4 | ||||
-rw-r--r-- | psycopg/typecast_array.c | 2 |
11 files changed, 30 insertions, 23 deletions
@@ -1,3 +1,10 @@ +2008-01-14 James Henstridge <james@jamesh.id.au> + + * psycopg/typecast_array.c (typecast_array_scan): set an initial + value for quotes to keep gcc happy. + + * psycopg/*.c: add missing static modifier on many functions. + 2008-01-12 James Henstridge <james@jamesh.id.au> * tests/test_transaction.py diff --git a/psycopg/adapter_asis.c b/psycopg/adapter_asis.c index 2da0b5f..0e64eb5 100644 --- a/psycopg/adapter_asis.c +++ b/psycopg/adapter_asis.c @@ -45,14 +45,14 @@ asis_str(asisObject *self) } } -PyObject * +static PyObject * asis_getquoted(asisObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return asis_str(self); } -PyObject * +static PyObject * asis_conform(asisObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c index 5938bcf..1fb9d40 100644 --- a/psycopg/adapter_binary.c +++ b/psycopg/adapter_binary.c @@ -183,14 +183,14 @@ binary_str(binaryObject *self) return self->buffer; } -PyObject * +static PyObject * binary_getquoted(binaryObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return binary_str(self); } -PyObject * +static PyObject * binary_prepare(binaryObject *self, PyObject *args) { connectionObject *conn; @@ -208,7 +208,7 @@ binary_prepare(binaryObject *self, PyObject *args) return Py_None; } -PyObject * +static PyObject * binary_conform(binaryObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c index a960943..b2b0555 100644 --- a/psycopg/adapter_datetime.c +++ b/psycopg/adapter_datetime.c @@ -79,14 +79,14 @@ pydatetime_str(pydatetimeObject *self) } } -PyObject * +static PyObject * pydatetime_getquoted(pydatetimeObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return pydatetime_str(self); } -PyObject * +static PyObject * pydatetime_conform(pydatetimeObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/adapter_list.c b/psycopg/adapter_list.c index f65247d..2ce2e60 100644 --- a/psycopg/adapter_list.c +++ b/psycopg/adapter_list.c @@ -82,21 +82,21 @@ list_quote(listObject *self) return res; } -PyObject * +static PyObject * list_str(listObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return list_quote(self); } -PyObject * +static PyObject * list_getquoted(listObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return list_quote(self); } -PyObject * +static PyObject * list_prepare(listObject *self, PyObject *args) { connectionObject *conn; @@ -116,7 +116,7 @@ list_prepare(listObject *self, PyObject *args) return Py_None; } -PyObject * +static PyObject * list_conform(listObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/adapter_pboolean.c b/psycopg/adapter_pboolean.c index 405da4a..05d1d04 100644 --- a/psycopg/adapter_pboolean.c +++ b/psycopg/adapter_pboolean.c @@ -55,14 +55,14 @@ pboolean_str(pbooleanObject *self) #endif } -PyObject * +static PyObject * pboolean_getquoted(pbooleanObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return pboolean_str(self); } -PyObject * +static PyObject * pboolean_conform(pbooleanObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/adapter_qstring.c b/psycopg/adapter_qstring.c index ae95cb6..cebb521 100644 --- a/psycopg/adapter_qstring.c +++ b/psycopg/adapter_qstring.c @@ -193,14 +193,14 @@ qstring_str(qstringObject *self) return self->buffer; } -PyObject * +static PyObject * qstring_getquoted(qstringObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; return qstring_str(self); } -PyObject * +static PyObject * qstring_prepare(qstringObject *self, PyObject *args) { connectionObject *conn; @@ -226,7 +226,7 @@ qstring_prepare(qstringObject *self, PyObject *args) return Py_None; } -PyObject * +static PyObject * qstring_conform(qstringObject *self, PyObject *args) { PyObject *res, *proto; diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index da863c3..bf72df3 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -32,7 +32,7 @@ /* conn_notice_callback - process notices */ -void +static void conn_notice_callback(void *args, const char *message) { connectionObject *self = (connectionObject *)args; diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 0da50cf..225b299 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -741,7 +741,7 @@ _psyco_curs_buildrow_with_factory(cursorObject *self, int row) return _psyco_curs_buildrow_fill(self, res, row, n, 0); } -PyObject * +static PyObject * psyco_curs_fetchone(cursorObject *self, PyObject *args) { PyObject *res; @@ -795,7 +795,7 @@ psyco_curs_fetchone(cursorObject *self, PyObject *args) "of tuples (by default) or using the sequence factory previously set in\n" \ "the `row_factory` attribute. Return `None` when no more data is available.\n" -PyObject * +static PyObject * psyco_curs_fetchmany(cursorObject *self, PyObject *args, PyObject *kwords) { int i; @@ -870,7 +870,7 @@ psyco_curs_fetchmany(cursorObject *self, PyObject *args, PyObject *kwords) "the sequence factory previously set in the `row_factory` attribute.\n" \ "Return `None` when no more data is available.\n" -PyObject * +static PyObject * psyco_curs_fetchall(cursorObject *self, PyObject *args) { int i, size; diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 9cc7c15..a7f7a7c 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -237,7 +237,7 @@ pq_set_critical(connectionObject *conn, const char *msg) else conn->critical = NULL; } -void +static void pq_clear_critical(connectionObject *conn) { /* sometimes we know that the notice analizer set a critical that @@ -283,7 +283,7 @@ pq_resolve_critical(connectionObject *conn, int close) this function does not call any Py_*_ALLOW_THREADS macros */ -void +static void pq_clear_async(connectionObject *conn) { PGresult *pgres; diff --git a/psycopg/typecast_array.c b/psycopg/typecast_array.c index bc0d735..4a79226 100644 --- a/psycopg/typecast_array.c +++ b/psycopg/typecast_array.c @@ -164,7 +164,7 @@ static int typecast_array_scan(char *str, Py_ssize_t strlength, PyObject *curs, PyObject *base, PyObject *array) { - int state, quotes; + int state, quotes = 0; Py_ssize_t length = 0, pos = 0; char *token; |