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
/
module.c
diff --git
a/src/module.c
b/src/module.c
index 20a1836140a0122c25ff83b726345e867f6dc2bc..1323a9f5b5f616d83ac752a2af17a368a708ebee 100644
(file)
--- a/
src/module.c
+++ b/
src/module.c
@@
-133,6
+133,7
@@
static PHP_FUNCTION(psi_validate)
struct psi_parser_input *I;
struct psi_parser P;
struct psi_data D = {0};
struct psi_parser_input *I;
struct psi_parser P;
struct psi_data D = {0};
+ struct psi_validate_scope S = {0};
zend_long flags = 0;
#if PHP_DEBUG
zend_long flags = 0;
#if PHP_DEBUG
@@
-155,7
+156,10
@@
static PHP_FUNCTION(psi_validate)
psi_parser_parse(&P, I);
psi_data_ctor(&D, P.error, P.flags);
psi_parser_parse(&P, I);
psi_data_ctor(&D, P.error, P.flags);
- RETVAL_BOOL(psi_data_validate(&D, PSI_DATA(&P)) && !P.errors);
+ psi_validate_scope_ctor(&S);
+ S.defs = &P.preproc->defs;
+ RETVAL_BOOL(psi_validate(&S, &D, PSI_DATA(&P)) && !P.errors);
+ psi_validate_scope_dtor(&S);
psi_data_dtor(&D);
psi_parser_dtor(&P);
free(I);
psi_data_dtor(&D);
psi_parser_dtor(&P);
free(I);
@@
-170,6
+174,7
@@
static PHP_FUNCTION(psi_validate_string)
struct psi_parser_input *I;
struct psi_parser P;
struct psi_data D = {0};
struct psi_parser_input *I;
struct psi_parser P;
struct psi_data D = {0};
+ struct psi_validate_scope S = {0};
zend_long flags = 0;
#if PHP_DEBUG
zend_long flags = 0;
#if PHP_DEBUG
@@
-192,7
+197,10
@@
static PHP_FUNCTION(psi_validate_string)
psi_parser_parse(&P, I);
psi_data_ctor(&D, P.error, P.flags);
psi_parser_parse(&P, I);
psi_data_ctor(&D, P.error, P.flags);
- RETVAL_BOOL(psi_data_validate(&D, PSI_DATA(&P)) && !P.errors);
+ psi_validate_scope_ctor(&S);
+ S.defs = &P.preproc->defs;
+ RETVAL_BOOL(psi_validate(&S, &D, PSI_DATA(&P)) && !P.errors);
+ psi_validate_scope_dtor(&S);
psi_data_dtor(&D);
psi_parser_dtor(&P);
free(I);
psi_data_dtor(&D);
psi_parser_dtor(&P);
free(I);