1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* extension.rdoc, extension.ja.rdoc: [DOC] Fix some errors.

Renamed files, wrong method names or argument types; the example
  GetDBM macro is now updated to the current version of the actual
  code.
  patches are derived from Marcus Stollsteimer in [ruby-core:74690].
  [Bug #12228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2016-04-22 09:32:01 +00:00
parent 42569dd48e
commit 77e74bef16
4 changed files with 31 additions and 20 deletions

View file

@ -1,3 +1,12 @@
Fri Apr 22 18:30:50 2016 NAKAMURA Usaku <usa@ruby-lang.org>
* extension.rdoc, extension.ja.rdoc: [DOC] Fix some errors.
Renamed files, wrong method names or argument types; the example
GetDBM macro is now updated to the current version of the actual
code.
patches are derived from Marcus Stollsteimer in [ruby-core:74690].
[Bug #12228]
Fri Apr 22 18:22:15 2016 NARUSE, Yui <naruse@ruby-lang.org> Fri Apr 22 18:22:15 2016 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo. * ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo.

View file

@ -730,8 +730,9 @@ To retrieve the dbmdata structure from a Ruby object, we define the
following macro: following macro:
#define GetDBM(obj, dbmp) do {\ #define GetDBM(obj, dbmp) do {\
Data_Get_Struct(obj, struct dbmdata, dbmp);\ Data_Get_Struct((obj), struct dbmdata, (dbmp));\
if (dbmp->di_dbm == 0) closed_dbm();\ if ((dbmp) == 0) closed_dbm();\
if ((dbmp)->di_dbm == 0) closed_dbm();\
} while (0) } while (0)
This sort of complicated macro does the retrieving and close checking for This sort of complicated macro does the retrieving and close checking for
@ -1192,7 +1193,7 @@ void rb_define_readonly_variable(const char *name, VALUE *var) ::
Defines a read-only global variable. Works just like Defines a read-only global variable. Works just like
rb_define_variable(), except the defined variable is read-only. rb_define_variable(), except the defined variable is read-only.
void rb_define_virtual_variable(const char *name, VALUE (*getter)(), VALUE (*setter)()) :: void rb_define_virtual_variable(const char *name, VALUE (*getter)(), void (*setter)()) ::
Defines a virtual variable, whose behavior is defined by a pair of C Defines a virtual variable, whose behavior is defined by a pair of C
functions. The getter function is called when the variable is functions. The getter function is called when the variable is
@ -1204,7 +1205,7 @@ void rb_define_virtual_variable(const char *name, VALUE (*getter)(), VALUE (*set
The getter function must return the value for the access. The getter function must return the value for the access.
void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), VALUE (*setter)()) :: void rb_define_hooked_variable(const char *name, VALUE *var, VALUE (*getter)(), void (*setter)()) ::
Defines hooked variable. It's a virtual variable with a C variable. Defines hooked variable. It's a virtual variable with a C variable.
The getter is called as The getter is called as
@ -1231,7 +1232,7 @@ void rb_define_global_const(const char *name, VALUE val) ::
Defines a global constant. This is just the same as Defines a global constant. This is just the same as
rb_define_const(cKernal, name, val) rb_define_const(rb_cObject, name, val)
== Method Definition == Method Definition
@ -1359,7 +1360,7 @@ char *rb_class2name(VALUE klass) ::
Returns the name of the class. Returns the name of the class.
int rb_respond_to(VALUE object, ID id) :: int rb_respond_to(VALUE obj, ID id) ::
Returns true if the object responds to the message specified by id. Returns true if the object responds to the message specified by id.
@ -1387,7 +1388,7 @@ VALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv, VALUE (*func) (A
whereas yielded values can be gotten via argc/argv of the third/fourth whereas yielded values can be gotten via argc/argv of the third/fourth
arguments. arguments.
[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) :: [OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) ::
Calls the function func1, supplying func2 as the block. func1 will be Calls the function func1, supplying func2 as the block. func1 will be
called with the argument arg1. func2 receives the value from yield as called with the argument arg1. func2 receives the value from yield as

View file

@ -275,7 +275,7 @@ rb_utf8_str_new_cstr(const char *ptr)
エンコーディングがUTF-8のRubyの文字列を生成する. エンコーディングがUTF-8のRubyの文字列を生成する.
rb_usascii_str_new_literal(const char *ptr) rb_utf8_str_new_literal(const char *ptr)
Cのリテラル文字列からエンコーディングがUTF-8のRubyの文字列を生成する Cのリテラル文字列からエンコーディングがUTF-8のRubyの文字列を生成する
@ -808,8 +808,9 @@ Dataオブジェクトからdbmstruct構造体のポインタを取り出すた
に以下のマクロを使っています. に以下のマクロを使っています.
#define GetDBM(obj, dbmp) do {\ #define GetDBM(obj, dbmp) do {\
Data_Get_Struct(obj, struct dbmdata, dbmp);\ Data_Get_Struct((obj), struct dbmdata, (dbmp));\
if (dbmp->di_dbm == 0) closed_dbm();\ if ((dbmp) == 0) closed_dbm();\
if ((dbmp)->di_dbm == 0) closed_dbm();\
} while (0) } while (0)
ちょっと複雑なマクロですが要するにdbmdata構造体のポインタ ちょっと複雑なマクロですが要するにdbmdata構造体のポインタ
@ -986,10 +987,10 @@ variable.c :: 変数と定数
== Rubyの構文解析器 == Rubyの構文解析器
parse.y : 字句解析器と構文定義 parse.y : 字句解析器と構文定義
-> parse.c : 自動生成 -> parse.c : 自動生成
keywords : 予約語 defs/keywords : 予約語
-> lex.c : 自動生成 -> lex.c : 自動生成
== Rubyの評価器 (通称YARV) == Rubyの評価器 (通称YARV)
compile.c compile.c
@ -1009,12 +1010,12 @@ variable.c :: 変数と定数
vm_insnhelper.c vm_insnhelper.c
vm_method.c vm_method.c
opt_insns_unif.def : 命令融合 defs/opt_insns_unif.def : 命令融合
opt_operand.def : 最適化のための定義 defs/opt_operand.def : 最適化のための定義
-> insn*.inc : 自動生成 -> insn*.inc : 自動生成
-> opt*.inc : 自動生成 -> opt*.inc : 自動生成
-> vm.inc : 自動生成 -> vm.inc : 自動生成
== 正規表現エンジン (鬼車) == 正規表現エンジン (鬼車)

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.5" #define RUBY_VERSION "2.2.5"
#define RUBY_RELEASE_DATE "2016-04-22" #define RUBY_RELEASE_DATE "2016-04-22"
#define RUBY_PATCHLEVEL 310 #define RUBY_PATCHLEVEL 311
#define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 4 #define RUBY_RELEASE_MONTH 4