projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix test
[m6w6/ext-psi]
/
src
/
validate.h
diff --git
a/src/validate.h
b/src/validate.h
index a50222a455d9a48c8afb20bd72a21c1e343a0255..dcef7c706ec0cf08167f3350d425ad4d995eef39 100644
(file)
--- a/
src/validate.h
+++ b/
src/validate.h
@@
-29,8
+29,7
@@
struct psi_data;
struct psi_validate_scope {
struct psi_data;
struct psi_validate_scope {
- void *dlopened;
- HashTable *defs;
+ struct psi_cpp *cpp;
HashTable types;
HashTable structs;
HashTable unions;
HashTable types;
HashTable structs;
HashTable unions;
@@
-59,33
+58,36
@@
static inline void psi_validate_scope_dtor(struct psi_validate_scope *scope)
zend_hash_destroy(&scope->unions);
}
zend_hash_destroy(&scope->unions);
}
+bool psi_validate_scope_has_builtin(struct psi_validate_scope *scope,
+ zend_string *builtin);
+
#define psi_validate_scope_has_type(s, t) \
#define psi_validate_scope_has_type(s, t) \
- ((s) ? zend_hash_
str_exists(&(s)->types, (t), strlen
(t)) : false)
+ ((s) ? zend_hash_
exists(&(s)->types,
(t)) : false)
#define psi_validate_scope_has_struct(s, t) \
#define psi_validate_scope_has_struct(s, t) \
- ((s) ? zend_hash_
str_exists(&(s)->structs, (t), strlen
(t)) : false)
+ ((s) ? zend_hash_
exists(&(s)->structs,
(t)) : false)
#define psi_validate_scope_has_union(s, t) \
#define psi_validate_scope_has_union(s, t) \
- ((s) ? zend_hash_
str_exists(&(s)->unions, (t), strlen
(t)) : false)
+ ((s) ? zend_hash_
exists(&(s)->unions,
(t)) : false)
#define psi_validate_scope_add_type(s, t, p) \
#define psi_validate_scope_add_type(s, t, p) \
- do { if (s) zend_hash_
str_add_ptr(&(s)->types, (t), strlen
(t), (p)); } while(0)
+ do { if (s) zend_hash_
add_ptr(&(s)->types,
(t), (p)); } while(0)
#define psi_validate_scope_add_struct(s, t, p) \
#define psi_validate_scope_add_struct(s, t, p) \
- do { if (s) zend_hash_
str_add_ptr(&(s)->structs, (t), strlen
(t), (p)); } while(0)
+ do { if (s) zend_hash_
add_ptr(&(s)->structs,
(t), (p)); } while(0)
#define psi_validate_scope_add_union(s, t, p) \
#define psi_validate_scope_add_union(s, t, p) \
- do { if (s) zend_hash_
str_add_ptr(&(s)->unions, (t), strlen
(t), (p)); } while(0)
+ do { if (s) zend_hash_
add_ptr(&(s)->unions,
(t), (p)); } while(0)
#define psi_validate_scope_get_type(s, t) \
#define psi_validate_scope_get_type(s, t) \
- ((s) ? zend_hash_
str_find_ptr(&(s)->types, (t), strlen
(t)) : NULL)
+ ((s) ? zend_hash_
find_ptr(&(s)->types,
(t)) : NULL)
#define psi_validate_scope_get_struct(s, t) \
#define psi_validate_scope_get_struct(s, t) \
- ((s) ? zend_hash_
str_find_ptr(&(s)->structs, (t), strlen
(t)) : NULL)
+ ((s) ? zend_hash_
find_ptr(&(s)->structs,
(t)) : NULL)
#define psi_validate_scope_get_union(s, t) \
#define psi_validate_scope_get_union(s, t) \
- ((s) ? zend_hash_
str_find_ptr(&(s)->unions, (t), strlen
(t)) : NULL)
+ ((s) ? zend_hash_
find_ptr(&(s)->unions,
(t)) : NULL)
#define psi_validate_scope_del_type(s, t) \
#define psi_validate_scope_del_type(s, t) \
- do { if (s) zend_hash_
str_del(&(s)->types, (t), strlen
(t)); } while(0)
+ do { if (s) zend_hash_
del(&(s)->types,
(t)); } while(0)
#define psi_validate_scope_del_struct(s, t) \
#define psi_validate_scope_del_struct(s, t) \
- do { if (s) zend_hash_
str_del(&(s)->structs, (t), strlen
(t)); } while(0)
+ do { if (s) zend_hash_
del(&(s)->structs,
(t)); } while(0)
#define psi_validate_scope_del_union(s, t) \
#define psi_validate_scope_del_union(s, t) \
- do { if (s) zend_hash_
str_del(&(s)->unions, (t), strlen
(t)); } while(0)
+ do { if (s) zend_hash_
del(&(s)->unions,
(t)); } while(0)
#endif /* PSI_VALIDATE_H */
#endif /* PSI_VALIDATE_H */