summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/struct.c b/struct.c
index a4cab45945..150ca20a39 100644
--- a/struct.c
+++ b/struct.c
@@ -617,9 +617,6 @@ rb_struct_new(VALUE klass, ...)
}
static VALUE
-rb_struct_size(VALUE s);
-
-static VALUE
struct_enum_size(VALUE s, VALUE args, VALUE eobj)
{
return rb_struct_size(s);
@@ -1123,12 +1120,18 @@ rb_struct_eql(VALUE s, VALUE s2)
* joe.length #=> 3
*/
-static VALUE
+VALUE
rb_struct_size(VALUE s)
{
return LONG2FIX(RSTRUCT_LEN(s));
}
+const VALUE*
+rb_struct_ptr(VALUE s)
+{
+ return RSTRUCT_CONST_PTR(s);
+}
+
/*
* call-seq:
* struct.dig(key, ...) -> object