まつもと ゆきひろです

In message "[ruby-ext:00184] Re: ruby/gtk pre0.17"
    on 99/05/11, Dai <MAP2303 / mapletown.net> writes:

|  特に問題は無さそうですし、1つ #include 入れればすみますね。
|  うん、これにしましょう。

私の手元のものは以下のような感じですが,例外の辺りがマクロで
は対応できないんですねえ(可変引数).

あ,これは 1.2->1.3ですから逆にしてください.

-- rename2.h
#ifdef str2cstr
#define ary_aref rb_ary_aref
#define ary_assoc rb_ary_assoc
#define ary_concat rb_ary_concat
#define ary_delete rb_ary_delete
#define ary_delete_at rb_ary_delete_at
#define ary_each rb_ary_each
#define ary_entry rb_ary_entry
#define ary_freeze rb_ary_freeze
#define ary_includes rb_ary_includes
#define ary_join rb_ary_join
#define ary_new rb_ary_new
#define ary_new2 rb_ary_new2
#define ary_new3 rb_ary_new3
#define ary_new4 rb_ary_new4
#define ary_plus rb_ary_plus
#define ary_pop rb_ary_pop
#define ary_push rb_ary_push
#define ary_rassoc rb_ary_rassoc
#define ary_reverse rb_ary_reverse
#define ary_shift rb_ary_shift
#define ary_sort rb_ary_sort
#define ary_store rb_ary_store
#define ary_to_s rb_ary_to_s
#define ary_unshift rb_ary_unshift
#define assoc_new rb_assoc_new
#define cArray rb_cArray
#define memclear rb_mem_clear
#define big2dbl rb_big2dbl
#define big2long rb_big2long
#define big2str rb_big2str
#define big2ulong rb_big2ulong
#define big_2comp rb_big_2comp
#define big_and rb_big_and
#define big_clone rb_big_clone
#define big_lshift rb_big_lshift
#define big_minus rb_big_minus
#define big_mul rb_big_mul
#define big_norm rb_big_norm
#define big_or rb_big_or
#define big_plus rb_big_plus
#define big_pow rb_big_pow
#define big_rand rb_big_rand
#define big_xor rb_big_xor
#define cBignum rb_cBignum
#define dbl2big rb_dbl2big
#define int2big rb_int2big
#define int2inum rb_int2inum
#define str2inum rb_str2inum
#define uint2big rb_uint2big
#define uint2inum rb_uint2inum
#define class_instance_methods rb_class_instance_methods
#define class_new rb_class_new
#define class_private_instance_methods rb_class_private_instance_methods
#define class_protected_instance_methods rb_class_protected_instance_methods
#define mod_ancestors rb_mod_ancestors
#define mod_included_modules rb_mod_included_modules
#define module_new rb_module_new
#define obj_singleton_methods rb_obj_singleton_methods
#define singleton_class rb_singleton_class
#define singleton_class_attached rb_singleton_class_attached
#define singleton_class_clone rb_singleton_class_clone
#define singleton_class_new rb_singleton_class_new
#define mComparable rb_mComparable
#define cDir rb_cDir
#define enum_length rb_enum_length
#define mEnumerable rb_mEnumerable
#define Bug rb_bug
#define Error rb_compile_error
#define ErrorAppend rb_compile_error_append
#define eArgError rb_eArgError
#define eException rb_eException
#define eFatal rb_eFatal
#define eIndexError rb_eIndexError
#define eInterrupt rb_eInterrupt
#define eLoadError rb_eLoadError
#define eNameError rb_eNameError
#define eNotImpError rb_eNotImpError
#define eRuntimeError rb_eRuntimeError
#define eSecurityError rb_eSecurityError
#define eStandardError rb_eStandardError
#define eSyntaxError rb_eSyntaxError
#define eSystemCallError rb_eSystemCallError
#define eSystemExit rb_eSystemExit
#define eTypeError rb_eTypeError
#define exc_new rb_exc_new
#define exc_new2 rb_exc_new2
#define exc_new3 rb_exc_new3
#define Fatal rb_fatal
#define LoadError rb_loaderror
#define mErrno rb_mErrno
#define Raise rb_raise
#define Warn rb_warn
#define Warning rb_warning
#define nerrs ruby_nerrs
#define cProc rb_cProc
#define cThread rb_cThread
#define class_new_instance rb_class_new_instance
#define dyna_var_asgn rb_dvar_asgn
#define dyna_var_defined rb_dvar_defined
#define dyna_var_push rb_dvar_push
#define dyna_var_ref rb_dvar_ref
#define f_lambda rb_f_lambda
#define f_require rb_f_require
#define gc_mark_threads rb_gc_mark_threads
#define iterator_p rb_iterator_p
#define obj_call_init(o) rb_obj_call_init(o, 0, 0)
#define thread_alone rb_thread_alone
#define thread_create rb_thread_create
#define thread_critical rb_thread_critical
#define thread_fd_writable rb_thread_fd_writable
#define thread_interrupt rb_thread_interrupt
#define thread_schedule rb_thread_schedule
#define thread_select rb_thread_select
#define thread_sleep rb_thread_sleep
#define thread_sleep_forever rb_thread_sleep_forever
#define thread_trap_eval rb_thread_trap_eval
#define thread_wait_fd rb_thread_wait_fd
#define thread_wait_for rb_thread_wait_for
#define the_class ruby_class
#define the_dyna_vars ruby_dyna_vars
#define the_frame ruby_frame
#define the_init ruby_init
#define the_scope ruby_scope
#define cFile rb_cFile
#define file_open rb_file_open
#define file_s_expand_path rb_file_s_expand_path
#define mFileTest rb_mFileTest
#define data_object_alloc rb_data_object_alloc
#define gc_call_finalizer_at_exit rb_gc_call_finalizer_at_exit
#define gc_force_recycle rb_gc_force_recycle
#define gc_gc rb_gc
#define gc_mark rb_gc_mark
#define gc_mark_frame rb_gc_mark_frame
#define gc_mark_locations rb_gc_mark_locations
#define gc_mark_maybe rb_gc_mark_maybe
#define gc_stack_start rb_gc_stack_start
#define mGC rb_mGC
#define cHash rb_cHash
#define env_path_tainted rb_env_path_tainted
#define hash_aref rb_hash_aref
#define hash_aset rb_hash_aset
#define hash_freeze rb_hash_freeze
#define hash_new rb_hash_new
#define cIO rb_cIO
#define eEOFError rb_eEOFError
#define eIOError rb_eIOError
#define eof_error rb_eof_error
#define f_gets rb_f_gets
#define io_binmode rb_io_binmode
#define io_check_closed rb_io_check_closed
#define io_check_readable rb_io_check_readable
#define io_check_writable rb_io_check_writable
#define io_close rb_io_close
#define io_fptr_finalize rb_io_fptr_finalize
#define io_getc rb_io_getc
#define io_gets rb_io_gets
#define io_gets_method rb_io_gets_method
#define io_mode_flags rb_io_mode_flags
#define io_reopen rb_io_reopen
#define io_unbuffered rb_io_unbuffered
#define io_ungetc rb_io_ungetc
#define io_write rb_io_write
#define RS_default rb_default_rs
#define FS rb_fs
#define OFS rb_output_fs
#define ORS rb_output_rs
#define RS rb_rs
#define mMath rb_mMath
#define cFixnum rb_cFixnum
#define cFloat rb_cFloat
#define cInteger rb_cInteger
#define cNumeric rb_cNumeric
#define eZeroDiv rb_eZeroDiv
#define fix2int rb_fix2int
#define fix2str rb_fix2str
#define fix_upto rb_fix_upto
#define float_new rb_float_new
#define num2fix rb_num2fix
#define num2int rb_num2int
#define num2long rb_num2long
#define num2ulong rb_num2ulong
#define num_coerce_bin rb_num_coerce_bin
#define num_zerodiv rb_num_zerodiv
#define any_to_s rb_any_to_s
#define cClass rb_cClass
#define cData rb_cData
#define cFalseClass rb_cFalseClass
#define cModule rb_cModule
#define cNilClass rb_cNilClass
#define cObject rb_cObject
#define cTrueClass rb_cTrueClass
#define mKernel rb_mKernel
#define num2dbl rb_num2dbl
#define obj_alloc rb_obj_alloc
#define obj_is_instance_of rb_obj_is_instance_of
#define obj_is_kind_of rb_obj_is_kind_of
#define TopSelf rb_top_self
#define backref_get rb_backref_get
#define backref_set rb_backref_set
#define compile_file rb_compile_file
#define compile_string rb_compile_string
#define id_attrset rb_id_attrset
#define is_const_id rb_is_const_id
#define is_instance_id rb_is_instance_id
#define lastline_get rb_lastline_get
#define lastline_set rb_lastline_set
#define node_newnode rb_node_newnode
#define yyappend_print rb_parser_append_print
#define yywhile_loop rb_parser_while_loop
#define sourcefile ruby_sourcefile
#define sourceline ruby_sourceline
#define mProcess rb_mProcess
#define cRange rb_cRange
#define range_beg_end rb_range_beg_end
#define range_new rb_range_new
#define cRegexp rb_cRegexp
#define ignorecase rb_ignorecase
#define reg_free rb_reg_free
#define reg_last_match rb_reg_last_match
#define reg_match rb_reg_match
#define reg_match2 rb_reg_match2
#define reg_match_last rb_reg_match_last
#define reg_match_post rb_reg_match_post
#define reg_match_pre rb_reg_match_pre
#define reg_new rb_reg_new
#define reg_nth_defined rb_reg_nth_defined
#define reg_nth_match rb_reg_nth_match
#define reg_options rb_reg_options
#define reg_prepare_re rb_reg_prepare_re
#define reg_regcomp rb_reg_regcomp
#define reg_regsub rb_reg_regsub
#define reg_search rb_reg_search
#define str_cicmp rb_str_cicmp
#define f_kill rb_f_kill
#define gc_mark_trap_list rb_gc_mark_trap_list
#define prohibit_interrupt rb_prohibit_interrupt
#define trap_exec rb_trap_exec
#define trap_exit rb_trap_exit
#define trap_immediate rb_trap_immediate
#define trap_pending rb_trap_pending
#define trap_restore_mask rb_trap_restore_mask
#define posix_signal ruby_posix_signal
#define f_sprintf rb_f_sprintf
#define cString rb_cString
#define obj_as_string rb_obj_as_string
#define str_cat rb_str_cat
#define str_cmp rb_str_cmp
#define str_concat rb_str_concat
#define str_dup rb_str_dup
#define str_dup_frozen rb_str_dup_frozen
#define str_freeze rb_str_freeze
#define str_hash rb_str_hash
#define str_inspect rb_str_inspect
#define str_modify rb_str_modify
#define str_new rb_str_new
#define str_new2 rb_str_new2
#define str_new3 rb_str_new3
#define str_new4 rb_str_new4
#define str_plus rb_str_plus
#define str_resize rb_str_resize
#define str_split rb_str_split
#define str_substr rb_str_substr
#define str_taint rb_obj_taint
#define str_tainted rb_obj_tainted
#define str_times rb_str_times
#define str_to_str rb_str_to_str
#define str_upto rb_str_upto
#define cStruct rb_cStruct
#define struct_alloc rb_struct_alloc
#define struct_aref rb_struct_aref
#define struct_aset rb_struct_aset
#define struct_define rb_struct_define
#define struct_getmember rb_struct_getmember
#define struct_new rb_struct_new
#define cTime rb_cTime
#define time_new rb_time_new
#define time_timeval rb_time_timeval
#define scan_hex ruby_scan_hex
#define scan_oct ruby_scan_oct
#define const_defined rb_const_defined
#define const_defined_at rb_const_defined_at
#define const_get rb_const_get
#define const_get_at rb_const_get_at
#define const_set rb_const_set
#define define_const rb_define_const
#define f_autoload rb_f_autoload
#define f_global_variables rb_f_global_variables
#define f_trace_var rb_f_trace_var
#define f_untrace_var rb_f_untrace_var
#define gc_mark_global_tbl rb_gc_mark_global_tbl
#define mod_const_at rb_mod_const_at
#define mod_const_of rb_mod_const_of
#define mod_constants rb_mod_constants
#define mod_name rb_mod_name
#define mod_remove_const rb_mod_remove_const
#define obj_instance_variables rb_obj_instance_variables
#define obj_remove_instance_variable rb_obj_remove_instance_variable
#define show_copyright ruby_show_copyright
#define show_version ruby_show_version
#define debug rb_debug
#define verbose rb_verbose
#define Fail(mesg) rb_raise(rb_eRuntimeError, mesg)
#define ArgError(mesg) rb_raise(rb_eArgError, mesg)
#define TypeError(mesg) rb_raise(rb_eTypeError, mesg)
#define NameError(mesg) rb_raise(rb_eNameError, mesg)
#endif