#include "ruby.h"
#include "rubysig.h"
#include "st.h"
Include dependency graph for tkutil.c:
Go to the source code of this file.
#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().
#define RHASH_TBL | ( | h | ) | (RHASH(h)->tbl) |
Definition at line 27 of file tkutil.c.
Referenced by clear_coverage(), count_nodes(), count_objects_size(), count_tdata_objects(), hash2kv(), hash2kv_enc(), iseq_set_sequence(), map_charset(), rb_ary_and(), rb_ary_diff(), rb_ary_or(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_check_exec_env(), rb_check_exec_options(), rb_coverage_result(), and tk_symbolkey2str().
static VALUE allocate_cbsubst_info | ( | struct cbsubst_info ** | inf_ptr | ) | [static] |
Definition at line 1171 of file tkutil.c.
References cbsubst_info::aliases, ALLOC, CBSUBST_TBL_MAX, cSUBST_INFO, Data_Wrap_Struct, inf(), NULL, cbsubst_info::proc, rb_hash_new(), subst_free(), and subst_mark().
Referenced by cbsubst_init(), and cbsubst_table_setup().
Definition at line 296 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, and TYPE.
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, and TYPE.
Referenced by hash2list(), and hash2list_enc().
Definition at line 549 of file tkutil.c.
References key2keyname(), len, NIL_P, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_plus(), rb_ary_push(), T_ARRAY, and TYPE.
Referenced by tk_hash_kv().
Definition at line 597 of file tkutil.c.
References get_eval_string_core(), key2keyname(), len, NIL_P, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_plus(), rb_ary_push(), T_ARRAY, and TYPE.
Referenced by tk_hash_kv().
Definition at line 1277 of file tkutil.c.
References 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 1470 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, Data_Get_Struct, ID_SUBST_INFO, if(), inf(), len, and rb_const_get().
Referenced by Init_tkutil().
Definition at line 1349 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, Data_Get_Struct, id, ID2SYM, ID_SUBST_INFO, inf(), len, NIL_P, rb_const_get(), rb_eArgError, rb_hash_aref(), rb_id2name(), rb_intern, rb_raise(), rb_str_cat2(), rb_str_new2, RSTRING_PTR, SYM2ID, T_STRING, T_SYMBOL, and TYPE.
Referenced by Init_tkutil().
Definition at line 1417 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, cTclTkLib, Data_Get_Struct, ID_split_tklist, ID_SUBST_INFO, if(), inf(), cbsubst_info::key, cbsubst_info::keylen, len, list, RARRAY_LEN, RARRAY_PTR, rb_const_get(), rb_funcall(), rb_str_new2, RSTRING_LEN, RSTRING_PTR, and xfree.
Referenced by Init_tkutil().
static void cbsubst_init | ( | ) | [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, if(), inf(), rb_const_get(), rb_ivar_set(), and rb_obj_class().
Referenced by Init_tkutil().
Definition at line 1643 of file tkutil.c.
References Data_Get_Struct, ID_call, ID_SUBST_INFO, inf(), INT2FIX, cbsubst_info::keylen, NIL_P, cbsubst_info::proc, Qnil, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_push(), rb_const_get(), rb_funcall(), rb_gc_disable(), rb_hash_aref(), RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_tkutil().
Definition at line 1296 of file tkutil.c.
References ALLOC_N, buf, CBSUBST_TBL_MAX, Data_Get_Struct, id, ID_SUBST_INFO, inf(), len, NIL_P, rb_const_get(), rb_hash_aref(), rb_id2name(), rb_intern, rb_str_cat2(), rb_str_new2, RSTRING_PTR, SYM2ID, T_SYMBOL, TYPE, and xfree.
Referenced by Init_tkutil().
Definition at line 1516 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, len, malloc, NUM2CHR(), cbsubst_info::proc, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_ary_new(), rb_attr(), rb_const_set(), rb_eArgError, rb_hash_aset(), rb_id2name(), rb_intern, rb_raise(), rb_scan_args(), rb_str_cat2(), rb_str_new2, RSTRING_LEN, RSTRING_PTR, SYM2ID, T_ARRAY, T_STRING, cbsubst_info::type, and TYPE.
Referenced by Init_tkutil().
Definition at line 1240 of file tkutil.c.
References Qundef, rb_alias(), rb_eArgError, rb_intern, rb_raise(), RSTRING_PTR, 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 807 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, Qnil, Qtrue, rb_cProc, rb_funcall(), rb_id2name(), rb_intern, rb_obj_is_kind_of(), rb_obj_respond_to(), rb_str_new2, rb_sym_to_s(), rb_warning(), RSTRING_PTR, 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 NIL_P, push_kv(), rb_ary_concat(), rb_ary_new2(), rb_ary_new3(), RHASH_SIZE, RHASH_TBL, and st_foreach.
Referenced by ary2list(), hash2list(), tk_conv_args(), and tk_hash_kv().
Definition at line 714 of file tkutil.c.
References NIL_P, push_kv_enc(), rb_ary_concat(), rb_ary_new2(), rb_ary_new3(), RHASH_SIZE, RHASH_TBL, and st_foreach.
Referenced by ary2list(), hash2list_enc(), tk_conv_args(), and tk_hash_kv().
Definition at line 732 of file tkutil.c.
References ary2list2(), hash2kv(), Qfalse, and Qnil.
Referenced by ary2list(), ary2list2(), and get_eval_string_core().
Definition at line 741 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 1732 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 542 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 645 of file tkutil.c.
References get_eval_string_core(), key2keyname(), Qnil, Qundef, RARRAY_PTR, rb_ary_push(), ST_CHECK, ST_CONTINUE, and TK_None.
Referenced by hash2kv().
Definition at line 687 of file tkutil.c.
References get_eval_string_core(), key2keyname(), Qtrue, Qundef, RARRAY_PTR, rb_ary_push(), ST_CHECK, ST_CONTINUE, and TK_None.
Referenced by hash2kv_enc().
static void subst_free | ( | struct cbsubst_info * | ptr | ) | [static] |
Definition at line 1154 of file tkutil.c.
References CBSUBST_TBL_MAX, free, NULL, and xfree.
Referenced by allocate_cbsubst_info().
static void subst_mark | ( | struct cbsubst_info * | ptr | ) | [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 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(), 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 749 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, and TYPE.
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 275 of file tkutil.c.
References NIL_P, rb_convert_type(), rb_hash_new(), RHASH_TBL, st_foreach, 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, and StringValue.
Referenced by Init_tkutil().
Definition at line 1720 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 len, 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, Qundef, rb_funcall(), rb_hash_aset(), ST_CHECK, and ST_CONTINUE.
Referenced by tk_symbolkey2str().
unsigned long CALLBACK_ID_NUM = 0 [static] |
VALUE CALLBACK_TABLE [static] |
Definition at line 74 of file tkutil.c.
Referenced by Init_tkutil(), tk_do_callback(), tk_install_cmd_core(), and tk_uninstall_cmd().
const char cmd_id_head[] = "ruby_cmd TkUtil callback " [static] |
const char cmd_id_prefix[] = "cmd" [static] |
VALUE cSUBST_INFO [static] |
Definition at line 44 of file tkutil.c.
Referenced by ary2list(), ary2list2(), cbsubst_get_subst_key(), Init_tkutil(), tk_fromUTF8(), and tk_toUTF8().
VALUE cTkCallbackEntry [static] |
VALUE ENCODING_NAME_UTF8 [static] |
ID ID_at_path [static] |
ID ID_downcase [static] |
ID ID_encoding [static] |
ID ID_encoding_system [static] |
ID ID_fromUTF8 [static] |
Definition at line 58 of file tkutil.c.
Referenced by ary2list(), ary2list2(), Init_tkutil(), and tk_fromUTF8().
ID ID_install_cmd [static] |
ID ID_merge_tklist [static] |
ID ID_split_tklist [static] |
ID ID_SUBST_INFO [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().
ID ID_to_eval [static] |
Definition at line 57 of file tkutil.c.
Referenced by ary2list(), ary2list2(), get_eval_string_core(), Init_tkutil(), and tk_toUTF8().
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 |