flush
[m6w6/ext-psi] / php_psi.h
index 066d9d69d8371e6dba77a6572a7fa4b79fac3ac0..84b73c2101a4ed0a17a8eb794774e4e85448f203 100644 (file)
--- a/php_psi.h
+++ b/php_psi.h
@@ -24,6 +24,11 @@ extern zend_module_entry psi_module_entry;
 
 void psi_error(int type, const char *msg, ...);
 
+static inline int psi_check_env(const char *var) {
+       char *set = getenv(var);
+       return (set && *set && '0' != *set);
+}
+
 size_t psi_t_alignment(token_t t);
 size_t psi_t_size(token_t t);
 size_t psi_t_align(token_t t, size_t s);