mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +03:00
Fixed signature for METH_NOARGS functions
This commit is contained in:
parent
02ffb7423a
commit
9f06df1820
|
@ -124,7 +124,7 @@ exit:
|
||||||
#define psyco_conn_close_doc "close() -- Close the connection."
|
#define psyco_conn_close_doc "close() -- Close the connection."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_close(connectionObject *self, PyObject *args)
|
psyco_conn_close(connectionObject *self)
|
||||||
{
|
{
|
||||||
Dprintf("psyco_conn_close: closing connection at %p", self);
|
Dprintf("psyco_conn_close: closing connection at %p", self);
|
||||||
conn_close(self);
|
conn_close(self);
|
||||||
|
@ -140,7 +140,7 @@ psyco_conn_close(connectionObject *self, PyObject *args)
|
||||||
#define psyco_conn_commit_doc "commit() -- Commit all changes to database."
|
#define psyco_conn_commit_doc "commit() -- Commit all changes to database."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_commit(connectionObject *self, PyObject *args)
|
psyco_conn_commit(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
EXC_IF_CONN_ASYNC(self, commit);
|
EXC_IF_CONN_ASYNC(self, commit);
|
||||||
|
@ -160,7 +160,7 @@ psyco_conn_commit(connectionObject *self, PyObject *args)
|
||||||
"rollback() -- Roll back all changes done to database."
|
"rollback() -- Roll back all changes done to database."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_rollback(connectionObject *self, PyObject *args)
|
psyco_conn_rollback(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
EXC_IF_CONN_ASYNC(self, rollback);
|
EXC_IF_CONN_ASYNC(self, rollback);
|
||||||
|
@ -234,7 +234,7 @@ exit:
|
||||||
"tpc_prepare() -- perform the first phase of a two-phase transaction."
|
"tpc_prepare() -- perform the first phase of a two-phase transaction."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_tpc_prepare(connectionObject *self, PyObject *args)
|
psyco_conn_tpc_prepare(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
EXC_IF_CONN_ASYNC(self, tpc_prepare);
|
EXC_IF_CONN_ASYNC(self, tpc_prepare);
|
||||||
|
@ -378,7 +378,7 @@ psyco_conn_tpc_rollback(connectionObject *self, PyObject *args)
|
||||||
"tpc_recover() -- returns a list of pending transaction IDs."
|
"tpc_recover() -- returns a list of pending transaction IDs."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_tpc_recover(connectionObject *self, PyObject *args)
|
psyco_conn_tpc_recover(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
EXC_IF_CONN_ASYNC(self, tpc_recover);
|
EXC_IF_CONN_ASYNC(self, tpc_recover);
|
||||||
|
@ -652,7 +652,7 @@ psyco_conn_set_client_encoding(connectionObject *self, PyObject *args)
|
||||||
"get_transaction_status() -- Get backend transaction status."
|
"get_transaction_status() -- Get backend transaction status."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_get_transaction_status(connectionObject *self, PyObject *args)
|
psyco_conn_get_transaction_status(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
|
||||||
"get_backend_pid() -- Get backend process id."
|
"get_backend_pid() -- Get backend process id."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_get_backend_pid(connectionObject *self, PyObject *args)
|
psyco_conn_get_backend_pid(connectionObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CONN_CLOSED(self);
|
EXC_IF_CONN_CLOSED(self);
|
||||||
|
|
||||||
|
@ -769,7 +769,7 @@ psyco_conn_get_backend_pid(connectionObject *self, PyObject *args)
|
||||||
"reset() -- Reset current connection to defaults."
|
"reset() -- Reset current connection to defaults."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_reset(connectionObject *self, PyObject *args)
|
psyco_conn_reset(connectionObject *self)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ psyco_conn_get_exception(PyObject *self, void *closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_poll(connectionObject *self, PyObject *args)
|
psyco_conn_poll(connectionObject *self)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -819,7 +819,7 @@ psyco_conn_poll(connectionObject *self, PyObject *args)
|
||||||
"fileno() -> int -- Return file descriptor associated to database connection."
|
"fileno() -> int -- Return file descriptor associated to database connection."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_fileno(connectionObject *self, PyObject *args)
|
psyco_conn_fileno(connectionObject *self)
|
||||||
{
|
{
|
||||||
long int socket;
|
long int socket;
|
||||||
|
|
||||||
|
@ -838,7 +838,7 @@ psyco_conn_fileno(connectionObject *self, PyObject *args)
|
||||||
"executing an asynchronous operation."
|
"executing an asynchronous operation."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_isexecuting(connectionObject *self, PyObject *args)
|
psyco_conn_isexecuting(connectionObject *self)
|
||||||
{
|
{
|
||||||
/* synchronous connections will always return False */
|
/* synchronous connections will always return False */
|
||||||
if (self->async == 0) {
|
if (self->async == 0) {
|
||||||
|
@ -870,7 +870,7 @@ psyco_conn_isexecuting(connectionObject *self, PyObject *args)
|
||||||
"cancel() -- cancel the current operation"
|
"cancel() -- cancel the current operation"
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_cancel(connectionObject *self, PyObject *args)
|
psyco_conn_cancel(connectionObject *self)
|
||||||
{
|
{
|
||||||
char errbuf[256];
|
char errbuf[256];
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ extern PyObject *pyPsycopgTzFixedOffsetTimezone;
|
||||||
"close() -- Close the cursor."
|
"close() -- Close the cursor."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_curs_close(cursorObject *self, PyObject *args)
|
psyco_curs_close(cursorObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_ASYNC_IN_PROGRESS(self, close);
|
EXC_IF_ASYNC_IN_PROGRESS(self, close);
|
||||||
|
|
||||||
|
@ -761,7 +761,7 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_curs_fetchone(cursorObject *self, PyObject *args)
|
psyco_curs_fetchone(cursorObject *self)
|
||||||
{
|
{
|
||||||
PyObject *res;
|
PyObject *res;
|
||||||
|
|
||||||
|
@ -953,7 +953,7 @@ exit:
|
||||||
"Return `!None` when no more data is available.\n"
|
"Return `!None` when no more data is available.\n"
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_curs_fetchall(cursorObject *self, PyObject *args)
|
psyco_curs_fetchall(cursorObject *self)
|
||||||
{
|
{
|
||||||
int i, size;
|
int i, size;
|
||||||
PyObject *list = NULL;
|
PyObject *list = NULL;
|
||||||
|
@ -1085,7 +1085,7 @@ exit:
|
||||||
"sets) and will raise a NotSupportedError exception."
|
"sets) and will raise a NotSupportedError exception."
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_curs_nextset(cursorObject *self, PyObject *args)
|
psyco_curs_nextset(cursorObject *self)
|
||||||
{
|
{
|
||||||
EXC_IF_CURS_CLOSED(self);
|
EXC_IF_CURS_CLOSED(self);
|
||||||
|
|
||||||
|
@ -1674,7 +1674,7 @@ cursor_next(PyObject *self)
|
||||||
|
|
||||||
if (NULL == ((cursorObject*)self)->name) {
|
if (NULL == ((cursorObject*)self)->name) {
|
||||||
/* we don't parse arguments: psyco_curs_fetchone will do that for us */
|
/* we don't parse arguments: psyco_curs_fetchone will do that for us */
|
||||||
res = psyco_curs_fetchone((cursorObject*)self, NULL);
|
res = psyco_curs_fetchone((cursorObject*)self);
|
||||||
|
|
||||||
/* convert a None to NULL to signal the end of iteration */
|
/* convert a None to NULL to signal the end of iteration */
|
||||||
if (res && res == Py_None) {
|
if (res && res == Py_None) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user