Skip to content

Commit 84f4e82

Browse files
committed
Add RARRAY_LEN and RARRAY_CONST_PTR
1 parent a0b27f1 commit 84f4e82

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ruby/ruby_internal_core_rarray.go

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package ruby
2+
3+
/*
4+
#include "ruby.h"
5+
*/
6+
import "C"
7+
8+
// c.f. https://github.com/ruby/ruby/blob/master/include/ruby/internal/core/rarray.h
9+
10+
// RARRAY_LEN is alias to [RbArrayLen]
11+
func RARRAY_LEN(a VALUE) Long {
12+
return RbArrayLen(a)
13+
}
14+
15+
// RARRAY_CONST_PTR is alias to [RbArrayConstPtr]
16+
func RARRAY_CONST_PTR(a VALUE) *VALUE {
17+
return RbArrayConstPtr(a)
18+
}

0 commit comments

Comments
 (0)