2 /* Avoid running this transformation on the strempty function itself and
3 * on the "make_expression" macro in src/libsystemd/sd-bus/bus-convenience.c.
4 * As Coccinelle's Location object doesn't support macro "detection", use
5 * a pretty horrifying combo of specifying a file and a special "something_else"
6 * position element, which is, apparently, the default value of
7 * "current_element" before it's set (according to the source code), thus
8 * matching any "top level" position, including macros. Let's hope we never
9 * introduce a function called "something_else"...
11 position p : script:python() {
12 not (p[0].current_element == "strempty" or
13 (p[0].file == "src/libsystemd/sd-bus/bus-convenience.c" and
14 p[0].current_element == "something_else"))
27 position p : script:python() { p[0].current_element != "strempty" };
35 position p : script:python() { p[0].current_element != "strnull" };
47 position p : script:python() { p[0].current_element != "strnull" };
55 position p : script:python() { p[0].current_element != "strna" };
67 position p : script:python() { p[0].current_element != "strna" };