Merge pull request #15552 from s-hadinger/berry_fix_crash_ctype

Berry fix crash with GC for ctype
This commit is contained in:
s-hadinger 2022-05-05 19:21:56 +02:00 committed by GitHub
commit 3530566955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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