mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Added attribute to ignore refcount check in a function
Hacking a feature together in a ignore-refcount branch of cpychecker
This commit is contained in:
parent
16b35ac77b
commit
0b68f344d1
|
@ -101,6 +101,7 @@ getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx)
|
|||
|
||||
/* wrapper around _Bytes_Resize offering normal Python call semantics */
|
||||
|
||||
IGNORE_REFCOUNT
|
||||
STEALS(1)
|
||||
Py_LOCAL_INLINE(PyObject *)
|
||||
resize_bytes(PyObject *b, Py_ssize_t newsize) {
|
||||
|
|
|
@ -202,4 +202,11 @@ static double round(double num)
|
|||
#define RAISES
|
||||
#endif
|
||||
|
||||
#if defined(WITH_CPYCHECKER_IGNORE_REFCOUNT_ATTRIBUTE)
|
||||
#define IGNORE_REFCOUNT \
|
||||
__attribute__((cpychecker_ignore_refcount))
|
||||
#else
|
||||
#define IGNORE_REFCOUNT
|
||||
#endif
|
||||
|
||||
#endif /* !defined(PSYCOPG_CONFIG_H) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user