mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* README.EXT, README.EXT.ja: add new features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									898c734378
								
							
						
					
					
						commit
						7f249811e1
					
				
					 3 changed files with 44 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
Wed Sep 21 08:20:24 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* README.EXT, README.EXT.ja: add new features.
 | 
			
		||||
 | 
			
		||||
Wed Sep 21 07:43:58 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* lib/optparse.rb (default_argv, Arguable#options): defaults strings
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								README.EXT
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								README.EXT
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -295,6 +295,15 @@ To define alias to the method,
 | 
			
		|||
 | 
			
		||||
  void rb_define_alias(VALUE module, const char* new, const char* old);
 | 
			
		||||
 | 
			
		||||
To define and undefine the `allocate' class method,
 | 
			
		||||
 | 
			
		||||
  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
 | 
			
		||||
  void rb_undef_alloc_func(VALUE klass);
 | 
			
		||||
 | 
			
		||||
func have to take the klass as the argument and return a newly
 | 
			
		||||
allocated instance.  This instance should be empty as possible,
 | 
			
		||||
without any expensive (including external) resources.
 | 
			
		||||
 | 
			
		||||
2.1.3 Constant definition
 | 
			
		||||
 | 
			
		||||
We have 2 functions to define constants:
 | 
			
		||||
| 
						 | 
				
			
			@ -612,8 +621,14 @@ various conditions.
 | 
			
		|||
 | 
			
		||||
The value of the variables below will affect the Makefile.
 | 
			
		||||
 | 
			
		||||
  $CFLAGS: included in CFLAGS make variable (such as -I)
 | 
			
		||||
  $CFLAGS: included in CFLAGS make variable (such as -O)
 | 
			
		||||
  $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
 | 
			
		||||
  $LDFLAGS: included in LDFLAGS make variable (such as -L)
 | 
			
		||||
  $objs: list of object file names
 | 
			
		||||
 | 
			
		||||
In normal, object files list is automatically generated by searching
 | 
			
		||||
source files, but you need directs them explicitly if any sources will
 | 
			
		||||
be generated while building.
 | 
			
		||||
 | 
			
		||||
If a compilation condition is not fulfilled, you should not call
 | 
			
		||||
``create_makefile''.  The Makefile will not generated, compilation will
 | 
			
		||||
| 
						 | 
				
			
			@ -771,7 +786,9 @@ NUM2INT(value)
 | 
			
		|||
INT2NUM(i)
 | 
			
		||||
NUM2DBL(value)
 | 
			
		||||
rb_float_new(f)
 | 
			
		||||
STR2CSTR(value)
 | 
			
		||||
StringValue(value)
 | 
			
		||||
StringValuePtr(value)
 | 
			
		||||
StringValueCStr(value)
 | 
			
		||||
rb_str_new2(s)
 | 
			
		||||
 | 
			
		||||
** defining class/module
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -331,6 +331,17 @@ private
 | 
			
		|||
 | 
			
		||||
  void rb_define_alias(VALUE module, const char* new, const char* old);
 | 
			
		||||
 | 
			
		||||
クラスメソッドallocateを定義したり削除したりするための関数は
 | 
			
		||||
以下の通りです。
 | 
			
		||||
 | 
			
		||||
  void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
 | 
			
		||||
  void rb_undef_alloc_func(VALUE klass);
 | 
			
		||||
 | 
			
		||||
funcはクラスを引数として受け取って、新しく割り当てられたイン
 | 
			
		||||
スタンスを返さなくてはなりません。このインスタンスは、外部リ
 | 
			
		||||
ソースなどを含まない、できるだけ「空」のままにしておいたほう
 | 
			
		||||
がよいでしょう。
 | 
			
		||||
 | 
			
		||||
2.1.3 定数定義
 | 
			
		||||
 | 
			
		||||
拡張ライブラリが必要な定数はあらかじめ定義しておいた方が良い
 | 
			
		||||
| 
						 | 
				
			
			@ -710,8 +721,14 @@ Makefile
 | 
			
		|||
 | 
			
		||||
以下の変数を使うことができます.
 | 
			
		||||
 | 
			
		||||
  $CFLAGS: コンパイル時に追加的に指定するフラグ(-Iなど)
 | 
			
		||||
  $CFLAGS: コンパイル時に追加的に指定するフラグ(-Oなど)
 | 
			
		||||
  $CPPFLAGS: プリプロセッサに追加的に指定するフラグ(-Iや-Dなど)
 | 
			
		||||
  $LDFLAGS: リンク時に追加的に指定するフラグ(-Lなど)
 | 
			
		||||
  $objs: リンクされるオブジェクトファイル名のリスト
 | 
			
		||||
 | 
			
		||||
オブジェクトファイルのリストは、通常はソースファイルを検索し
 | 
			
		||||
て自動的に生成されますが、makeの途中でソースを生成するような
 | 
			
		||||
場合は明示的に指定する必要があります。
 | 
			
		||||
 | 
			
		||||
ライブラリをコンパイルする条件が揃わず,そのライブラリをコン
 | 
			
		||||
パイルしない時にはcreate_makefileを呼ばなければMakefileは生
 | 
			
		||||
| 
						 | 
				
			
			@ -891,7 +908,9 @@ NUM2INT(value)
 | 
			
		|||
INT2NUM(i)
 | 
			
		||||
NUM2DBL(value)
 | 
			
		||||
rb_float_new(f)
 | 
			
		||||
STR2CSTR(value)
 | 
			
		||||
StringValue(value)
 | 
			
		||||
StringValuePtr(value)
 | 
			
		||||
StringValueCStr(value)
 | 
			
		||||
rb_str_new2(s)
 | 
			
		||||
 | 
			
		||||
** クラス/モジュール定義
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue