Im working on Ruby c extension, I have following code from c program,
VALUE var = myFunction(arg1, arg2);
int varType = TYPE(var);
printf("Type of the var is :: %d", varType);
Above printf gives output as follow:
Type of the var is :: 34
As myFunction is inbuild function i dont know the return type of that function.
can any one tell me the type of “var” variable return from myFunction?
Thanks in advance.
The
TYPEmacro returns values enumerated in ruby.h. From there, it follows 34 is T_DATA, which is a wrapped C structure.