Ruby
1.9.3p551(2014-11-13revision48407)
|
Go to the source code of this file.
Macros | |
#define | TKUTIL_RELEASE_DATE "2010-03-26" |
#define | RHASH_TBL(h) (RHASH(h)->tbl) |
#define | RSTRING_PTR(s) (RSTRING(s)->ptr) |
#define | RSTRING_LEN(s) (RSTRING(s)->len) |
#define | RARRAY_PTR(s) (RARRAY(s)->ptr) |
#define | RARRAY_LEN(s) (RARRAY(s)->len) |
#define | CBSUBST_TBL_MAX (256) |
#define CBSUBST_TBL_MAX (256) |
Referenced by allocate_cbsubst_info(), and if().
Definition at line 27 of file tkutil.c.
Referenced by clear_coverage(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), 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(), and rb_coverage_result().
|
static |
Definition at line 1171 of file tkutil.c.
References ALLOC, CBSUBST_TBL_MAX, cSUBST_INFO, Data_Wrap_Struct(), idx, inf, NULL, proc, and rb_hash_new().
Referenced by 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().
Data_Get_Struct | ( | rb_const_get(rb_obj_class(self), ID_SUBST_INFO) | , |
struct cbsubst_info | , | ||
inf | |||
) |
Data_Get_Struct | ( | rb_const_get(self, ID_SUBST_INFO) | , |
struct cbsubst_info | , | ||
inf | |||
) |
if | ( | rb_block_given_p() | ) |
Definition at line 90 of file tkutil.c.
References rb_obj_instance_eval(), and rb_obj_instance_exec().
if | ( | argc | = = 0 | ) |
Definition at line 192 of file tkutil.c.
References rb_block_proc().
if | ( | strncmp(cmd_id_head, RSTRING_PTR(cmd_id), head_len)! | = 0 | ) |
if | ( | strncmp(cmd_id_prefix, RSTRING_PTR(cmd_id)+head_len, prefix_len)! | = 0 | ) |
Definition at line 518 of file tkutil.c.
References cTclTkLib, ENCODING_NAME_UTF8, ID_at_enc, ID_fromUTF8, ID_merge_tklist, ID_toUTF8, idx, Qtrue, RARRAY_LEN, RARRAY_PTR, rb_apply(), rb_funcall(), rb_ivar_set(), rb_obj_respond_to(), str_val, T_STRING, TYPE, and val.
if | ( | rb_scan_args(argc, argv,"11",&obj,&enc_flag) | = = 1 | ) |
if | ( | ) |
Definition at line 943 of file tkutil.c.
References rb_eArgError, and rb_raise().
if | ( | RSTRING_PTR(value) | = = (char*)NULL | ) |
Definition at line 1087 of file tkutil.c.
References rb_str_new().
if | ( | RSTRING_LEN(value) | = = 0 | ) |
if | ( | ptr | ) |
Definition at line 1283 of file tkutil.c.
References rb_eArgError, and rb_raise().
if | ( | idx >= | CBSUBST_TBL_MAX | ) |
if | ( | rb_scan_args(argc, argv,"21",&key_inf,&longkey_inf,&proc_inf) | = = 2 | ) |
Definition at line 1532 of file tkutil.c.
References longkey_inf, and rb_ary_new().
if | ( | RARRAY_LEN(longkey_inf) | , |
125 | |||
) |
Definition at line 1538 of file tkutil.c.
References rb_eArgError, and rb_raise().
void Init_tkutil | ( | ) |
Definition at line 1732 of file tkutil.c.
References CALLBACK_TABLE, cbsubst_init(), 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(), TK_None, and tk_toUTF8().
if NIL_P | ( | keys = rb_convert_type( | keys | ) |
Definition at line 281 of file tkutil.c.
References cTclTkLib, dst, dst_enc, enc_flag, ENCODING_NAME_UTF8, get_eval_string_core(), ID_at_enc, ID_encoding, ID_encoding_system, ID_fromUTF8, ID_merge_tklist, ID_to_s, ID_toUTF8, idx, 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(), req_chk_flag, RHASH_SIZE, RTEST, size, str_enc, str_val, sys_enc, T_ARRAY, T_FALSE, T_HASH, T_STRING, T_TRUE, TK_None, TYPE, and val.
Definition at line 460 of file tkutil.c.
References cTclTkLib, ID_encoding_system, ID_to_s, and rb_funcall().
rb_alias | ( | klass | , |
key_id | , | ||
value_id | |||
) |
Referenced by Init_signal(), Init_strscan(), m_core_set_method_alias(), rb_define_alias(), and rb_mod_alias_method().
rb_const_set | ( | self | , |
ID_SUBST_INFO | , | ||
cbsubst_obj | |||
) |
Referenced by rb_trace_eval(), run_single_final(), and signal_exec().
rb_gc_mark | ( | ptr-> | aliases | ) |
Referenced by _thread_call_proc_arg_mark(), addrinfo_mark(), argf_mark(), barrier_mark(), bm_mark(), call_queue_mark(), cont_mark(), cparse_params_mark(), d_lite_gc_mark(), dir_mark(), dlcfunc_mark(), dlptr_mark(), enumerator_mark(), eval_queue_mark(), fiber_mark(), gc_marks(), generator_mark(), givar_mark_i(), gzfile_mark(), invoke_queue_mark(), mark_dump_arg(), mark_event_hooks(), mark_marshal_compat_i(), parser_mark(), random_mark(), rb_mark_end_proc(), rb_thread_mark(), rb_vm_mark(), strio_mark(), strscan_mark(), syck_mark_emitter(), syck_mark_parser(), syck_node_mark(), time_mark(), vm_mark_each_thread_func(), yielder_mark(), and zstream_mark().
rb_hash_aset | ( | CALLBACK_TABLE | , |
id_num | , | ||
cmd | |||
) |
Referenced by ary_add_hash(), ary_add_hash_by(), check_exec_fds(), code_page(), count_nodes(), count_objects(), count_objects_size(), coverage(), coverage_result_i(), cState_to_h(), cto_i(), date_zone_to_diff(), debug_lines(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_profile_record_get(), gc_stat(), group_by_i(), Init_Hash(), Init_ossl_asn1(), Init_ossl_x509name(), io_s_write(), iseq_data_to_ary(), iseq_set_sequence(), JSON_parse_object(), mString_to_json_raw_object(), ole_const_load(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), r_object0(), rb_econv_prepare_options(), rb_enc_aliases_enc_i(), rb_hash_invert_i(), rb_hash_s_create(), rb_syck_load_handler(), realpath_rec(), recursive_list_access(), recursive_push(), reg_named_captures_iter(), replace_i(), ripper_init_eventids1(), ripper_init_eventids2_table(), select_i(), set_zero(), set_zero_i(), sig_list(), syck_genericresolver_node_import(), syck_get_hash_aref(), syck_map_add_m(), syck_out_mark(), syck_resolver_add_type(), syck_resolver_node_import(), tr_setup_table(), tr_trans(), and yaml_org_handler().
rb_hash_aset | ( | hash | , |
rb_funcall(key, ID_to_s, 0, 0) | , | ||
value | |||
) |
return rb_hash_delete | ( | CALLBACK_TABLE | , |
rb_str_new2(RSTRING_PTR(cmd_id)+head_len) | |||
) |
Referenced by Init_Hash(), and recursive_pop().
Referenced by env_replace(), env_update(), inspect_hash(), iseq_data_to_ary(), JSON_parse_string(), rb_hash_assoc(), rb_hash_clear(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_has_value(), rb_hash_invert(), rb_hash_keep_if(), rb_hash_key(), rb_hash_keys(), rb_hash_rassoc(), rb_hash_rehash(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_select(), rb_hash_select_bang(), rb_hash_shift(), rb_hash_to_a(), rb_hash_update(), rb_hash_update_by(), rb_hash_values(), recursive_eql(), recursive_hash(), and w_object().
return rb_str_append | ( | rb_str_new2(cmd_id_head) | , |
id_num | |||
) |
Referenced by argf_read(), dir_inspect(), dt_lite_jisx0301(), eval_string_with_cref(), fc_path(), gzfile_error_inspect(), iconv_s_conv(), inspect_i(), inspect_range(), inspect_struct(), iso8601_timediv(), join_der_i(), load_failed(), make_version_str(), method_inspect(), ole_raise(), ossl_sslctx_set_ciphers(), ossl_x509extfactory_create_ext(), parser_here_document(), path_sub_ext(), random_rand(), range_to_s(), rb_io_inspect(), rb_mod_to_s(), rb_reg_s_union(), rb_set_class_path_string(), rb_stat_inspect(), rb_str_concat(), rb_str_ellipsize(), rb_str_insert(), reg_compile_gen(), sockopt_inspect(), strscan_concat(), syck_resolver_transfer(), sys_fail2(), and tcl_protect_core().
StringValue | ( | cmd_id | ) |
switch | ( | argc | ) |
Definition at line 758 of file tkutil.c.
References rb_eArgError, and rb_raise().
Definition at line 772 of file tkutil.c.
References ary, NIL_P, rb_ary_new(), rb_eArgError, rb_raise(), RTEST, T_ARRAY, T_HASH, T_NIL, and TK_None.
Definition at line 1259 of file tkutil.c.
References rb_eArgError, rb_intern, rb_raise(), RSTRING_PTR, SYM2ID, T_STRING, and T_SYMBOL.
Referenced by Init_tkutil().
xfree | ( | buf | ) |
xfree | ( | keys_buf | ) |
|
static |
Definition at line 544 of file tkutil.c.
Referenced by fdbm_select(), fgdbm_select(), fsdbm_select(), pty_open(), rb_str_associate(), and rb_str_new_frozen().
char* buf |
|
static |
Definition at line 74 of file tkutil.c.
Referenced by Init_tkutil().
cbsubst_obj = allocate_cbsubst_info(&subst_inf) |
|
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 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 if(), Init_tkutil(), and NIL_P().
|
static |
Definition at line 47 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 46 of file tkutil.c.
Referenced by Init_tkutil().
volatile VALUE dst = rb_ary_new2(size) |
else |
|
static |
Definition at line 54 of file tkutil.c.
Referenced by if(), Init_tkutil(), and NIL_P().
Definition at line 267 of file tkutil.c.
Referenced by ary_add_hash(), ary_add_hash_by(), ary_make_hash(), ary_make_hash_by(), ary_tmp_hash_new(), BigDecimal_hash(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), cto_i(), date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime(), date__xmlschema(), date_s__parse_internal(), date_s__strptime_internal(), date_s_httpdate(), date_s_iso8601(), date_s_jisx0301(), date_s_parse(), date_s_rfc2822(), date_s_rfc3339(), date_s_strptime(), date_s_xmlschema(), datetime_s_httpdate(), datetime_s_iso8601(), datetime_s_jisx0301(), datetime_s_parse(), datetime_s_rfc2822(), datetime_s_rfc3339(), datetime_s_strptime(), datetime_s_xmlschema(), debug_lines(), enum_group_by(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), flo_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_stat(), get_hash(), hash_alloc(), id_hash_new(), if(), Init_ossl_x509name(), iseq_data_to_ary(), match(), method_hash(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), ossl_x509name_hash(), proc_hash(), rb_ary_and(), rb_ary_diff(), rb_ary_or(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_big_hash(), rb_exec_getargs(), rb_hash_clear(), rb_hash_compare_by_id(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_foreach(), rb_hash_initialize(), rb_hash_keep_if(), rb_hash_rehash(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_s_create(), rb_hash_select_bang(), rb_hash_to_hash(), rb_reg_named_captures(), rb_scan_args(), rb_str_format(), rb_str_sub_bang(), recursive_hash(), recursive_list_access(), reg_named_captures_iter(), rt_complete_frags(), rt_rewrite_frags(), sdbm_store(), set_zero(), set_zero_i(), str_gsub(), subs(), switch(), and tr_trans().
ID id = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), str))) |
|
static |
Definition at line 61 of file tkutil.c.
Referenced by if(), Init_tkutil(), and NIL_P().
|
static |
Definition at line 60 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 70 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 65 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 68 of file tkutil.c.
Referenced by Init_tkutil(), and NIL_P().
|
static |
Definition at line 69 of file tkutil.c.
Referenced by Init_tkutil(), and NIL_P().
|
static |
Definition at line 58 of file tkutil.c.
Referenced by if(), Init_tkutil(), and NIL_P().
|
static |
Definition at line 66 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 67 of file tkutil.c.
Referenced by if(), Init_tkutil(), and NIL_P().
id_num = ULONG2NUM(CALLBACK_ID_NUM++) |
|
static |
Definition at line 59 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 64 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 56 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 72 of file tkutil.c.
Referenced by cbsubst_init(), and Init_tkutil().
|
static |
Definition at line 62 of file tkutil.c.
Referenced by Init_tkutil().
|
static |
Definition at line 63 of file tkutil.c.
Referenced by Init_tkutil(), and NIL_P().
|
static |
Definition at line 57 of file tkutil.c.
Referenced by if(), Init_tkutil(), and NIL_P().
int idx |
|
static |
Definition at line 265 of file tkutil.c.
Referenced by check_deadlock_i(), check_exec_env_i(), check_exec_options_i(), cto_i(), env_fetch(), env_shift(), fc_i(), fdbm_clear(), fdbm_delete(), fdbm_delete_if(), fdbm_each_key(), fdbm_each_pair(), fdbm_each_value(), fdbm_empty_p(), fdbm_fetch(), fdbm_has_key(), fdbm_has_value(), fdbm_invert(), fdbm_key(), fdbm_keys(), fdbm_length(), fdbm_select(), fdbm_shift(), fdbm_store(), fdbm_to_a(), fdbm_to_hash(), fdbm_values(), fgdbm_clear(), fgdbm_empty_p(), fgdbm_has_key(), fgdbm_length(), fgdbm_store(), fgdbm_values(), force_chain_object(), fsdbm_clear(), fsdbm_delete(), fsdbm_delete_if(), fsdbm_each_key(), fsdbm_each_pair(), fsdbm_each_value(), fsdbm_empty_p(), fsdbm_fetch(), fsdbm_has_key(), fsdbm_has_value(), fsdbm_invert(), fsdbm_key(), fsdbm_keys(), fsdbm_length(), fsdbm_select(), fsdbm_shift(), fsdbm_store(), fsdbm_to_a(), fsdbm_to_hash(), fsdbm_values(), generate_json_object(), generic_ivar_remove(), getnext(), getnkey(), hash2named_arg(), hash2ptr_dispparams(), hash_foreach_iter(), if(), iseq_compile_each(), key_i(), load_unlock(), map_charset(), obj_ivar_each(), oletypelib_path(), onig_st_insert_strend(), onig_st_lookup_strend(), ossl_call_client_cert_cb(), ossl_cipher_init(), ossl_cipher_initialize(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_set_key(), ossl_pkcs12_initialize(), ossl_pkcs12_s_create(), ossl_pkcs7_decrypt(), ossl_pkcs7_s_sign(), ossl_spki_set_public_key(), ossl_sslctx_setup(), ossl_x509_set_public_key(), ossl_x509req_set_public_key(), parse_exp(), r_leave(), r_object0(), rb_enc_aliases_enc_i(), rb_free_generic_ivar(), rb_gdbm_delete(), rb_gdbm_fetch2(), rb_gdbm_firstkey(), rb_gdbm_nextkey(), rb_hash_default(), rb_hash_fetch_m(), rb_hash_s_create(), rb_run_exec_options_err(), rb_w32_close(), remove_method(), run_final(), set_threads_event_flags_i(), shift_i_safe(), splpage(), st_foreach(), st_insert2(), syck_map_add(), syck_map_initialize(), syck_map_value_set(), terminate_atfork_before_exec_i(), terminate_atfork_i(), terminate_i(), tr_setup_table(), and update_char_offset().
volatile VALUE key_inf |
int keylen = RSTRING_LEN(arg_key) |
unsigned char* keyptr = (unsigned char*)RSTRING_PTR(arg_key) |
VALUE keys |
Definition at line 277 of file tkutil.c.
Referenced by env_each_key(), env_reject_bang(), env_replace(), env_select_bang(), generate_json_object(), rb_env_clear(), syck_map_initialize(), and syck_map_value_set().
* keys_ptr = keys_buf = ALLOC_N(char, CBSUBST_TBL_MAX + 1) |
len = RARRAY_LEN(assoc) |
list |
old_gc = rb_gc_disable() |
volatile VALUE pair |
Definition at line 553 of file tkutil.c.
Referenced by addrinfo_mload(), decorate_convpath(), pipe_open(), rb_econv_init_by_convpath(), rb_run_exec_options_err(), and rb_w32_socketpair().
int prefix_len = strlen(cmd_id_prefix) |
* ptr = RSTRING_PTR(value) |
return Qnil |
return ret = rb_str_new2(buf) |
size = RARRAY_LEN(ary) |
return ST_CHECK |
Definition at line 271 of file tkutil.c.
Referenced by foreach_safe_i(), hash_foreach_iter(), numhash_i(), and st_foreach().
return ST_CONTINUE |
Definition at line 1273 of file tkutil.c.
Referenced by asciicompat_encoding_i(), assoc_i(), cdhash_each(), check_deadlock_i(), check_exec_env_i(), clear_coverage_i(), clear_trace_func_i(), clone_const(), clone_method(), coverage_result_i(), cv_i(), delete_if_i(), each_key_i(), each_pair_i(), each_value_i(), enc_names_i(), env_replace_i(), env_update_i(), eql_i(), fc_i(), force_chain_object(), foreach_safe_i(), free_const_entry_i(), free_method_entry_i(), givar_i(), givar_mark_i(), gvar_i(), hash_each(), hash_foreach_iter(), hash_i(), i_names(), i_renumber_name(), ins_methods_push(), inspect_i(), ivar_i(), keep_if_i(), key_i(), keys_i(), list_i(), loaded_feature_path_i(), mark_const_entry_i(), mark_entry(), mark_global_entry(), mark_key(), mark_keyvalue(), mark_marshal_compat_i(), mark_method_entry_i(), match_i(), method_entry_i(), numhash_i(), obj_ivar_i(), push_value(), rassoc_i(), rb_enc_aliases_enc_i(), rb_enc_name_list_i(), rb_exec_arg_addopt(), rb_hash_invert_i(), rb_hash_rehash_i(), rb_hash_search_value(), rb_hash_update_block_i(), rb_hash_update_func_i(), rb_hash_update_i(), reg_named_capture_assign_iter(), replace_i(), running_vm_event_hooks(), select_i(), set_threads_event_flags_i(), set_zero(), set_zero_i(), shift_i_safe(), st_foreach(), sv_i(), syck_st_free_anchors(), syck_st_free_nodes(), syck_st_free_syms(), syck_st_mark_nodes(), symbols_i(), terminate_atfork_before_exec_i(), terminate_atfork_i(), terminate_i(), thgroup_list_i(), thread_fd_close_i(), thread_keys_i(), thread_list_i(), to_a_i(), transcode_search_path_i(), validate_label(), values_i(), vm_mark_each_thread_func(), and w_obj_each().
|
static |
volatile VALUE str_enc |
Definition at line 457 of file tkutil.c.
Referenced by NIL_P(), rb_enc_cr_str_buf_cat(), rb_reg_regsub(), rb_str_sub_bang(), and str_gsub().
VALUE sym |
Definition at line 1298 of file tkutil.c.
Referenced by iseq_build_from_ary_body(), list_i(), mnew(), rb_call_inits(), rb_dlcfunc_set_calltype(), rb_dlptr_initialize(), rb_dlptr_s_malloc(), recursive_list_access(), register_label(), sym_to_proc(), sym_to_sym(), vm_call_method(), and w_symbol().
sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0) |
VALUE tbl |
Definition at line 1279 of file tkutil.c.
Referenced by ary_recycle_hash(), autoload_delete(), autoload_memsize(), autoload_node(), autoload_node_id(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), hash_foreach_iter(), numhash_init(), obj_ivar_each(), rb_autoload(), rb_const_list(), rb_copy_generic_ivar(), rb_free_generic_ivar(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_hash_rehash(), rb_hash_rehash_i(), rb_iseq_build_from_ary(), rb_iseq_disasm(), rb_ivar_count(), rb_ivar_foreach(), rb_mark_generic_ivar(), rb_mod_const_at(), rb_mod_constants(), st_init_table_with_size(), switch(), val2dispatch(), and vtable_alloc().
int thr_crit_bup = rb_thread_critical |
|
static |
Definition at line 49 of file tkutil.c.
Referenced by Init_tkutil(), NIL_P(), and switch().
const char tkutil_release_date[] = TKUTIL_RELEASE_DATE |
VALUE val |
int vallen = RARRAY_LEN(val_ary) |