13件ヒット
[1-13件を表示]
(0.031秒)
キーワード
-
Check
_ Type (1) -
arg
_ defined (1) -
convert
_ type (1) - logop (1)
- nodetype (1)
-
rb
_ ary _ to _ s (1) -
rb
_ assoc _ new (1) -
rb
_ check _ convert _ type (1) -
rb
_ class _ real (1) -
rb
_ convert _ type (1) -
rb
_ node _ newnode (1) -
st
_ init _ table (1) -
st
_ init _ table _ with _ size (1)
検索結果
先頭5件
- VALUE rb
_ convert _ type(VALUE val , int type , const char *tname , const char *method) - VALUE rb
_ check _ convert _ type(VALUE val , int type , const char *tname , const char *method) - static enum node
_ type nodetype(node) - void Check
_ Type(VALUE val , int typeflag) - static VALUE convert
_ type(VALUE val , const char *tname , const char *method , int raise)
-
VALUE rb
_ convert _ type(VALUE val , int type , const char *tname , const char *method) (18670.0) -
オブジェクト val をクラス type のインスタンスに変換します。 変換には、val.method の戻り値が使われます。
オブジェクト val をクラス type のインスタンスに変換します。
変換には、val.method の戻り値が使われます。
val がもともと type クラスのインスタンスなら val を
そのまま返します。 -
VALUE rb
_ check _ convert _ type(VALUE val , int type , const char *tname , const char *method) (18640.0) -
val.method を実行してクラス tname のインスタンスを返します。 val がメソッド method を持たなければ nil を返します。
val.method を実行してクラス tname のインスタンスを返します。
val がメソッド method を持たなければ nil を返します。
type は、T_ARRAY, T_STRING などの構造体を表す ID です。
method の結果の型が type でなければ例外 TypeError が発生します。 -
static enum node
_ type nodetype(node) (18604.0) -
node の種類を返します。 デバッグ用です。
node の種類を返します。
デバッグ用です。 -
void Check
_ Type(VALUE val , int typeflag) (18604.0) -
val の構造体型フラグが typeflag でなければ 例外 TypeError を発生します。val は即値の VALUE であっても 構いません。
val の構造体型フラグが typeflag でなければ
例外 TypeError を発生します。val は即値の VALUE であっても
構いません。 -
static VALUE convert
_ type(VALUE val , const char *tname , const char *method , int raise) (18304.0) -
-
NODE * rb
_ node _ newnode(enum node _ type type , NODE *a0 , NODE *a1 , NODE *a2) (652.0) -
ノードタイプが type で a0 a1 a2 を 要素に持つノードを生成し、返します。
ノードタイプが type で a0 a1 a2 を
要素に持つノードを生成し、返します。 -
st
_ table * st _ init _ table _ with _ size(struct st _ hash _ type *type , int size) (652.0) -
st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。
st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。 -
st
_ table * st _ init _ table(struct st _ hash _ type *type) (604.0) -
-
static NODE * logop(enum node
_ type type , NODE *left , NODE *right) (604.0) -
-
static char * arg
_ defined(VALUE self , NODE *node , char *buf , char *type) (304.0) -
-
VALUE rb
_ assoc _ new(VALUE a , VALUE b) (40.0) -
[a,b] を返します。
[a,b] を返します。
対応するRubyコード
[a, b]
使用例
VALUE assoc_string(VALUE str_a, VALUE str_b)
{
Check_Type(str_a, T_STRING);
Check_Type(str_b, T_STRING);
return rb_assoc_new(str_a, str_b);
} -
VALUE rb
_ ary _ to _ s(VALUE ary) (22.0) -
ary.to_s
ary.to_s
使用例
void debug_print(VALUE ary)
{
Check_Type(ary, T_ARRAY);
printf("%s", STR2CSTR(rb_ary_to_s(ary)));
} -
VALUE rb
_ class _ real(VALUE cl) (22.0) -
特異クラスや化身クラス (T_ICLASS) を飛ばして cl の スーパークラスを辿り、Ruby レベルに露出してもよいクラスを返します。
特異クラスや化身クラス (T_ICLASS) を飛ばして cl の
スーパークラスを辿り、Ruby レベルに露出してもよいクラスを返します。
例:
rb_class_real(RBASIC(klass)->super)
rb_obj_class(obj) は、obj のクラスを返す汎用の関数(Object#type と
同じ)だが、obj が Qtrue などでない RBasic 構造のものであることが
わかっているなら
rb_class_real(RBASIC(obj)->klass)
でも良い。(が、やはり rb_obj_class(obj) を使う方が無難だろう)...