mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Mark setter as raising on negative results
Fixed static check of psyco_conn_cursor().
This commit is contained in:
parent
4644715164
commit
daff2ea1be
|
@ -112,10 +112,10 @@ psyco_conn_cursor(connectionObject *self, PyObject *args, PyObject *kwargs)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (0 != psyco_curs_withhold_set((cursorObject *)obj, withhold)) {
|
||||
if (0 > psyco_curs_withhold_set((cursorObject *)obj, withhold)) {
|
||||
goto exit;
|
||||
}
|
||||
if (0 != psyco_curs_scrollable_set((cursorObject *)obj, scrollable)) {
|
||||
if (0 > psyco_curs_scrollable_set((cursorObject *)obj, scrollable)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ struct cursorObject {
|
|||
/* C-callable functions in cursor_int.c and cursor_type.c */
|
||||
BORROWED HIDDEN PyObject *curs_get_cast(cursorObject *self, PyObject *oid);
|
||||
HIDDEN void curs_reset(cursorObject *self);
|
||||
HIDDEN int psyco_curs_withhold_set(cursorObject *self, PyObject *pyvalue);
|
||||
HIDDEN int psyco_curs_scrollable_set(cursorObject *self, PyObject *pyvalue);
|
||||
RAISES_NEG HIDDEN int psyco_curs_withhold_set(cursorObject *self, PyObject *pyvalue);
|
||||
RAISES_NEG HIDDEN int psyco_curs_scrollable_set(cursorObject *self, PyObject *pyvalue);
|
||||
HIDDEN PyObject *psyco_curs_validate_sql_basic(cursorObject *self, PyObject *sql);
|
||||
|
||||
/* exception-raising macros */
|
||||
|
|
|
@ -1681,7 +1681,7 @@ psyco_curs_withhold_get(cursorObject *self)
|
|||
return PyBool_FromLong(self->withhold);
|
||||
}
|
||||
|
||||
int
|
||||
RAISES_NEG int
|
||||
psyco_curs_withhold_set(cursorObject *self, PyObject *pyvalue)
|
||||
{
|
||||
int value;
|
||||
|
@ -1726,7 +1726,7 @@ psyco_curs_scrollable_get(cursorObject *self)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
RAISES_NEG int
|
||||
psyco_curs_scrollable_set(cursorObject *self, PyObject *pyvalue)
|
||||
{
|
||||
int value;
|
||||
|
|
Loading…
Reference in New Issue
Block a user