Convert VALUE to c types in ruby3

Tanks for reading.

Dear younger friends, middle-age friends and elder friends,

I am trying to use ruby in c and I've found online that I need to convert type VALUE to c types. The webpage said I need to use something likes FIX2INT in ruby/ruby.h, but I can't find this function (or Macro maybe) in ruby/ruby.h for ruby3.

Where can I get the function? Or maybe I need to use another function for ruby3?

A student name Tsing Hui

FIX2INT is defined in: ruby/internal/arithmetic/int.h

#include "ruby/ruby.h"
  #include "ruby/internal/arithmetic.h
    #include "ruby/internal/arithmetic/int.h"

···

On 6/2/22, 李钟右 <lizhongyou2013@126.com> wrote:

I am trying to use ruby in c and I've found online that I need to
convert type VALUE to c types. The webpage said I need to use something
likes FIX2INT in ruby/ruby.h, but I can't find this function (or Macro
maybe) in ruby/ruby.h for ruby3.

Where can I get the function? Or maybe I need to use another function
for ruby3?