mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 11:36:37 +03:00
Mark getnextarg function as returning a borrowed reference
This commit is contained in:
parent
fc78fb09c0
commit
5f3f35a2c2
|
@ -86,6 +86,7 @@
|
||||||
|
|
||||||
/* Helpers for formatstring */
|
/* Helpers for formatstring */
|
||||||
|
|
||||||
|
CPYCHECKER_RETURNS_BORROWED_REF
|
||||||
Py_LOCAL_INLINE(PyObject *)
|
Py_LOCAL_INLINE(PyObject *)
|
||||||
getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx)
|
getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,4 +160,12 @@ static double round(double num)
|
||||||
#define isinf(x) (!finite((x)) && (x)==(x))
|
#define isinf(x) (!finite((x)) && (x)==(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* decorator for the gcc cpychecker plugin */
|
||||||
|
#if defined(WITH_CPYCHECKER_RETURNS_BORROWED_REF_ATTRIBUTE)
|
||||||
|
#define CPYCHECKER_RETURNS_BORROWED_REF \
|
||||||
|
__attribute__((cpychecker_returns_borrowed_ref))
|
||||||
|
#else
|
||||||
|
#define CPYCHECKER_RETURNS_BORROWED_REF
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(PSYCOPG_CONFIG_H) */
|
#endif /* !defined(PSYCOPG_CONFIG_H) */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user