mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
14 lines
196 B
C
14 lines
196 B
C
|
#include "ruby.h"
|
||
|
|
||
|
static VALUE
|
||
|
bug_struct_len(VALUE obj)
|
||
|
{
|
||
|
return LONG2NUM(RSTRUCT_LEN(obj));
|
||
|
}
|
||
|
|
||
|
void
|
||
|
Init_len(VALUE klass)
|
||
|
{
|
||
|
rb_define_method(klass, "rstruct_len", bug_struct_len, 0);
|
||
|
}
|