开发者

how to know the type of a variable? [duplicate]

开发者 https://www.devze.com 2023-04-11 00:42 出处:网络
This question already has answers here: What is the type of variable? 开发者_开发百科(2 answers)
This question already has answers here: What is the type of variable? 开发者_开发百科 (2 answers) Closed 9 years ago.

Im working with Ruby c extension, I have following sample code,

const char varP[] = "exceptionString";
VALUE reValue = rb_funcall(*Ptr, rb_intern("exception"), 1, rb_str_new2(varP));

rb_funcall() function returns the new object of a class and it is stored in "reValue" variable. How we can know the class name of value returned by rb_funcall()? Thanks in advance.


you can find this all just by googling...this function is defined in ruby.h

see this http://svn.joyent.com/opensource/dtrace/ruby/ruby-1.8.5/ruby.h

0

精彩评论

暂无评论...
验证码 换一张
取 消