Declare the property-bag helpers in the runtime header (#1972)

This commit is contained in:
Chris Tate
2026-10-23 03:33:07 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -935,6 +935,8 @@ ScrDyn *scr_dyn_new_obj_null_proto(void);
ScrDyn *scr_dyn_obj_create(ScrDyn *prototype);
ScrDyn *scr_dyn_obj_create_with_properties(ScrDyn *prototype, ScrDyn *descriptors);
ScrDyn *scr_dyn_get_prototype_for_identity(ScrDyn *object);
bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key);
bool scr_dyn_is_class_capsule(const ScrDyn *d);
ScrDyn *scr_dyn_get_prototype(ScrDyn *object);
ScrDyn *scr_dyn_get_own_property_descriptors(ScrDyn *object);
ScrDyn *scr_dyn_set_prototype(ScrDyn *object, ScrDyn *prototype);
-2
View File
@@ -16215,7 +16215,6 @@ void scr_dyn_decl_become(ScrDyn *n, const ScrDyn *capsule) {
* does not have it yet. Answers false, changing nothing, for any other bag,
* whose creation takes the general defineProperty path. Calls only
* exported functions. */
bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key);
bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key) {
if (!bag || bag->kind != SCR_DYN_OBJ || bag->non_extensible || bag->v.obj.source_access)
return false;
@@ -16227,7 +16226,6 @@ bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key) {
/* Whether a value is a capsule of a compiled class instance (its type key
* names an object type): the class tables' fast exit for every other value,
* including record and array capsules. Calls only libc. */
bool scr_dyn_is_class_capsule(const ScrDyn *d);
bool scr_dyn_is_class_capsule(const ScrDyn *d) {
return d && d->kind == SCR_DYN_TYPED_REF && d->v.typed_ref.type_key_len > 7 &&
memcmp(d->v.typed_ref.type_key, "object:", 7) == 0;