zend_string'ify
[m6w6/ext-psi] / src / types / decl_type.h
index 4e56a23f9baec03a35b4d69eb01673722251d087..da95e6475112a54c0bc93fea466cb0a4d388dcb0 100644 (file)
@@ -36,11 +36,11 @@ struct psi_decl_struct;
 struct psi_decl_union;
 struct psi_decl_enum;
 struct psi_decl;
-struct psi_validate_stack;
+struct psi_validate_scope;
 
 struct psi_decl_type {
        struct psi_token *token;
-       char *name;
+       zend_string *name;
        token_t type;
        union {
                struct psi_decl_arg *def;
@@ -52,13 +52,14 @@ struct psi_decl_type {
 };
 
 #include <string.h>
-#define psi_decl_type_is_anon(name, type) !strncmp(name, type "@", sizeof(type))
+#define psi_decl_type_is_anon(name, type) !strncmp(name->val, type "@", sizeof(type))
 
-struct psi_decl_type *psi_decl_type_init(token_t type, const char *name);
+struct psi_decl_type *psi_decl_type_init(token_t type, zend_string *name);
 struct psi_decl_type *psi_decl_type_copy(struct psi_decl_type *src);
 void psi_decl_type_free(struct psi_decl_type **type_ptr);
 void psi_decl_type_dump(int fd, struct psi_decl_type *t, unsigned level);
-bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type, bool is_pointer, struct psi_validate_stack *type_stack);
+bool psi_decl_type_validate(struct psi_data *data, struct psi_decl_type *type,
+               struct psi_decl_arg *def, struct psi_validate_scope *scope);
 
 bool psi_decl_type_validate_args(struct psi_data *data, struct psi_decl_type *decl_type, token_t type, void *current);