Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
tkutil.c File Reference
`#include "ruby.h"`
`#include "ruby/st.h"`
Include dependency graph for tkutil.c:

Go to the source code of this file.

## Macros
#define | TKUTIL_RELEASE_DATE "2010-03-26"
#define | CBSUBST_TBL_MAX (256)

## Functions
| if (rb_block_given_p())
| rb_scan_args (argc, argv,"1*",&cmd,&rest)
return | rb_eval_cmd (cmd, rest, 0)
| rb_hash_aset (CALLBACK_TABLE, id_num, cmd)
return | rb_str_append (rb_str_new2(cmd_id_head), id_num)
| if (argc==0)
return | tk_install_cmd_core (cmd)
| StringValue (cmd_id)
| 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)
return | rb_hash_delete (CALLBACK_TABLE, rb_str_new2(RSTRING_PTR(cmd_id)+head_len))
return | tk_toUTF8 (1, argv, self)
| if (NIL_P(keys))
| if (NIL_P(sys_enc))
| if (NIL_P(enc_flag))
else | if (TYPE(enc_flag)==T_TRUE||TYPE(enc_flag)==T_FALSE)
| for (idx=0;idx< RARRAY_LEN(ary);idx++)
| if (RTEST(dst_enc)&&!NIL_P(sys_enc))
| if (NIL_P(ary))
| rb_ary_push (ary, key2keyname(key))
| if (val==TK_None)
| switch (argc)
| switch (TYPE(hash))
| if (rb_scan_args(argc, argv,"11",&obj,&enc_flag)==1)
return | get_eval_string_core (obj, enc_flag, self)
| if (argc< 2)
| for (size=0, idx=2;idx< argc;idx++)
| if (old_gc==Qfalse)
| if (RSTRING_PTR(value)==(char *) NULL)
| if (len > 1 &&*ptr== '{'&&*(ptr+len-1)== '}')
| if (RSTRING_LEN(value)==0)
| rb_gc_mark (ptr->aliases)
| if (ptr)
static VALUE | allocate_cbsubst_info (struct cbsubst_info **inf_ptr)
static void | cbsubst_init ()
| Data_Get_Struct (rb_const_get(rb_obj_class(self), ID_SUBST_INFO), struct cbsubst_info, inf)
| if (key==Qundef)
| switch (TYPE(value))
| rb_alias (klass, key_id, value_id)
| if (TYPE(tbl)!=T_HASH)
| Data_Get_Struct (rb_const_get(self, ID_SUBST_INFO), struct cbsubst_info, inf)
| rb_hash_foreach (tbl, each_attr_def, self)
return | rb_funcall (inf->aliases, rb_intern("update"), 1, tbl)
| if (TYPE(sym)!=T_SYMBOL)
| if (idx >=CBSUBST_TBL_MAX) return sym
| if (len=inf->keylen[idx])
| xfree (buf)
| xfree (keys_buf)
| if (rb_scan_args(argc, argv,"21",&key_inf,&longkey_inf,&proc_inf)==2)
| if (RARRAY_LEN(longkey_inf) > 125)
| rb_const_set (self, ID_SUBST_INFO, cbsubst_obj)
void | Init_tkutil ()

