summaryrefslogtreecommitdiffstatshomepage
path: root/py/misc.h
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-13 02:31:00 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-13 02:31:00 +0000
commit07205ec323ca98d1c23af51e099119954d0fe7a4 (patch)
tree7752e520c792f47c43a005782bde9f7386fd0a2e /py/misc.h
parent34f813ee29c7191e3de455c3fc9c788496e3b29e (diff)
downloadmicropython-07205ec323ca98d1c23af51e099119954d0fe7a4.tar.gz
micropython-07205ec323ca98d1c23af51e099119954d0fe7a4.zip
added zip()
Diffstat (limited to 'py/misc.h')
-rw-r--r--py/misc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/misc.h b/py/misc.h
index 1bf4d8f291..22158c71a7 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -21,6 +21,7 @@ typedef unsigned int uint;
#define m_renew(type, ptr, old_num, new_num) ((type*)(m_realloc((ptr), sizeof(type) * (old_num), sizeof(type) * (new_num))))
#define m_del(type, ptr, num) m_free(ptr, sizeof(type) * (num))
#define m_del_obj(type, ptr) (m_del(type, ptr, 1))
+#define m_del_var(obj_type, var_type, var_num, ptr) (m_free(ptr, sizeof(obj_type) + sizeof(var_type) * (var_num)))
void *m_malloc(int num_bytes);
void *m_malloc0(int num_bytes);