pe*alloc
[m6w6/ext-psi] / src / types / impl_def_val.c
index 311b39d27cde78b07b0f78a0f480ee59d9ef9880..fc3bc603bf4c2125f6404e71acd4d0a1b0df10e1 100644 (file)
@@ -31,7 +31,7 @@
 
 struct psi_impl_def_val *psi_impl_def_val_init(token_t t, void *data)
 {
-       struct psi_impl_def_val *def = calloc(1, sizeof(*def));
+       struct psi_impl_def_val *def = pecalloc(1, sizeof(*def), 1);
 
        switch ((def->type = t)) {
        case PSI_T_TRUE:
@@ -113,13 +113,13 @@ bool psi_impl_def_val_validate(struct psi_data *data,
                                val->type = PSI_T_FLOAT;
                                type->type = PSI_T_FLOAT;
                                zend_string_release(type->name);
-                               type->name = zend_string_init(ZEND_STRL("float"), 1);
+                               type->name = zend_string_init_interned(ZEND_STRL("float"), 1);
                                break;
                        default:
                                val->type = PSI_T_INT;
                                type->type = PSI_T_INT;
                                zend_string_release(type->name);
-                               type->name = zend_string_init(ZEND_STRL("int"), 1);
+                               type->name = zend_string_init_interned(ZEND_STRL("int"), 1);
                                break;
                        }
                        psi_num_exp_free(&val->data.num);