Project

General

Profile

Feature #5666 » path2class.patch

header update - tenderlovemaking (Aaron Patterson), 11/24/2011 06:53 AM

View differences:

README.EXT
311 311
  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
312 312
  VALUE rb_define_module_under(VALUE outer, const char *name)
313 313

  
314
To look up a constant by a C string, use the function below:
315

  
316
  VALUE rb_path2class(const char *path)
317

  
314 318
2.1.2 Method/singleton method definition
315 319

  
316 320
To define methods or singleton methods, use these functions:
README.EXT.ja
348 348
  VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
349 349
  VALUE rb_define_module_under(VALUE outer, const char *name)
350 350

  
351
C の文字列で Ruby クラスを見つけたい時に、以下の関数を使って下さい。
352

  
353
  VALUE rb_path2class(const char *path)
354

  
351 355
2.1.2 メソッド/特異メソッド定義
352 356

  
353 357
メソッドや特異メソッドを定義するには以下の関数を使います.
include/ruby/intern.h
862 862
void rb_set_class_path(VALUE, VALUE, const char*);
863 863
void rb_set_class_path_string(VALUE, VALUE, VALUE);
864 864
VALUE rb_path_to_class(VALUE);
865
VALUE rb_path2class(const char*);
866 865
void rb_name_class(VALUE, ID);
867 866
VALUE rb_class_name(VALUE);
868 867
void rb_autoload(VALUE, ID, const char*);
include/ruby/ruby.h
1074 1074
VALUE rb_define_module(const char*);
1075 1075
VALUE rb_define_class_under(VALUE, const char*, VALUE);
1076 1076
VALUE rb_define_module_under(VALUE, const char*);
1077
VALUE rb_path2class(const char*);
1077 1078

  
1078 1079
void rb_include_module(VALUE,VALUE);
1079 1080
void rb_extend_object(VALUE,VALUE);