From: Hiroshi IGARASHI Date: 2000-05-12T06:26:59+09:00 Subject: [ruby-dev:9665] Re: implicit declaration of function いがらしです。 At Fri, 12 May 2000 01:26:38 +0900, in [ruby-dev:9664] Re: implicit declaration of function, matz@netlab.co.jp (Yukihiro Matsumoto) wrote: > > |例えば rb_define_const と対応する(と思われる) > |rb_define_constants です。 > > 単なる間違いですね。どんどん指摘してください。 とりあえずrubyのAPIに関して、定義の方に合わせて宣言を 修正・追加しました。 ただ dln.cで呼ばれているrb_loaderror() regex.cで呼ばれているrb_trap_exec() についてはそれぞれのソースファイルで#include "ruby.h"していないので 相変わらずwarningが出ます。 これらのファイルでincludeしない理由が特にあるのでしょうか? #ifdef RUBY_PLATHOME などでくくってしまえば問題ないと思うのですが。 -- 五十嵐 宏 (Hiroshi IGARASHI) Index: intern.h =================================================================== RCS file: /home/cvs/ruby/intern.h,v retrieving revision 1.17 diff -u -r1.17 intern.h --- intern.h 2000/05/09 04:52:58 1.17 +++ intern.h 2000/05/11 21:06:49 @@ -105,6 +105,7 @@ void rb_loaderror __((const char*, ...)) NORETURN; void rb_compile_error __((const char*, ...)); void rb_compile_error_append __((const char*, ...)); +void rb_error_frozen _((char *)); /* eval.c */ void rb_exc_raise _((VALUE)) NORETURN; void rb_exc_fatal _((VALUE)) NORETURN; @@ -219,6 +220,7 @@ VALUE rb_obj_taint _((VALUE)); VALUE rb_obj_tainted _((VALUE)); VALUE rb_obj_untaint _((VALUE)); +VALUE rb_obj_freeze _((VALUE)); VALUE rb_obj_id _((VALUE)); VALUE rb_convert_type _((VALUE,int,const char*,const char*)); VALUE rb_Integer _((VALUE)); @@ -239,6 +241,7 @@ void rb_parser_append_print _((void)); void rb_parser_while_loop _((int, int)); int rb_is_const_id _((ID)); +int rb_is_class_id _((ID)); int rb_is_instance_id _((ID)); VALUE rb_backref_get _((void)); void rb_backref_set _((VALUE)); @@ -352,7 +355,11 @@ VALUE rb_const_get _((VALUE, ID)); VALUE rb_const_get_at _((VALUE, ID)); void rb_const_set _((VALUE, ID, VALUE)); +void rb_const_assign _((VALUE, ID, VALUE)); VALUE rb_mod_constants _((VALUE)); +void rb_cvar_declare _((VALUE, ID, VALUE)); +void rb_cvar_set _((VALUE, ID, VALUE)); +VALUE rb_cvar_get _((VALUE, ID)); void rb_autoload_load _((ID)); /* version.c */ void ruby_show_version _((void)); Index: ruby.h =================================================================== RCS file: /home/cvs/ruby/ruby.h,v retrieving revision 1.13 diff -u -r1.13 ruby.h --- ruby.h 2000/05/09 04:53:04 1.13 +++ ruby.h 2000/05/11 21:06:51 @@ -394,8 +394,8 @@ void rb_define_virtual_variable _((const char*,VALUE(*)(),void(*)())); void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(),void(*)())); void rb_define_readonly_variable _((const char*,VALUE*)); -void rb_define_constants _((VALUE,const char*,VALUE)); -void rb_define_global_constants _((const char*,VALUE)); +void rb_define_const _((VALUE,const char*,VALUE)); +void rb_define_global_const _((const char*,VALUE)); void rb_define_method _((VALUE,const char*,VALUE(*)(),int)); void rb_define_module_function _((VALUE,const char*,VALUE(*)(),int)); Thu May 11 21:19:29 2000 Hiroshi Igarashi * intern.h: add missing declarations of ruby API functions. * ruby.h: fix function name in declarations.