projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge branch 'slimconfigure'
[m6w6/ext-psi]
/
src
/
types
/
const.c
diff --git
a/src/types/const.c
b/src/types/const.c
index 449f04a1221e493e366d392825f7fb47d7eea477..18e9da61d1e379a71a7bd6d87cab6c9a78d8b226 100644
(file)
--- a/
src/types/const.c
+++ b/
src/types/const.c
@@
-26,7
+26,7
@@
#include "php_psi_stdinc.h"
#include "data.h"
#include "php_psi_stdinc.h"
#include "data.h"
-struct psi_const *psi_const_init(struct psi_
const
_type *type, const char *name,
+struct psi_const *psi_const_init(struct psi_
impl
_type *type, const char *name,
struct psi_impl_def_val *val)
{
struct psi_const *c = calloc(1, sizeof(*c));
struct psi_impl_def_val *val)
{
struct psi_const *c = calloc(1, sizeof(*c));
@@
-45,7
+45,7
@@
void psi_const_free(struct psi_const **constant_ptr)
if (constant->token) {
free(constant->token);
}
if (constant->token) {
free(constant->token);
}
- psi_
const
_type_free(&constant->type);
+ psi_
impl
_type_free(&constant->type);
free(constant->name);
psi_impl_def_val_free(&constant->val);
free(constant);
free(constant->name);
psi_impl_def_val_free(&constant->val);
free(constant);
@@
-55,15
+55,16
@@
void psi_const_free(struct psi_const **constant_ptr)
void psi_const_dump(int fd, struct psi_const *cnst)
{
dprintf(fd, "const ");
void psi_const_dump(int fd, struct psi_const *cnst)
{
dprintf(fd, "const ");
- psi_
const
_type_dump(fd, cnst->type);
+ psi_
impl
_type_dump(fd, cnst->type);
dprintf(fd, " %s = ", cnst->name);
psi_impl_def_val_dump(fd, cnst->val);
dprintf(fd, ";");
}
dprintf(fd, " %s = ", cnst->name);
psi_impl_def_val_dump(fd, cnst->val);
dprintf(fd, ";");
}
-bool psi_const_validate(struct psi_data *data, struct psi_const *c)
+bool psi_const_validate(struct psi_data *data, struct psi_const *c,
+ struct psi_validate_scope *scope)
{
{
- if (!psi_impl_def_val_validate(data, c->val, c->type
->type, c->type->nam
e)) {
+ if (!psi_impl_def_val_validate(data, c->val, c->type
, scop
e)) {
return false;
}
return true;
return false;
}
return true;