summaryrefslogtreecommitdiff
path: root/py/emitbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-09 15:31:53 +0000
committerDamien George <damien.p.george@gmail.com>2015-04-09 15:31:53 +0000
commit91bc32dc169560d0faf7cba177c3c9cd6b1f88b7 (patch)
tree1b2199fba49923ed1c0dbc427395069c69623f56 /py/emitbc.c
parent4dea922610c8ea6af285cd49b0a531d4941d820f (diff)
py: Provide typedefs for function types instead of writing them inline.
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index 70db06005..32d45db38 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -77,7 +77,9 @@ void emit_bc_free(emit_t *emit) {
m_del_obj(emit_t, emit);
}
-STATIC void emit_write_uint(emit_t *emit, byte*(*allocator)(emit_t*, int), mp_uint_t val) {
+typedef byte *(*emit_allocator_t)(emit_t *emit, int nbytes);
+
+STATIC void emit_write_uint(emit_t *emit, emit_allocator_t allocator, mp_uint_t val) {
// We store each 7 bits in a separate byte, and that's how many bytes needed
byte buf[BYTES_FOR_INT];
byte *p = buf + sizeof(buf);