Ruby
2.0.0p648(2015-12-16revision53162)
|
Go to the source code of this file.
Data Structures | |
struct | cbsubst_info |
Macros | |
#define | TKUTIL_RELEASE_DATE "2010-03-26" |
#define | CBSUBST_TBL_MAX (256) |
Variables | |
static int | rb_thread_critical |
static VALUE | cMethod |
static VALUE | cTclTkLib |
static VALUE | cTkObject |
static VALUE | cTkCallbackEntry |
static VALUE | TK_None |
static VALUE | cCB_SUBST |
static VALUE | cSUBST_INFO |
static VALUE | ENCODING_NAME_UTF8 |
static ID | ID_split_tklist |
static ID | ID_toUTF8 |
static ID | ID_fromUTF8 |
static ID | ID_path |
static ID | ID_at_path |
static ID | ID_at_enc |
static ID | ID_to_eval |
static ID | ID_to_s |
static ID | ID_source |
static ID | ID_downcase |
static ID | ID_install_cmd |
static ID | ID_merge_tklist |
static ID | ID_encoding |
static ID | ID_encoding_system |
static ID | ID_call |
static ID | ID_SUBST_INFO |
static VALUE | CALLBACK_TABLE |
static unsigned long | CALLBACK_ID_NUM = 0 |
static const char | cmd_id_head [] = "ruby_cmd TkUtil callback " |
static const char | cmd_id_prefix [] = "cmd" |
const char | tkutil_release_date [] = TKUTIL_RELEASE_DATE |
#define CBSUBST_TBL_MAX (256) |
Definition at line 1134 of file tkutil.c.
Referenced by allocate_cbsubst_info(), cbsubst_get_all_subst_keys(), cbsubst_get_subst_arg(), cbsubst_get_subst_key(), cbsubst_initialize(), cbsubst_sym_to_subst(), and subst_free().
|
static |
|
static |
|
static |
Definition at line 1171 of file tkutil.c.
References cbsubst_info::aliases, ALLOC, CBSUBST_TBL_MAX, cSUBST_INFO, Data_Wrap_Struct, cbsubst_info::full_subst_length, inf(), cbsubst_info::ivar, cbsubst_info::key, cbsubst_info::keylen, NULL, cbsubst_info::proc, rb_hash_new(), subst_free(), subst_mark(), and cbsubst_info::type.
Referenced by cbsubst_init(), and cbsubst_table_setup().
Definition at line 295 of file tkutil.c.
References cTclTkLib, ENCODING_NAME_UTF8, get_eval_string_core(), hash2kv(), hash2kv_enc(), hash2list(), hash2list_enc(), ID_at_enc, ID_encoding, ID_encoding_system, ID_fromUTF8, ID_merge_tklist, ID_to_s, ID_toUTF8, NIL_P, Qnil, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_apply(), rb_ary_new2(), rb_ary_push(), rb_funcall(), rb_ivar_get(), rb_ivar_set(), rb_obj_respond_to(), rb_str_cmp(), RHASH_SIZE, RTEST, size, T_ARRAY, T_FALSE, T_HASH, T_STRING, T_TRUE, TK_None, TYPE, and val.
Referenced by ary2list2(), and get_eval_string_core().
Definition at line 449 of file tkutil.c.
References ary2list(), cTclTkLib, ENCODING_NAME_UTF8, get_eval_string_core(), hash2list(), hash2list_enc(), ID_at_enc, ID_encoding, ID_encoding_system, ID_fromUTF8, ID_merge_tklist, ID_to_s, ID_toUTF8, NIL_P, Qnil, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_apply(), rb_ary_new2(), rb_ary_push(), rb_funcall(), rb_ivar_get(), rb_ivar_set(), rb_obj_respond_to(), rb_str_cmp(), RTEST, size, T_ARRAY, T_FALSE, T_HASH, T_STRING, T_TRUE, TK_None, TYPE, and val.
Referenced by hash2list(), and hash2list_enc().
Definition at line 550 of file tkutil.c.
References i, key2keyname(), NIL_P, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_plus(), rb_ary_push(), T_ARRAY, TYPE, and val.
Referenced by tk_hash_kv().
Definition at line 598 of file tkutil.c.
References get_eval_string_core(), i, key2keyname(), NIL_P, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_plus(), rb_ary_push(), T_ARRAY, TYPE, and val.
Referenced by tk_hash_kv().
Definition at line 1277 of file tkutil.c.
References cbsubst_info::aliases, Data_Get_Struct, each_attr_def(), ID_SUBST_INFO, inf(), rb_const_get(), rb_eArgError, rb_funcall(), rb_hash_foreach(), rb_intern, rb_raise(), T_HASH, and TYPE.
Referenced by Init_tkutil().
Definition at line 1473 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, Data_Get_Struct, cbsubst_info::full_subst_length, ID_SUBST_INFO, inf(), cbsubst_info::ivar, cbsubst_info::key, cbsubst_info::keylen, rb_ary_new3(), rb_const_get(), rb_str_new2(), and xfree().
Referenced by Init_tkutil().
Definition at line 1350 of file tkutil.c.
References cbsubst_info::aliases, ALLOC_N, argc, buf, CBSUBST_TBL_MAX, Data_Get_Struct, cbsubst_info::full_subst_length, i, id, ID2SYM, ID_SUBST_INFO, inf(), cbsubst_info::ivar, cbsubst_info::key, cbsubst_info::keylen, NIL_P, PRIsVALUE, rb_const_get(), rb_eArgError, rb_hash_aref(), rb_id2str(), rb_intern_str, rb_raise(), rb_sprintf(), rb_str_new2(), SYM2ID, T_STRING, T_SYMBOL, TYPE, and xfree().
Referenced by Init_tkutil().
Definition at line 1419 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, cTclTkLib, Data_Get_Struct, cbsubst_info::full_subst_length, i, ID_split_tklist, ID_SUBST_INFO, inf(), cbsubst_info::key, key, cbsubst_info::keylen, list, RARRAY_LEN, RARRAY_PTR, rb_const_get(), rb_funcall(), rb_str_new2(), RSTRING_LEN, RSTRING_PTR, and xfree().
Referenced by Init_tkutil().
|
static |
Definition at line 1200 of file tkutil.c.
References allocate_cbsubst_info(), cCB_SUBST, ID_SUBST_INFO, NULL, and rb_const_set().
Referenced by Init_tkutil().
Definition at line 1207 of file tkutil.c.
References CBSUBST_TBL_MAX, Data_Get_Struct, ID_SUBST_INFO, inf(), cbsubst_info::ivar, rb_const_get(), rb_ivar_set(), and rb_obj_class().
Referenced by Init_tkutil().
Definition at line 1647 of file tkutil.c.
References Data_Get_Struct, ID_call, ID_SUBST_INFO, inf(), INT2FIX, cbsubst_info::keylen, NIL_P, cbsubst_info::proc, Qfalse, Qnil, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_push(), rb_const_get(), rb_funcall(), rb_gc_disable(), rb_gc_enable(), rb_hash_aref(), rb_thread_critical, RSTRING_LEN, RSTRING_PTR, and cbsubst_info::type.
Referenced by Init_tkutil().
Definition at line 1296 of file tkutil.c.
References cbsubst_info::aliases, ALLOC_N, buf, CBSUBST_TBL_MAX, Data_Get_Struct, cbsubst_info::full_subst_length, id, ID_SUBST_INFO, inf(), cbsubst_info::ivar, cbsubst_info::key, cbsubst_info::keylen, NIL_P, PRIsVALUE, rb_const_get(), rb_hash_aref(), rb_id2str(), rb_intern_str, rb_sprintf(), rb_str_new2(), sym, SYM2ID, T_SYMBOL, TYPE, and xfree().
Referenced by Init_tkutil().
Definition at line 1520 of file tkutil.c.
References allocate_cbsubst_info(), cbsubst_info::full_subst_length, id, ID_SUBST_INFO, inf(), INT2FIX, cbsubst_info::ivar, cbsubst_info::key, cbsubst_info::keylen, malloc, NUM2CHR, PRIsVALUE, cbsubst_info::proc, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new(), rb_attr(), rb_const_set(), rb_eArgError, rb_hash_aset(), rb_id2str(), rb_intern_str, rb_raise(), rb_scan_args(), rb_sprintf(), RSTRING_LEN, RSTRING_PTR, SYM2ID, T_ARRAY, T_STRING, TYPE, and cbsubst_info::type.
Referenced by Init_tkutil().
Definition at line 1240 of file tkutil.c.
References Qundef, rb_alias(), rb_eArgError, rb_intern_str, rb_raise(), ST_CONTINUE, SYM2ID, T_STRING, T_SYMBOL, and TYPE.
Referenced by cbsubst_def_attr_aliases().
Definition at line 240 of file tkutil.c.
References argv, and tk_toUTF8().
Referenced by get_eval_string_core().
Definition at line 808 of file tkutil.c.
References ary2list(), cMethod, cTkCallbackEntry, cTkObject, fromDefaultEnc_toUTF8(), hash2list(), hash2list_enc(), ID_install_cmd, ID_path, ID_source, ID_to_eval, ID_to_s, ID_toUTF8, PRIsVALUE, Qnil, Qtrue, rb_cProc, rb_funcall(), rb_id2name(), rb_obj_is_kind_of(), rb_obj_respond_to(), rb_str_new2(), rb_sym_to_s(), rb_warning(), RTEST, SYM2ID, T_ARRAY, T_BIGNUM, T_FALSE, T_FIXNUM, T_FLOAT, T_HASH, T_NIL, T_REGEXP, T_STRING, T_SYMBOL, T_TRUE, tk_install_cmd_core(), TK_None, and TYPE.
Referenced by ary2list(), ary2list2(), assoc2kv_enc(), push_kv(), push_kv_enc(), tk_conv_args(), tk_get_eval_enc_str(), and tk_get_eval_string().
Definition at line 669 of file tkutil.c.
References args, NIL_P, push_kv(), Qundef, rb_ary_concat(), rb_ary_new2(), rb_ary_new3(), RHASH_SIZE, RHASH_TBL, and st_foreach_check().
Referenced by ary2list(), hash2list(), tk_conv_args(), and tk_hash_kv().
Definition at line 713 of file tkutil.c.
References args, NIL_P, push_kv_enc(), Qundef, rb_ary_concat(), rb_ary_new2(), rb_ary_new3(), RHASH_SIZE, RHASH_TBL, and st_foreach_check().
Referenced by ary2list(), hash2list_enc(), tk_conv_args(), and tk_hash_kv().
Definition at line 731 of file tkutil.c.
References ary2list2(), hash2kv(), Qfalse, and Qnil.
Referenced by ary2list(), ary2list2(), and get_eval_string_core().
Definition at line 740 of file tkutil.c.
References ary2list2(), hash2kv_enc(), Qfalse, and Qnil.
Referenced by ary2list(), ary2list2(), and get_eval_string_core().
void Init_tkutil | ( | ) |
Definition at line 1736 of file tkutil.c.
References CALLBACK_TABLE, cbsubst_def_attr_aliases(), cbsubst_get_all_subst_keys(), cbsubst_get_extra_args_tbl(), cbsubst_get_subst_arg(), cbsubst_get_subst_key(), cbsubst_init(), cbsubst_initialize(), cbsubst_inspect(), cbsubst_ret_val(), cbsubst_scan_args(), cbsubst_sym_to_subst(), cbsubst_table_setup(), cCB_SUBST, cMethod, cSUBST_INFO, cTclTkLib, cTkCallbackEntry, cTkObject, ENCODING_NAME_UTF8, ID_at_enc, ID_at_path, ID_call, ID_downcase, ID_encoding, ID_encoding_system, ID_fromUTF8, ID_install_cmd, ID_merge_tklist, ID_path, ID_source, ID_split_tklist, ID_SUBST_INFO, ID_to_eval, ID_to_s, ID_toUTF8, OBJ_FREEZE, rb_cObject, rb_const_get(), rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_singleton_method(), rb_global_variable(), rb_hash_new(), rb_intern, rb_obj_alloc(), rb_obj_freeze(), rb_require(), rb_str_new2(), substinfo_inspect(), tcl2rb_bool(), tcl2rb_num_or_nil(), tcl2rb_num_or_str(), tcl2rb_number(), tcl2rb_string(), tk_cbe_inspect(), tk_conv_args(), tk_do_callback(), tk_eval_cmd(), tk_fromUTF8(), tk_get_eval_enc_str(), tk_get_eval_string(), tk_hash_kv(), tk_install_cmd(), TK_None, tk_obj_untrust(), tk_s_new(), tk_symbolkey2str(), tk_toUTF8(), tk_uninstall_cmd(), tkNone_inspect(), tkNone_to_s(), and tkobj_path().
Definition at line 543 of file tkutil.c.
References ID_to_s, rb_funcall(), rb_str_append(), and rb_str_new2().
Referenced by assoc2kv(), assoc2kv_enc(), push_kv(), and push_kv_enc().
Definition at line 646 of file tkutil.c.
References get_eval_string_core(), key2keyname(), Qnil, RARRAY_PTR, rb_ary_push(), ST_CHECK, and TK_None.
Referenced by hash2kv().
Definition at line 687 of file tkutil.c.
References get_eval_string_core(), key2keyname(), Qtrue, RARRAY_PTR, rb_ary_push(), ST_CHECK, and TK_None.
Referenced by hash2kv_enc().
|
static |
Definition at line 1154 of file tkutil.c.
References CBSUBST_TBL_MAX, free(), i, NULL, and xfree().
Referenced by allocate_cbsubst_info().
|
static |
Definition at line 1146 of file tkutil.c.
References rb_gc_mark().
Referenced by allocate_cbsubst_info().
Definition at line 982 of file tkutil.c.
References ID_downcase, NULL, NUM2INT, Qfalse, Qnil, Qtrue, rb_check_type(), rb_funcall(), RSTRING_PTR, T_FALSE, T_FIXNUM, T_STRING, T_TRUE, and TYPE.
Referenced by Init_tkutil().
Definition at line 1120 of file tkutil.c.
References Qnil, rb_check_type(), RSTRING_LEN, T_STRING, and tkstr_to_number().
Referenced by Init_tkutil().
Definition at line 1106 of file tkutil.c.
References NULL, rb_check_type(), rb_eArgError, rb_rescue2(), rb_tainted_str_new2(), RSTRING_PTR, T_STRING, tkstr_to_number(), and tkstr_to_str().
Referenced by Init_tkutil().
Definition at line 1070 of file tkutil.c.
References tkstr_to_number().
Referenced by Init_tkutil().
Definition at line 1094 of file tkutil.c.
References NULL, rb_check_type(), rb_tainted_str_new2(), RSTRING_PTR, T_STRING, and tkstr_to_str().
Referenced by Init_tkutil().
Definition at line 933 of file tkutil.c.
References argc, get_eval_string_core(), hash2kv(), hash2kv_enc(), Qfalse, Qtrue, rb_ary_new2(), rb_ary_plus(), rb_ary_push(), rb_eArgError, rb_gc_disable(), rb_gc_enable(), rb_raise(), rb_thread_critical, RHASH_SIZE, RTEST, size, T_HASH, TK_None, and TYPE.
Referenced by Init_tkutil().
Definition at line 146 of file tkutil.c.
References CALLBACK_TABLE, id, ID_call, rb_apply(), rb_funcall2(), rb_hash_aref(), and rb_scan_args().
Referenced by Init_tkutil().
Definition at line 134 of file tkutil.c.
References rb_eval_cmd(), and rb_scan_args().
Referenced by Init_tkutil().
Definition at line 231 of file tkutil.c.
References cTclTkLib, ID_fromUTF8, and rb_funcall2().
Referenced by Init_tkutil().
Definition at line 921 of file tkutil.c.
References get_eval_string_core(), Qtrue, and TK_None.
Referenced by Init_tkutil().
Definition at line 906 of file tkutil.c.
References get_eval_string_core(), Qnil, and rb_scan_args().
Referenced by Init_tkutil().
Definition at line 748 of file tkutil.c.
References assoc2kv(), assoc2kv_enc(), hash(), hash2kv(), hash2kv_enc(), NIL_P, Qnil, rb_ary_new(), rb_eArgError, rb_raise(), RTEST, T_ARRAY, T_HASH, T_NIL, TK_None, TYPE, and UNREACHABLE.
Referenced by Init_tkutil().
Definition at line 179 of file tkutil.c.
References rb_block_proc(), rb_scan_args(), and tk_install_cmd_core().
Referenced by Init_tkutil().
Definition at line 166 of file tkutil.c.
References CALLBACK_ID_NUM, CALLBACK_TABLE, ID_to_s, rb_funcall(), rb_hash_aset(), rb_str_append(), rb_str_new2(), and ULONG2NUM.
Referenced by get_eval_string_core(), and tk_install_cmd().
Definition at line 119 of file tkutil.c.
References rb_obj_taint(), and rb_obj_untrust().
Referenced by Init_tkutil().
Definition at line 83 of file tkutil.c.
References rb_block_given_p(), rb_class_new_instance(), rb_obj_instance_eval(), and rb_obj_instance_exec().
Referenced by Init_tkutil().
Definition at line 274 of file tkutil.c.
References NIL_P, Qundef, rb_convert_type(), rb_hash_new(), RHASH_TBL, st_foreach_check(), T_HASH, and to_strkey().
Referenced by Init_tkutil().
Definition at line 222 of file tkutil.c.
References cTclTkLib, ID_toUTF8, and rb_funcall2().
Referenced by fromDefaultEnc_toUTF8(), and Init_tkutil().
Definition at line 201 of file tkutil.c.
References CALLBACK_TABLE, Qnil, rb_hash_delete(), rb_str_new2(), RSTRING_PTR, StringValue, and strlen().
Referenced by Init_tkutil().
Definition at line 1724 of file tkutil.c.
References ID_at_path, and rb_ivar_get().
Referenced by Init_tkutil().
Definition at line 1039 of file tkutil.c.
References Qnil, rb_eArgError, rb_raise(), and RSTRING_PTR.
Referenced by tkstr_rescue_float().
Definition at line 1048 of file tkutil.c.
References rb_eArgError, rb_rescue2(), tkstr_invalid_numstr(), and tkstr_to_float().
Referenced by tkstr_to_number().
Definition at line 1032 of file tkutil.c.
References rb_cstr_to_dbl(), rb_float_new(), and RSTRING_PTR.
Referenced by tkstr_rescue_float().
Definition at line 1025 of file tkutil.c.
References rb_cstr_to_inum(), and RSTRING_PTR.
Referenced by tkstr_to_number().
Definition at line 1057 of file tkutil.c.
References INT2FIX, NULL, rb_check_type(), rb_eArgError, rb_rescue2(), RSTRING_PTR, T_STRING, tkstr_rescue_float(), and tkstr_to_int().
Referenced by tcl2rb_num_or_nil(), tcl2rb_num_or_str(), and tcl2rb_number().
Definition at line 1078 of file tkutil.c.
References rb_str_new(), RSTRING_LEN, and RSTRING_PTR.
Referenced by tcl2rb_num_or_str(), and tcl2rb_string().
Definition at line 264 of file tkutil.c.
References ID_to_s, rb_funcall(), rb_hash_aset(), and ST_CHECK.
Referenced by tk_symbolkey2str().
|
static |
Definition at line 75 of file tkutil.c.
Referenced by tk_install_cmd_core().
|
static |
Definition at line 74 of file tkutil.c.
Referenced by Init_tkutil(), tk_do_callback(), tk_install_cmd_core(), and tk_uninstall_cmd().
|
static |
Definition at line 51 of file tkutil.c.
Referenced by cbsubst_init(), and Init_tkutil().
|
static |
Definition at line 42 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 52 of file tkutil.c.
Referenced by allocate_cbsubst_info(), and Init_tkutil().
|
static |
Definition at line 44 of file tkutil.c.
Referenced by ary2list(), ary2list2(), cbsubst_get_subst_key(), Init_tkutil(), tk_fromUTF8(), and tk_toUTF8().
|
static |
Definition at line 47 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 46 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 54 of file tkutil.c.
Referenced by ary2list(), ary2list2(), and Init_tkutil().
|
static |
Definition at line 61 of file tkutil.c.
Referenced by ary2list(), ary2list2(), and Init_tkutil().
|
static |
Definition at line 60 of file tkutil.c.
Referenced by Init_tkutil(), and tkobj_path().
|
static |
Definition at line 70 of file tkutil.c.
Referenced by cbsubst_scan_args(), Init_tkutil(), and tk_do_callback().
|
static |
Definition at line 65 of file tkutil.c.
Referenced by Init_tkutil(), and tcl2rb_bool().
|
static |
Definition at line 68 of file tkutil.c.
Referenced by ary2list(), ary2list2(), and Init_tkutil().
|
static |
Definition at line 69 of file tkutil.c.
Referenced by ary2list(), ary2list2(), and Init_tkutil().
|
static |
Definition at line 58 of file tkutil.c.
Referenced by ary2list(), ary2list2(), Init_tkutil(), and tk_fromUTF8().
|
static |
Definition at line 66 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 67 of file tkutil.c.
Referenced by ary2list(), ary2list2(), and Init_tkutil().
|
static |
Definition at line 59 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 64 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 56 of file tkutil.c.
Referenced by cbsubst_get_subst_key(), and Init_tkutil().
|
static |
Definition at line 72 of file tkutil.c.
Referenced by cbsubst_def_attr_aliases(), cbsubst_get_all_subst_keys(), cbsubst_get_subst_arg(), cbsubst_get_subst_key(), cbsubst_init(), cbsubst_initialize(), cbsubst_scan_args(), cbsubst_sym_to_subst(), cbsubst_table_setup(), and Init_tkutil().
|
static |
Definition at line 62 of file tkutil.c.
Referenced by get_eval_string_core(), and Init_tkutil().
|
static |
Definition at line 63 of file tkutil.c.
Referenced by ary2list(), ary2list2(), get_eval_string_core(), Init_tkutil(), key2keyname(), tk_install_cmd_core(), and to_strkey().
|
static |
Definition at line 57 of file tkutil.c.
Referenced by ary2list(), ary2list2(), get_eval_string_core(), Init_tkutil(), and tk_toUTF8().
|
static |
Definition at line 15 of file tkutil.c.
Referenced by cbsubst_scan_args(), and tk_conv_args().
|
static |
Definition at line 49 of file tkutil.c.
Referenced by ary2list(), ary2list2(), get_eval_string_core(), Init_tkutil(), push_kv(), push_kv_enc(), tk_conv_args(), tk_get_eval_enc_str(), and tk_hash_kv().
const char tkutil_release_date[] = TKUTIL_RELEASE_DATE |