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_free_stmt *psi_free_stmt_init(struct psi_plist *exps)
{
- struct psi_free_stmt *f = calloc(1, sizeof(*f));
+ struct psi_free_stmt *f = pecalloc(1, sizeof(*f), 1);
f->exps = exps;
return f;
}
struct psi_free_stmt *f = *f_ptr;
*f_ptr = NULL;
- if (f->token) {
- free(f->token);
- }
+ psi_token_free(&f->token);
psi_plist_free(f->exps);
free(f);
}
}
-void psi_free_stmt_dump(int fd, struct psi_free_stmt *fre)
+void psi_free_stmt_dump(struct psi_dump *dump, struct psi_free_stmt *fre)
{
size_t i;
struct psi_free_exp *exp;
- dprintf(fd, "\tfree ");
+ PSI_DUMP(dump, "\tfree ");
for (i = 0; psi_plist_get(fre->exps, i, &exp); ++i) {
if (i) {
- dprintf(fd, ", ");
+ PSI_DUMP(dump, ", ");
}
- psi_free_exp_dump(fd, exp);
+ psi_free_exp_dump(dump, exp);
}
- dprintf(fd, ";\n");
+ PSI_DUMP(dump, ";\n");
}
bool psi_free_stmts_validate(struct psi_data *data, struct psi_validate_scope *scope)