X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fvalidate.c;h=8aa47e3b8695a52fe8afe8ddc0f94a791f91d6bb;hp=2dfc3d46103b7d4a96be8069f19cdcf467670f3e;hb=69da9075d8a72c094e0bb977226d975365431f55;hpb=79659188464b3fba4bb497838f679bbb98f43d1a diff --git a/src/validate.c b/src/validate.c index 2dfc3d4..8aa47e3 100644 --- a/src/validate.c +++ b/src/validate.c @@ -23,9 +23,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#else +# include "php_config.h" +#endif #include "data.h" +#include "debug.h" typedef bool (*psi_validate_list_entry)(struct psi_validate_scope *scope, struct psi_data *dst, void *ptr); @@ -76,7 +81,7 @@ static bool psi_validate_type(struct psi_validate_scope *scope, { struct psi_decl_arg *def = ptr; - PSI_DEBUG_PRINT(dst, "typedef %s", def->var->name); + PSI_DEBUG_PRINT(dst, "typedef %s", def->var->name->val); return psi_decl_arg_validate_typedef(dst, def, scope); } @@ -85,7 +90,7 @@ static bool psi_validate_struct(struct psi_validate_scope *scope, { struct psi_decl_struct *str = ptr; - PSI_DEBUG_PRINT(dst, "struct %s", str->name); + PSI_DEBUG_PRINT(dst, "struct %s", str->name->val); if (psi_decl_struct_validate(dst, str, scope)) { PSI_DEBUG_PRINT(dst, "::(%zu, %zu)", str->align, str->size); return true; @@ -98,7 +103,7 @@ static bool psi_validate_union(struct psi_validate_scope *scope, { struct psi_decl_union *unn = ptr; - PSI_DEBUG_PRINT(dst, "union %s", unn->name); + PSI_DEBUG_PRINT(dst, "union %s", unn->name->val); if (psi_decl_union_validate(dst, unn, scope)) { PSI_DEBUG_PRINT(dst, "::(%zu, %zu)", unn->align, unn->size); return true; @@ -111,7 +116,7 @@ static bool psi_validate_enum(struct psi_validate_scope *scope, { struct psi_decl_enum *enm = ptr; - PSI_DEBUG_PRINT(dst, "enum %s", enm->name); + PSI_DEBUG_PRINT(dst, "enum %s", enm->name->val); return psi_decl_enum_validate(dst, enm); } @@ -120,7 +125,7 @@ static bool psi_validate_extvar(struct psi_validate_scope *scope, { struct psi_decl_extvar *evar = ptr; - PSI_DEBUG_PRINT(dst, "extvar %s", evar->arg->var->name); + PSI_DEBUG_PRINT(dst, "extvar %s", evar->arg->var->name->val); if (psi_decl_extvar_validate(dst, evar, scope)) { dst->decls = psi_plist_add(dst->decls, &evar->getter); dst->decls = psi_plist_add(dst->decls, &evar->setter); @@ -134,7 +139,7 @@ static bool psi_validate_decl(struct psi_validate_scope *scope, { struct psi_decl *decl = ptr; - PSI_DEBUG_PRINT(dst, "decl %s", decl->func->var->name); + PSI_DEBUG_PRINT(dst, "decl %s", decl->func->var->name->val); return psi_decl_validate(dst, decl, scope); } @@ -143,7 +148,7 @@ static bool psi_validate_const(struct psi_validate_scope *scope, { struct psi_const *cnst = ptr; - PSI_DEBUG_PRINT(dst, "constant %s", cnst->name); + PSI_DEBUG_PRINT(dst, "constant %s", cnst->name->val); return psi_const_validate(dst, cnst, scope); } @@ -152,7 +157,7 @@ static bool psi_validate_impl(struct psi_validate_scope *scope, { struct psi_impl *impl = ptr; - PSI_DEBUG_PRINT(dst, "impl %s", impl->func->name); + PSI_DEBUG_PRINT(dst, "impl %s", impl->func->name->val); return psi_impl_validate(dst, impl, scope); }