aboutsummaryrefslogtreecommitdiff
path: root/py/gc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-11-27 13:07:48 +0000
committerDamien George <damien.p.george@gmail.com>2015-11-29 14:25:04 +0000
commit94fe6e523d42ecc342c1f6a9734ed2edf232ddbd (patch)
treedc09a9c9d439fb8e4b7b8477b87de16261430eb7 /py/gc.h
parent254cfa6c3189983050e66ccb4ec267b41299dd64 (diff)
py/gc: Move away from using mp_uint_t, instead use uintptr_t and size_t.
The GC works with concrete pointers and so the types should reflect this.
Diffstat (limited to 'py/gc.h')
-rw-r--r--py/gc.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/py/gc.h b/py/gc.h
index 3bcf58664..e790c34ac 100644
--- a/py/gc.h
+++ b/py/gc.h
@@ -42,21 +42,21 @@ bool gc_is_locked(void);
// A given port must implement gc_collect by using the other collect functions.
void gc_collect(void);
void gc_collect_start(void);
-void gc_collect_root(void **ptrs, mp_uint_t len);
+void gc_collect_root(void **ptrs, size_t len);
void gc_collect_end(void);
-void *gc_alloc(mp_uint_t n_bytes, bool has_finaliser);
+void *gc_alloc(size_t n_bytes, bool has_finaliser);
void gc_free(void *ptr); // does not call finaliser
-mp_uint_t gc_nbytes(const void *ptr);
-void *gc_realloc(void *ptr, mp_uint_t n_bytes, bool allow_move);
+size_t gc_nbytes(const void *ptr);
+void *gc_realloc(void *ptr, size_t n_bytes, bool allow_move);
typedef struct _gc_info_t {
- mp_uint_t total;
- mp_uint_t used;
- mp_uint_t free;
- mp_uint_t num_1block;
- mp_uint_t num_2block;
- mp_uint_t max_block;
+ size_t total;
+ size_t used;
+ size_t free;
+ size_t num_1block;
+ size_t num_2block;
+ size_t max_block;
} gc_info_t;
void gc_info(gc_info_t *info);