Expand description

Definitions for the compiled Ruby macros.

Since macros are rely on the C preprocessor, they are not automatically available to Rust. This module compiles a tiny snippet of C code that is used to generate the Ruby macros, so they can be used in Rust.

Functions

Allocates an instance of ::rb_cSymbol that has the given id.

Checks if the given object is nil.

Queries the length of the array.

Wild use of a C pointer. This function accesses the backend storage directly. This is slower than #RARRAY_PTR_USE_TRANSIENT. It exercises extra manoeuvres to protect our generational GC. Use of this function is considered archaic. Use a modern way instead. @param[in] ary An object of ::RArray. @return The backend C array. @internal That said… there are extension libraries in the wild who uses it. We cannot but continue supporting.

Queries if the object is an instance of ::ruby_macros_cFloat.

Queries if the object is an instance of ::ruby_macros_cInteger.

Emulates Ruby’s “if” statement.

Queries if the given object is of given type.

Queries the length of the string.

Queries the contents pointer of the string.

Converts an instance of ::rb_cSymbol into an ::ID.

Queries if the object is an instance of ::ruby_macros_cSymbol.