update readme
[m6w6/ext-psi] / src / types / let_calloc.c
index 8b2643102f5aa226d45b959285516e33c72d079f..270e3c5c43ac7a441e0fee18cd71b004a10c2e45 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_let_calloc *psi_let_calloc_init(struct psi_num_exp *nmemb,
                struct psi_num_exp *size)
 {
-       struct psi_let_calloc *alloc = calloc(1, sizeof(*alloc));
+       struct psi_let_calloc *alloc = pecalloc(1, sizeof(*alloc), 1);
 
        alloc->nmemb = nmemb;
        alloc->size = size;
@@ -50,11 +54,11 @@ void psi_let_calloc_free(struct psi_let_calloc **alloc_ptr)
        }
 }
 
-void psi_let_calloc_dump(int fd, struct psi_let_calloc *alloc)
+void psi_let_calloc_dump(struct psi_dump *dump, struct psi_let_calloc *alloc)
 {
-       dprintf(fd, "calloc(");
-       psi_num_exp_dump(fd, alloc->nmemb);
-       dprintf(fd, ", ");
-       psi_num_exp_dump(fd, alloc->size);
-       dprintf(fd, ")");
+       PSI_DUMP(dump, "calloc(");
+       psi_num_exp_dump(dump, alloc->nmemb);
+       PSI_DUMP(dump, ", ");
+       psi_num_exp_dump(dump, alloc->size);
+       PSI_DUMP(dump, ")");
 }