From 3e354c09d7fa438e37de35a680ceaf65fcc420de Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Fri, 1 May 2015 22:29:54 +0200 Subject: [PATCH] Add cpychecker macro for exception negative results Per http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html#errors-in-exception-handling. --- acl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/acl.c b/acl.c index 06d9d64..0409132 100644 --- a/acl.c +++ b/acl.c @@ -79,6 +79,15 @@ #define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(typename) #endif +/* The checker automatically defines this preprocessor name when creating + the custom attribute: */ +#if defined(WITH_CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION_ATTRIBUTE) + #define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION \ +__attribute__((cpychecker_negative_result_sets_exception)) + #else + #define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION +#endif + static PyTypeObject ACL_Type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF("ACL_Object"); static PyObject* ACL_applyto(PyObject* obj, PyObject* args); -- 2.39.5