## Variables
static int | rb_thread_critical = Qtrue
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 VALUE int | argc
VALUE * | argv = str
VALUE | klass
return | obj
static VALUE VALUE | self
static const char | cmd_id_head [] = "ruby_cmd TkUtil callback "
static const char | cmd_id_prefix [] = "cmd"
static VALUE VALUE | cmd
| id_num = ULONG2NUM(CALLBACK_ID_NUM++)
| else
VALUE | cmd_id
size_t | prefix_len = strlen(cmd_id_prefix)
static VALUE VALUE | str
static int VALUE | key
VALUE | value
VALUE | hash
return | ST_CHECK
VALUE | keys
static VALUE VALUE | ary = RARRAY_PTR(args)[0]
VALUE | enc_flag = Qnil
int | req_chk_flag
volatile VALUE | val
volatile VALUE | str_val
volatile VALUE | dst = rb_ary_new2(size)
volatile VALUE | sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0)
volatile VALUE | dst_enc
volatile VALUE | str_enc
| size = RARRAY_LEN(ary)
static VALUE VALUE | assoc
volatile VALUE | pair
| len = RARRAY_LEN(assoc)
VALUE | args
| UNREACHABLE
int | thr_crit_bup = rb_thread_critical
VALUE | old_gc = rb_gc_disable()
return | Qnil
| ptr = RSTRING_PTR(value)
int | idx
int | iv_idx
return | ST_CONTINUE
VALUE | tbl
VALUE | sym
char * | buf
ID | id = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), str)))
volatile VALUE | ret = rb_str_new2(buf)
int | i
volatile VALUE | arg_sym
volatile VALUE | list
VALUE | keyval
long | keylen = RSTRING_LEN(arg_key)
char * | keys_buf
char * | keys_ptr = keys_buf = ALLOC_N(char, CBSUBST_TBL_MAX + 1)
volatile VALUE | key_inf
volatile VALUE | longkey_inf
volatile VALUE | proc_inf
VALUE | inf
struct cbsubst_info * | subst_inf
unsigned char | chr
| cbsubst_obj = allocate_cbsubst_info(&subst_inf)
VALUE | arg_key
VALUE | val_ary
unsigned char * | keyptr = (unsigned char*)RSTRING_PTR(arg_key)
long | vallen = RARRAY_LEN(val_ary)
unsigned char | type_chr
volatile VALUE | proc
const char | tkutil_release_date [] = TKUTIL_RELEASE_DATE

## Macro Definition Documentation

#define CBSUBST_TBL_MAX (256)

Referenced by allocate_cbsubst_info(), and if().

#define TKUTIL_RELEASE_DATE "2010-03-26"

Definition at line 10 of file tkutil.c.

## Function Documentation

static VALUE allocate_cbsubst_info | ( | struct cbsubst_info ** | inf_ptr | ) |
| static

Definition at line 1172 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 void cbsubst_init | ( |  | ) |
| static

Definition at line 1201 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 |
| ) |  |

for | ( |  | ) |

Definition at line 479 of file tkutil.c.

for | ( | size | = `0` | ) |

Definition at line 952 of file tkutil.c.

References RHASH_SIZE, T_HASH, and TYPE.

