OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
#include "data.h"
struct psi_const *psi_const_init(struct psi_impl_type *type, zend_string *name,
bool psi_const_validate(struct psi_data *data, struct psi_const *c,
struct psi_validate_scope *scope)
{
- if (c->type) {
- switch (c->type->type) {
- case PSI_T_BOOL:
- case PSI_T_INT:
- case PSI_T_FLOAT:
- case PSI_T_DOUBLE:
- case PSI_T_STRING:
- break;
- default:
- data->error(data, val->token, PSI_WARNING,
- "Invalid default value type '%s', "
- "expected one of bool, int, float/double or string.",
- type->name->val);
- return false;
- }
- }
if (!psi_impl_def_val_validate(data, c->val, c->type, scope)) {
return false;
}