diff --git a/psycopg/utils.c b/psycopg/utils.c index 7febf3c5..7f8e0adf 100644 --- a/psycopg/utils.c +++ b/psycopg/utils.c @@ -365,8 +365,7 @@ exit: * Create a new error of the given type with extra attributes. */ -/* TODO: may have been changed to BORROWED */ -RAISES PyObject * +RAISES BORROWED PyObject * psyco_set_error(PyObject *exc, cursorObject *curs, const char *msg) { PyObject *pymsg; diff --git a/psycopg/utils.h b/psycopg/utils.h index fd3893c9..3855cd86 100644 --- a/psycopg/utils.h +++ b/psycopg/utils.h @@ -53,7 +53,7 @@ HIDDEN PyObject *psycopg_make_dsn(PyObject *dsn, PyObject *kwargs); HIDDEN PyObject *psycopg_text_from_chars_safe( const char *str, Py_ssize_t len, PyObject *decoder); -RAISES HIDDEN PyObject *psyco_set_error( +HIDDEN RAISES BORROWED PyObject *psyco_set_error( PyObject *exc, cursorObject *curs, const char *msg); HIDDEN PyObject *psyco_GetDecimalType(void);