return get_eval_string_core | ( | obj | ,
|  | enc_flag | ,
|  | self |
| ) |  |

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` | ) |

Definition at line 209 of file tkutil.c.

References Qnil.

if | ( | strncmp(cmd_id_prefix, RSTRING_PTR(cmd_id)+head_len, prefix_len)! | = `0` | ) |

Definition at line 212 of file tkutil.c.

References Qnil.

if | ( | NIL_P(keys) |  | ) |

Definition at line 280 of file tkutil.c.

if | ( | NIL_P(sys_enc) |  | ) |

Definition at line 461 of file tkutil.c.

References cTclTkLib, ID_encoding_system, ID_to_s, and rb_funcall().

if | ( | NIL_P(enc_flag) |  | ) |

Definition at line 466 of file tkutil.c.

References sys_enc.

else if | ( | TYPE(enc_flag) | = `= T_TRUE || TYPE(enc_flag) == T_FALSE` | ) |

Definition at line 469 of file tkutil.c.

if | ( | RTEST(dst_enc)&&!NIL_P(sys_enc) |  | ) |

Definition at line 519 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 | ( | NIL_P(ary) |  | ) |

Definition at line 590 of file tkutil.c.

References dst.

if | ( | val | = `= TK_None` | ) |

Definition at line 661 of file tkutil.c.

if | ( | rb_scan_args(argc, argv,"11",&obj,&enc_flag) | = `= 1` | ) |

Definition at line 914 of file tkutil.c.

References Qnil.

if | ( |  | ) |

Definition at line 944 of file tkutil.c.

References rb_eArgError, and rb_raise().

if | ( | old_gc | = `= Qfalse` | ) |

Definition at line 973 of file tkutil.c.

if | ( | RSTRING_PTR(value) | = `= (char*)NULL` | ) |

Initial value:
{
rb_check_type(value, T_STRING)
T_STRING
#define T_STRING
rb_check_type
void rb_check_type(VALUE x, int t)
Definition: error.c:440
value
volatile VALUE value
Definition: tcltklib.c:9442

Definition at line 1063 of file tkutil.c.

if | ( | len | ,
|  | 1 &&* | ptr = `= '{' && *(ptr + len - 1) == '}'`
| ) |  |

Definition at line 1088 of file tkutil.c.

References rb_str_new().

if | ( | RSTRING_LEN(value) | = `= 0` | ) |

Definition at line 1127 of file tkutil.c.

if | ( | ptr |  | ) |

Definition at line 1160 of file tkutil.c.

References CBSUBST_TBL_MAX, free, i, NULL, and xfree.

if | ( | key | = `= Qundef` | ) |

Definition at line 1246 of file tkutil.c.

References rb_eArgError, rb_intern, rb_raise(), RSTRING_PTR, SYM2ID, T_STRING, and T_SYMBOL.

if | ( | TYPE(tbl)! | = `T_HASH` | ) |

Definition at line 1284 of file tkutil.c.

References rb_eArgError, and rb_raise().

if | ( | TYPE(sym)! | = `T_SYMBOL` | ) |

Definition at line 1309 of file tkutil.c.

if | ( | idx >= | CBSUBST_TBL_MAX | ) |

Definition at line 10278 of file tcltklib.c.

References NIL_P(), rb_enc_from_encoding(), rb_enc_from_index(), rb_hash_lookup, and tmp.

if | ( | len | = `inf->keylen[idx]` | ) |

Definition at line 1331 of file tkutil.c.

References len.

if | ( | rb_scan_args(argc, argv,"21",&key_inf,&longkey_inf,&proc_inf) | = `= 2` | ) |

Definition at line 1537 of file tkutil.c.

References longkey_inf, and rb_ary_new().

if | ( | RARRAY_LEN(longkey_inf) | ,
|  | 125 |
| ) |  |

Definition at line 1543 of file tkutil.c.

References rb_eArgError, and rb_raise().

void Init_tkutil | ( |  | ) |

Definition at line 1737 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().

rb_alias | ( | klass | ,
|  | key_id | ,
|  | value_id |
| ) |  |

rb_ary_push | ( | ary | ,
|  | key2keyname(key) |
| ) |  |

rb_const_set | ( | self | ,
|  | ID_SUBST_INFO | ,
|  | cbsubst_obj |
| ) |  |

return rb_eval_cmd | ( | cmd | ,
|  | rest | ,
|  | 0 |
| ) |  |

return rb_funcall | ( | inf-> | aliases,
|  | rb_intern("update") | ,
|  | 1 | ,
|  | tbl |
| ) |  |

rb_gc_mark | ( | ptr-> | aliases | ) |

rb_hash_aset | ( | CALLBACK_TABLE | ,
|  | id_num | ,
|  | cmd |
| ) |  |

return rb_hash_delete | ( | CALLBACK_TABLE | ,
|  | rb_str_new2(RSTRING_PTR(cmd_id)+head_len) |
| ) |  |

rb_hash_foreach | ( | tbl | ,
|  | each_attr_def | ,
|  | self |
| ) |  |

rb_scan_args | ( | argc | ,
|  | argv | ,
|  | "1*" | ,
|  | & | cmd,
|  | & | rest
| ) |  |

return rb_str_append | ( | rb_str_new2(cmd_id_head) | ,
|  | id_num |
| ) |  |

StringValue | ( | cmd_id |  | ) |

switch | ( | argc |  | ) |

Definition at line 757 of file tkutil.c.

References rb_eArgError, and rb_raise().

switch | ( | TYPE(hash) |  | ) |

Definition at line 771 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.

switch | ( | TYPE(value) |  | ) |

Definition at line 1260 of file tkutil.c.

References rb_eArgError, rb_intern, rb_raise(), RSTRING_PTR, SYM2ID, T_STRING, and T_SYMBOL.

return tk_install_cmd_core | ( | cmd |  | ) |

return tk_toUTF8 | ( | 1 | ,
|  | argv | ,
|  | self |
| ) |  |

Referenced by Init_tkutil().

xfree | ( | buf |  | ) |

xfree | ( | keys_buf |  | ) |

## Variable Documentation

VALUE arg_key

Definition at line 1650 of file tkutil.c.

volatile VALUE arg_sym

Definition at line 1362 of file tkutil.c.

VALUE int argc
| static

Initial value:
{
return obj
obj
static VALUE VALUE obj
Definition: tcltklib.c:3158

Definition at line 84 of file tkutil.c.

VALUE args

Definition at line 649 of file tkutil.c.

VALUE* argv = str

Definition at line 85 of file tkutil.c.

ary = RARRAY_PTR(args)[0]
| static

Definition at line 450 of file tkutil.c.

static VALUE VALUE assoc
| static

Initial value:
{
return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0))
rb_funcall
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
Definition: vm_eval.c:774
rb_str_new2
#define rb_str_new2
rb_str_append
VALUE rb_str_append(VALUE, VALUE)
Definition: string.c:2121
ID_to_s
static ID ID_to_s
Definition: tkutil.c:63
key
static int VALUE key
Definition: tkutil.c:265

Definition at line 545 of file tkutil.c.

Referenced by fdbm_select(), fgdbm_select(), fsdbm_select(), pty_open(), rb_str_associate(), and rb_str_new_frozen().

char* buf

Initial value:
{
struct cbsubst_info *inf
inf
struct invoke_info inf
Definition: tcltklib.c:8574

Definition at line 1303 of file tkutil.c.

unsigned long CALLBACK_ID_NUM = 0
| static

Definition at line 75 of file tkutil.c.

VALUE CALLBACK_TABLE
| static

Definition at line 74 of file tkutil.c.

Referenced by Init_tkutil().

cbsubst_obj = allocate_cbsubst_info(&subst_inf)

Definition at line 1548 of file tkutil.c.

VALUE cCB_SUBST
| static

Definition at line 51 of file tkutil.c.

Referenced by cbsubst_init(), and Init_tkutil().

unsigned char chr

Definition at line 1534 of file tkutil.c.

VALUE VALUE cmd
| static

Definition at line 167 of file tkutil.c.

VALUE cmd_id

Definition at line 203 of file tkutil.c.

const char cmd_id_head[] = "ruby_cmd TkUtil callback "
| static

Definition at line 162 of file tkutil.c.

const char cmd_id_prefix[] = "cmd"
| static

Definition at line 163 of file tkutil.c.

VALUE cMethod
| static

Definition at line 42 of file tkutil.c.

Referenced by Init_tkutil().

VALUE cSUBST_INFO
| static

Definition at line 52 of file tkutil.c.

Referenced by allocate_cbsubst_info(), and Init_tkutil().

VALUE cTclTkLib
| static

Definition at line 44 of file tkutil.c.

Referenced by if(), and Init_tkutil().

VALUE cTkCallbackEntry
| static

Definition at line 47 of file tkutil.c.

Referenced by Init_tkutil().

VALUE cTkObject
| static

Definition at line 46 of file tkutil.c.

Referenced by Init_tkutil().

volatile VALUE dst = rb_ary_new2(size)

Definition at line 457 of file tkutil.c.

volatile VALUE dst_enc

Definition at line 458 of file tkutil.c.

else

Initial value:
{
cmd = argv[0]
argv
VALUE * argv
Definition: tcltklib.c:1971
cmd
const char * cmd
Definition: tcltklib.c:278

Definition at line 194 of file tkutil.c.

VALUE enc_flag = Qnil

Definition at line 451 of file tkutil.c.

VALUE ENCODING_NAME_UTF8
| static

Definition at line 54 of file tkutil.c.

Referenced by if(), and Init_tkutil().

static VALUE VALUE hash

Initial value:
{
return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self)
hash
VALUE hash
Definition: tkutil.c:267
Qfalse
return Qfalse
Definition: tcltklib.c:6779
Qnil
#define Qnil
Definition: tcltklib.c:1896

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(), extract_keywords(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), flo_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_stat(), get_hash(), hash_alloc(), hash_foreach_call(), hidden_identity_hash_new(), if(), Init_ossl_x509name(), iseq_data_to_ary(), m_core_hash_from_ary(), m_core_hash_merge_ary(), m_core_hash_merge_kwd(), m_core_hash_merge_ptr(), 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_initialize_copy(), rb_hash_keep_if(), rb_hash_method_definition(), rb_hash_rehash(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_s_create(), rb_hash_select_bang(), rb_hash_to_h(), 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(), st_foreach(), st_foreach_check(), str_gsub(), subx(), switch(), tr_trans(), and unpack_entries().

long i

Definition at line 1359 of file tkutil.c.

ID id = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), str)))

Definition at line 1306 of file tkutil.c.

ID ID_at_enc
| static

Definition at line 61 of file tkutil.c.

Referenced by if(), and Init_tkutil().

ID ID_at_path
| static

Definition at line 60 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_call
| static

Definition at line 70 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_downcase
| static

Definition at line 65 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_encoding
| static

Definition at line 68 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_encoding_system
| static

Definition at line 69 of file tkutil.c.

Referenced by if(), and Init_tkutil().

ID ID_fromUTF8
| static

Definition at line 58 of file tkutil.c.

Referenced by if(), and Init_tkutil().

ID ID_install_cmd
| static

Definition at line 66 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_merge_tklist
| static

Definition at line 67 of file tkutil.c.

Referenced by if(), and Init_tkutil().

id_num = ULONG2NUM(CALLBACK_ID_NUM++)

Definition at line 171 of file tkutil.c.

ID ID_path
| static

Definition at line 59 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_source
| static

Definition at line 64 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_split_tklist
| static

Definition at line 56 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_SUBST_INFO
| static

Definition at line 72 of file tkutil.c.

Referenced by cbsubst_init(), and Init_tkutil().

ID ID_to_eval
| static

Definition at line 62 of file tkutil.c.

Referenced by Init_tkutil().

ID ID_to_s
| static

Definition at line 63 of file tkutil.c.

Referenced by if(), and Init_tkutil().

ID ID_toUTF8
| static

Definition at line 57 of file tkutil.c.

Referenced by if(), and Init_tkutil().

long idx

Initial value:
{
struct cbsubst_info *inf
inf
struct invoke_info inf
Definition: tcltklib.c:8574

Definition at line 1212 of file tkutil.c.

VALUE inf

Definition at line 1530 of file tkutil.c.

int iv_idx

Definition at line 1212 of file tkutil.c.

char * key
| static

Initial value:
{
return val
val
#define val
Definition: tcltklib.c:1949

Definition at line 265 of file tkutil.c.

Referenced by check_deadlock_i(), check_exec_env_i(), check_exec_options_i(), check_exec_options_i_extract(), compare_posix_sh(), constat_delete(), cto_i(), cv_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(), fill_envp_buf_i(), 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(), gvar_i(), hash2named_arg(), hash2ptr_dispparams(), hash_aset_str(), hash_foreach_iter(), if(), iseq_compile_each(), ivar_i(), key_i(), load_unlock(), new_entry(), 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_execarg_fixup(), rb_execarg_run_options(), 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_hash_update_func_callback(), rb_iseq_parameters(), rb_struct_each_pair(), reachable_object_from_i(), remove_method(), run_final(), set_state_ivars(), shift_i(), shift_i_safe(), socklist_delete(), splpage(), st_foreach(), st_foreach_check(), st_insert2(), st_update(), sv_i(), terminate_atfork_before_exec_i(), terminate_atfork_i(), terminate_i(), tr_setup_table(), unpack_entries(), update_char_offset(), and yaml_document_append_mapping_pair().

volatile VALUE key_inf

Initial value:
{
volatile VALUE cbsubst_obj
cbsubst_obj
cbsubst_obj
Definition: tkutil.c:1548
VALUE
unsigned long VALUE
Definition: ripper.y:104

Definition at line 1525 of file tkutil.c.

long keylen = RSTRING_LEN(arg_key)

Definition at line 1428 of file tkutil.c.

unsigned char* keyptr = (unsigned char*)RSTRING_PTR(arg_key)

Definition at line 1655 of file tkutil.c.

VALUE keys

Definition at line 276 of file tkutil.c.

Referenced by env_each_key(), env_reject_bang(), env_replace(), env_select_bang(), generate_json_object(), rb_env_clear(), and unknown_keyword_error().

char* keys_buf

Definition at line 1479 of file tkutil.c.

* keys_ptr = keys_buf = ALLOC_N(char, CBSUBST_TBL_MAX + 1)

Definition at line 1479 of file tkutil.c.

VALUE keyval

Definition at line 1427 of file tkutil.c.

int VALUE klass

Definition at line 86 of file tkutil.c.

len = RARRAY_LEN(assoc)

Definition at line 560 of file tkutil.c.

list

Initial value:
{
struct cbsubst_info *inf
inf
struct invoke_info inf
Definition: tcltklib.c:8574

Definition at line 1423 of file tkutil.c.

volatile VALUE longkey_inf

Definition at line 1528 of file tkutil.c.

Referenced by if().

return obj

Definition at line 97 of file tkutil.c.

old_gc = rb_gc_disable()

Definition at line 942 of file tkutil.c.

volatile VALUE pair

Initial value:
{
long i, j, len
i
ssize_t i
Definition: bigdecimal.c:5655
len
size_t len
Definition: tcltklib.c:3568

Definition at line 554 of file tkutil.c.

Referenced by addrinfo_mload(), decorate_convpath(), rb_econv_init_by_convpath(), rb_execarg_fixup(), rb_execarg_run_options(), rb_w32_socketpair(), yaml_document_append_mapping_pair(), yaml_emitter_anchor_node(), yaml_emitter_dump_mapping(), and yaml_parser_load_mapping().

size_t prefix_len = strlen(cmd_id_prefix)

Definition at line 206 of file tkutil.c.

Referenced by pruby_var_prefixed_p(), and yaml_parser_parse_node().

volatile VALUE proc

Definition at line 1660 of file tkutil.c.

volatile VALUE proc_inf

Definition at line 1529 of file tkutil.c.

* ptr = RSTRING_PTR(value)

Definition at line 1085 of file tkutil.c.

return Qnil

Initial value:
{
rb_raise(rb_eArgError,
"invalid value for Number: '%s'", RSTRING_PTR(value))
RSTRING_PTR
#define RSTRING_PTR(str)
rb_raise
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:1780
value
volatile VALUE value
Definition: tcltklib.c:9442
rb_eArgError
VALUE rb_eArgError
Definition: error.c:512

Definition at line 1042 of file tkutil.c.

rb_thread_critical = Qtrue
| static

Definition at line 15 of file tkutil.c.

req_chk_flag

Initial value:
{
long idx, size
idx
int idx
Definition: tcltklib.c:9716
size
int size
Definition: encoding.c:52

Definition at line 453 of file tkutil.c.

return ret = rb_str_new2(buf)

Definition at line 1307 of file tkutil.c.

static VALUE VALUE self
| static

Initial value:
{
return rb_str_new2("")
rb_str_new2
#define rb_str_new2

Definition at line 104 of file tkutil.c.

size = RARRAY_LEN(ary)

Definition at line 477 of file tkutil.c.

return ST_CHECK

Initial value:
{
rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value)
rb_funcall
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
Definition: vm_eval.c:774
ID_to_s
static ID ID_to_s
Definition: tkutil.c:63
hash
VALUE hash
Definition: tkutil.c:267
key
static int VALUE key
Definition: tkutil.c:265
rb_hash_aset
VALUE rb_hash_aset(VALUE, VALUE, VALUE)
value
volatile VALUE value
Definition: tcltklib.c:9442

Definition at line 268 of file tkutil.c.

return ST_CONTINUE

Definition at line 1274 of file tkutil.c.

VALUE str
| static

Initial value:
{
return rb_funcall2(cTclTkLib, ID_fromUTF8, argc, argv)
ID_fromUTF8
static ID ID_fromUTF8
Definition: tkutil.c:58
argv
VALUE * argv
Definition: tcltklib.c:1971
argc
int argc
Definition: tcltklib.c:1970
cTclTkLib
static VALUE cTclTkLib
Definition: tkutil.c:44
rb_funcall2
VALUE rb_funcall2(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:805

Definition at line 235 of file tkutil.c.

volatile VALUE str_enc

Definition at line 458 of file tkutil.c.

Referenced by rb_enc_cr_str_buf_cat(), rb_reg_regsub(), rb_str_sub_bang(), and str_gsub().

volatile VALUE str_val

Definition at line 456 of file tkutil.c.

Referenced by if().

struct cbsubst_info* subst_inf

Definition at line 1532 of file tkutil.c.

VALUE sym

Definition at line 1299 of file tkutil.c.

Referenced by cv_list_i(), iseq_build_from_ary_body(), list_i(), mnew(), rb_call_inits(), rb_dlcfunc_set_calltype(), rb_dlptr_initialize(), rb_dlptr_s_malloc(), rb_fiddle_ptr_initialize(), rb_fiddle_ptr_s_malloc(), rb_threadptr_pending_interrupt_check_mask(), recursive_list_access(), register_label(), sym_to_proc(), sym_to_sym(), symbol2event_flag(), tracepoint_inspect(), vm_call_opt_send(), and w_symbol().

sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0)

Definition at line 458 of file tkutil.c.

Referenced by if().

VALUE tbl

Definition at line 1280 of file tkutil.c.

Referenced by ary_recycle_hash(), autoload_data(), autoload_defined_p(), autoload_delete(), autoload_memsize(), cv_i(), cvar_list(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), givar_i(), hash_foreach_iter(), mod_cvar_at(), move_refined_method(), NOINSERT_UPDATE_CALLBACK(), 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_class_variables(), rb_mod_const_at(), rb_mod_constants(), st_init_table_with_size(), sv_i(), switch(), val2dispatch(), and vtable_alloc().

int thr_crit_bup = rb_thread_critical

Definition at line 941 of file tkutil.c.

VALUE TK_None
| static

Definition at line 49 of file tkutil.c.

Referenced by Init_tkutil(), and switch().

const char tkutil_release_date[] = TKUTIL_RELEASE_DATE

Definition at line 1734 of file tkutil.c.

unsigned char type_chr

Definition at line 1658 of file tkutil.c.

UNREACHABLE

Definition at line 804 of file tkutil.c.

VALUE val

Definition at line 456 of file tkutil.c.

VALUE val_ary

Definition at line 1651 of file tkutil.c.

long vallen = RARRAY_LEN(val_ary)

Definition at line 1657 of file tkutil.c.

int VALUE value

Initial value:
{
return rb_cstr_to_inum(RSTRING_PTR(value), 0, 1)
RSTRING_PTR
#define RSTRING_PTR(str)
value
volatile VALUE value
Definition: tcltklib.c:9442
rb_cstr_to_inum
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Definition: bignum.c:579

Definition at line 266 of file tkutil.c.