Berry fix crash with GC for ctype

This commit is contained in:
Stephan Hadinger 2022-05-05 19:10:20 +02:00
parent 4e845127f1
commit 9e87e36ff0
2 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,7 @@ if (!gc_isconst(o)) { \
#define gc_exmark(o) (((o)->marked >> 4) & 0x0F)
#define gc_setexmark(o, k) ((o)->marked |= (k) << 4)
#define be_isgcobj(o) (var_primetype(o) >= BE_GCOBJECT)
#define be_isgcobj(o) (var_primetype(o) >= BE_GCOBJECT && var_primetype(o) < BE_GCOBJECT_MAX)
#define be_gcnew(v, t, s) be_newgcobj((v), (t), sizeof(s))
#define set_fixed(s) bbool _was_fixed = be_gc_fix_set(vm, cast(bgcobject*, (s)), 1)

View File

@ -21,6 +21,7 @@
#define BE_FUNCTION 6
#define BE_GCOBJECT 16 /* from this type can be gced */
#define BE_GCOBJECT_MAX (3<<5) /* from this type can't be gced */
#define BE_STRING 16
#define BE_CLASS 17