[ruby] check whether object is of RTypedData using RTYPEDDATA_P.

This commit is contained in:
Takashi Tamura 2017-04-29 21:55:21 +09:00 • committed by William S Fulton
commit ff9e9f9f98
4 changed files with 30 additions and 2 deletions

View file

@ -0,0 +1,20 @@
%module ruby_rdata
%{
class C {};
int take_proc_or_cpp_obj_and_ret_1(VALUE obj) {
return 1;
}
int take_proc_or_cpp_obj_and_ret_1(class C) {
return 1;
}
%}
class C {};
int take_proc_or_cpp_obj_and_ret_1(VALUE);
int take_proc_or_cpp_obj_and_ret_1(C);