projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
silence first validation round
[m6w6/ext-psi]
/
src
/
module.c
diff --git
a/src/module.c
b/src/module.c
index f71975b295932bdc053129e3b2fd03b4e955ae41..aff784dbc28235c13f65583f69c58f6962638d25 100644
(file)
--- a/
src/module.c
+++ b/
src/module.c
@@
-37,12
+37,18
@@
zend_class_entry *psi_object_get_class_entry()
return psi_class_entry;
}
return psi_class_entry;
}
-void psi_error_wrapper(PSI_Token *t, int type, const char *msg, ...)
+void psi_error_wrapper(
void *context,
PSI_Token *t, int type, const char *msg, ...)
{
va_list argv;
const char *fn = NULL;
unsigned ln = 0;
{
va_list argv;
const char *fn = NULL;
unsigned ln = 0;
+ if (context) {
+ if (PSI_DATA(context)->flags & PSI_PARSER_SILENT) {
+ return;
+ }
+ }
+
if (t) {
fn = t->file;
ln = t->line;
if (t) {
fn = t->file;
ln = t->line;
@@
-151,6
+157,8
@@
static PHP_MINIT_FUNCTION(psi)
{
PSI_ContextOps *ops = NULL;
zend_class_entry ce = {0};
{
PSI_ContextOps *ops = NULL;
zend_class_entry ce = {0};
+ unsigned flags = psi_check_env("PSI_DEBUG") ? PSI_PARSER_DEBUG : (
+ psi_check_env("PSI_SILENT") ? PSI_PARSER_SILENT : 0);
REGISTER_INI_ENTRIES();
REGISTER_INI_ENTRIES();
@@
-177,7
+185,7
@@
static PHP_MINIT_FUNCTION(psi)
return FAILURE;
}
return FAILURE;
}
- PSI_ContextInit(&PSI_G(context), ops, psi_error_wrapper);
+ PSI_ContextInit(&PSI_G(context), ops, psi_error_wrapper
, flags
);
PSI_ContextBuild(&PSI_G(context), PSI_G(directory));
if (psi_check_env("PSI_DUMP")) {
PSI_ContextBuild(&PSI_G(context), PSI_G(directory));
if (psi_check_env("PSI_DUMP")) {