struct psi_decl_union;
struct psi_decl_enum;
struct psi_decl;
+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;
};
#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, struct psi_decl_arg *def);
+void psi_decl_type_dump(struct psi_dump *dump, struct psi_decl_type *t, unsigned level);
+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);
struct psi_decl_type *psi_decl_type_get_real(struct psi_decl_type *type);
struct psi_plist *psi_decl_type_get_args(struct psi_decl_type *dtyp, struct psi_decl_type **real_typ_ptr);
-void psi_decl_type_dump_args_with_layout(int fd, struct psi_plist *args, unsigned level);
+void psi_decl_type_dump_args_with_layout(struct psi_dump *dump, struct psi_plist *args, unsigned level);
size_t psi_decl_type_get_args_align(struct psi_plist *args);