summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/core/robject.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ruby/internal/core/robject.h b/include/ruby/internal/core/robject.h
index bec0b45fd4..e0514d7dd2 100644
--- a/include/ruby/internal/core/robject.h
+++ b/include/ruby/internal/core/robject.h
@@ -192,6 +192,16 @@ ROBJECT_NUMIV(VALUE obj)
#endif
}
+static inline void
+ROBJECT_SET_NUMIV(VALUE obj, uint32_t capacity)
+{
+#if USE_RVARGC
+ ROBJECT(obj)->numiv = capacity;
+#else
+ ROBJECT(obj)->as.heap.numiv = capacity;
+#endif
+}
+
RBIMPL_ATTR_PURE_UNLESS_DEBUG()
RBIMPL_ATTR_ARTIFICIAL()
/**