fix calling convention and arg types
[m6w6/ext-psi] / src / types / return_stmt.c
index 8ff646d3d9448eea3f400df7c548ccab3e94283e..41a17eed41a293a56553923f88692f27ca34f22b 100644 (file)
@@ -29,7 +29,7 @@
 
 struct psi_return_stmt *psi_return_stmt_init(struct psi_return_exp *exp)
 {
-       struct psi_return_stmt *ret = calloc(1, sizeof(*ret));
+       struct psi_return_stmt *ret = pecalloc(1, sizeof(*ret), 1);
        ret->exp = exp;
        return ret;
 }
@@ -52,11 +52,11 @@ void psi_return_stmt_free(struct psi_return_stmt **ret_ptr)
        }
 }
 
-void psi_return_stmt_dump(int fd, struct psi_return_stmt *ret)
+void psi_return_stmt_dump(struct psi_dump *dump, struct psi_return_stmt *ret)
 {
-       dprintf(fd, "\treturn ");
-       psi_return_exp_dump(fd, ret->exp);
-       dprintf(fd, ";\n");
+       PSI_DUMP(dump, "\treturn ");
+       psi_return_exp_dump(dump, ret->exp);
+       PSI_DUMP(dump, ";\n");
 }
 
 bool psi_return_stmt_validate(struct psi_data *data,