From 732407f1bf12364375162e8fb73816532a5d139c Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 29 Dec 2013 19:33:23 +0000 Subject: Change memory allocation API to require size for free and realloc. --- py/lexerunix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py/lexerunix.c') diff --git a/py/lexerunix.c b/py/lexerunix.c index 80daf6009..398cb792a 100644 --- a/py/lexerunix.c +++ b/py/lexerunix.c @@ -24,9 +24,9 @@ unichar str_buf_next_char(str_buf_t *sb) { void str_buf_free(str_buf_t *sb) { if (sb) { if (sb->free) { - m_free((char*)sb->src_beg); + m_del(char, (char*)sb->src_beg, 0 /* unknown size of src_beg */); } - m_free(sb); + m_del_obj(str_buf_t, sb); } } @@ -52,7 +52,7 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename) { close(fd); if (read_size != size) { printf("error reading file %s\n", filename); - m_free(data); + m_del(char, data, size); return NULL; } -- cgit v1.2.3