diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-12-29 16:53:19 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-21 02:41:58 +0000 |
commit | 3768d9047d506863babb37719b481cac53cdf5aa (patch) | |
tree | c13cb42932d679f4a8c8f742a66e61ff89a3ec86 | |
parent | 7a1fb9a2e47227c0cc130ef62142d90dd71999ee (diff) | |
download | psycopg2-3768d9047d506863babb37719b481cac53cdf5aa.tar.gz |
Mark psyco_set_error as returning a borrowed object
-rw-r--r-- | psycopg/utils.c | 3 | ||||
-rw-r--r-- | psycopg/utils.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/psycopg/utils.c b/psycopg/utils.c index 7febf3c..7f8e0ad 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 fd3893c..3855cd8 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); |