X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Ftypes%2Fdecl.c;h=2d974808b7bd8ee3d7cf735632ba22ad8f878876;hb=ad2c22df5e451fffecc7b7ebdc9c5a4bb36e543e;hp=69e0b662b890369d16552a628d98d017587ffac4;hpb=4ace6fa9bfa459902184655ee40d6136f25915c8;p=m6w6%2Fext-psi diff --git a/src/types/decl.c b/src/types/decl.c index 69e0b66..2d97480 100644 --- a/src/types/decl.c +++ b/src/types/decl.c @@ -25,7 +25,11 @@ #include "php_psi_stdinc.h" +#include "php_psi.h" + #include +#include + #include "data.h" #define PSI_FUNC_REDIRS @@ -157,3 +161,17 @@ bool psi_decl_validate_nodl(struct psi_data *data, struct psi_decl *decl, return true; } + +bool psi_decl_is_blacklisted(const char *name) +{ + char *blacklisted; + size_t i = 0; + + while (psi_plist_get(PSI_G(blacklist).decls, i++, &blacklisted)) { + if (!fnmatch(blacklisted, name, 0)) { + return true; + } + } + return false; +} +