build administrativa
[m6w6/ext-psi] / src / types / const.c
index fd1a165ee65841943e1667138866da8e0c27f58d..6d44d7741602d304cb1ab90ba71d3bbfc197fdb6 100644 (file)
  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,
@@ -69,22 +73,6 @@ void psi_const_dump(struct psi_dump *dump, struct psi_const *cnst)
 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;
        }