mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-03 07:45:45 +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 */
|
||||
|
||||
CPYCHECKER_RETURNS_BORROWED_REF
|
||||
Py_LOCAL_INLINE(PyObject *)
|
||||
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))
|
||||
#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) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user