summaryrefslogtreecommitdiff
path: root/psycopg/config.h
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-02-24 10:41:02 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2012-02-24 10:41:02 +0000
commita6df55f4e31a1a48886615098a21ccbf20782d76 (patch)
tree6713e5666fa7d1d9a8091f612f956522040389c2 /psycopg/config.h
parent5f3f35a2c29bd91c52d0470ba5a6beed8b6e4bed (diff)
downloadpsycopg2-a6df55f4e31a1a48886615098a21ccbf20782d76.tar.gz
Flag the psycopg_ensure_*() functions as stealing a ref
Diffstat (limited to 'psycopg/config.h')
-rw-r--r--psycopg/config.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/psycopg/config.h b/psycopg/config.h
index 321587a..2038ced 100644
--- a/psycopg/config.h
+++ b/psycopg/config.h
@@ -160,7 +160,7 @@ static double round(double num)
#define isinf(x) (!finite((x)) && (x)==(x))
#endif
-/* decorator for the gcc cpychecker plugin */
+/* decorators for the gcc cpychecker plugin */
#if defined(WITH_CPYCHECKER_RETURNS_BORROWED_REF_ATTRIBUTE)
#define CPYCHECKER_RETURNS_BORROWED_REF \
__attribute__((cpychecker_returns_borrowed_ref))
@@ -168,4 +168,11 @@ static double round(double num)
#define CPYCHECKER_RETURNS_BORROWED_REF
#endif
+#if defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE)
+ #define CPYCHECKER_STEALS_REFERENCE_TO_ARG(n) \
+ __attribute__((cpychecker_steals_reference_to_arg(n)))
+#else
+ #define CPYCHECKER_STEALS_REFERENCE_TO_ARG(n)
+#endif
+
#endif /* !defined(PSYCOPG_CONFIG_H) */