Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | dbmdata |
Macros | |
#define | DSIZE_TYPE TYPEOF_DATUM_DSIZE |
#define | RSTRING_DSIZE(s) RSTRING_LENINT(s) |
#define | TOO_LONG(n) ((long)(+(DSIZE_TYPE)(n)) != (n)) |
#define | RUBY_DBM_RW_BIT 0x20000000 |
#define | GetDBM(obj, dbmp) |
#define | GetDBM2(obj, dbmp, dbm) |
#define | O_CLOEXEC 0 |
Variables | |
static VALUE | rb_cDBM |
static VALUE | rb_eDBMError |
static const rb_data_type_t | dbm_type |
#define DSIZE_TYPE TYPEOF_DATUM_DSIZE |
Definition at line 24 of file dbm.c.
Referenced by fdbm_delete(), fdbm_delete_if(), fdbm_fetch(), fdbm_has_key(), fdbm_has_value(), and fdbm_key().
#define GetDBM | ( | obj, | |
dbmp | |||
) |
Definition at line 48 of file dbm.c.
Referenced by fdbm_close().
#define GetDBM2 | ( | obj, | |
dbmp, | |||
dbm | |||
) |
Definition at line 54 of file dbm.c.
Referenced by 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(), and fdbm_values().
#define O_CLOEXEC 0 |
Referenced by fdbm_initialize(), get_device_once(), rb_cloexec_dup2(), rb_cloexec_open(), rb_cloexec_pipe(), and sdbm_prep().
#define RSTRING_DSIZE | ( | s | ) | RSTRING_LENINT(s) |
Definition at line 29 of file dbm.c.
Referenced by fdbm_store().
#define RUBY_DBM_RW_BIT 0x20000000 |
Definition at line 35 of file dbm.c.
Referenced by fdbm_initialize(), and Init_dbm().
#define TOO_LONG | ( | n | ) | ((long)(+(DSIZE_TYPE)(n)) != (n)) |
Definition at line 30 of file dbm.c.
Referenced by fdbm_delete(), fdbm_fetch(), fdbm_has_key(), fdbm_has_value(), and fdbm_key().
|
static |
Definition at line 43 of file dbm.c.
References rb_eDBMError, and rb_raise().
Definition at line 127 of file dbm.c.
References TypedData_Wrap_Struct.
Referenced by fdbm_s_open(), and Init_dbm().
Definition at line 551 of file dbm.c.
References dbmdata::di_size, datum::dptr, fdbm_modify(), GetDBM2, key, rb_eDBMError, and rb_raise().
Referenced by fdbm_replace(), and Init_dbm().
Definition at line 95 of file dbm.c.
References dbmdata::di_dbm, GetDBM, and Qnil.
Referenced by fdbm_s_open(), and Init_dbm().
Definition at line 113 of file dbm.c.
References dbmdata::di_dbm, Qfalse, Qtrue, and TypedData_Get_Struct.
Referenced by Init_dbm().
Definition at line 427 of file dbm.c.
References dbmdata::di_size, datum::dptr, datum::dsize, DSIZE_TYPE, ExportStringValue, fdbm_modify(), GetDBM2, key, len, Qnil, rb_block_given_p(), rb_eDBMError, rb_raise(), rb_tainted_str_new(), rb_yield(), RSTRING_LEN, RSTRING_PTR, and TOO_LONG.
Referenced by Init_dbm().
Definition at line 503 of file dbm.c.
References dbmdata::di_size, datum::dptr, datum::dsize, DSIZE_TYPE, fdbm_modify(), GetDBM2, key, OBJ_FREEZE, RARRAY_AREF, RARRAY_LEN, rb_ary_clear(), rb_ary_push(), rb_ary_tmp_new(), rb_assoc_new(), rb_eDBMError, rb_jump_tag(), rb_protect(), rb_raise(), rb_str_dup(), rb_tainted_str_new(), rb_yield(), RSTRING_LEN, RSTRING_PTR, RTEST, and val.
Referenced by Init_dbm().
Definition at line 763 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_tainted_str_new(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_dbm().
Definition at line 787 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_assoc_new(), rb_tainted_str_new(), rb_yield(), RETURN_ENUMERATOR, and val.
Referenced by Init_dbm().
Definition at line 739 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_tainted_str_new(), rb_yield(), RETURN_ENUMERATOR, and val.
Referenced by Init_dbm().
Definition at line 711 of file dbm.c.
References dbmdata::di_dbm, dbmdata::di_size, datum::dptr, GetDBM2, key, Qfalse, and Qtrue.
Referenced by Init_dbm().
Definition at line 264 of file dbm.c.
References datum::dptr, datum::dsize, DSIZE_TYPE, ExportStringValue, GetDBM2, key, len, NIL_P, OBJ_TAINT, rb_block_given_p(), rb_str_dup(), rb_tainted_str_new(), rb_yield(), RSTRING_LEN, RSTRING_PTR, and TOO_LONG.
Referenced by fdbm_aref(), fdbm_fetch_m(), and fdbm_values_at().
Definition at line 313 of file dbm.c.
References fdbm_fetch(), NIL_P, rb_block_given_p(), rb_eIndexError, rb_raise(), and rb_scan_args().
Referenced by Init_dbm().
Definition at line 867 of file dbm.c.
References datum::dptr, datum::dsize, DSIZE_TYPE, ExportStringValue, GetDBM2, key, len, Qfalse, Qtrue, RSTRING_LEN, RSTRING_PTR, TOO_LONG, and val.
Referenced by Init_dbm().
Definition at line 895 of file dbm.c.
References datum::dptr, datum::dsize, DSIZE_TYPE, ExportStringValue, GetDBM2, key, len, memcmp(), Qfalse, Qtrue, RSTRING_LEN, RSTRING_PTR, TOO_LONG, and val.
Referenced by Init_dbm().
Definition at line 358 of file dbm.c.
References fdbm_key(), and rb_warn().
Referenced by Init_dbm().
Definition at line 146 of file dbm.c.
References ALLOC, DATA_PTR, dbmdata::di_dbm, dbmdata::di_size, FilePathValue, NIL_P, NULL, NUM2INT, O_CLOEXEC, Qnil, rb_fd_fix_cloexec(), rb_scan_args(), rb_sys_fail_str(), RSTRING_PTR, and RUBY_DBM_RW_BIT.
Referenced by fdbm_s_open(), and Init_dbm().
Definition at line 578 of file dbm.c.
References datum::dptr, datum::dsize, fdbm_store(), GetDBM2, hash(), key, rb_hash_aset(), rb_hash_new(), rb_tainted_str_new(), and val.
Referenced by Init_dbm().
Definition at line 332 of file dbm.c.
References datum::dptr, datum::dsize, DSIZE_TYPE, ExportStringValue, GetDBM2, key, len, memcmp(), Qnil, rb_tainted_str_new(), RSTRING_LEN, RSTRING_PTR, TOO_LONG, and val.
Referenced by fdbm_index(), and Init_dbm().
Definition at line 816 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_ary_new(), rb_ary_push(), and rb_tainted_str_new().
Referenced by Init_dbm().
Definition at line 686 of file dbm.c.
References dbmdata::di_size, datum::dptr, GetDBM2, INT2FIX, and key.
Referenced by Init_dbm().
|
static |
Definition at line 415 of file dbm.c.
References OBJ_FROZEN, and rb_error_frozen().
Referenced by fdbm_clear(), fdbm_delete(), fdbm_delete_if(), fdbm_shift(), and fdbm_store().
Definition at line 978 of file dbm.c.
References fdbm_to_hash(), and rb_hash_delete_if().
Referenced by Init_dbm().
Definition at line 635 of file dbm.c.
References fdbm_clear(), rb_block_call(), rb_intern, and update_i().
Referenced by Init_dbm().
Definition at line 248 of file dbm.c.
References fdbm_alloc(), fdbm_close(), fdbm_initialize(), NIL_P, Qnil, rb_block_given_p(), rb_ensure(), and rb_yield().
Referenced by Init_dbm().
Definition at line 372 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_tainted_str_new(), rb_yield(), RTEST, and val.
Referenced by Init_dbm().
Definition at line 473 of file dbm.c.
References dbmdata::di_size, datum::dptr, datum::dsize, fdbm_modify(), GetDBM2, key, Qnil, rb_assoc_new(), rb_tainted_str_new(), and val.
Referenced by Init_dbm().
Definition at line 651 of file dbm.c.
References DBM_REPLACE, dbmdata::di_size, datum::dptr, datum::dsize, EPERM, errno, fdbm_modify(), GetDBM2, key, rb_eDBMError, rb_obj_as_string(), rb_raise(), rb_sys_fail(), RSTRING_DSIZE, RSTRING_PTR, and val.
Referenced by fdbm_invert(), Init_dbm(), and update_i().
Definition at line 926 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_tainted_str_new(), and val.
Referenced by Init_dbm().
Definition at line 952 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, hash(), key, rb_hash_aset(), rb_hash_new(), rb_tainted_str_new(), and val.
Referenced by fdbm_reject(), and Init_dbm().
Definition at line 620 of file dbm.c.
References rb_block_call(), rb_intern, and update_i().
Referenced by Init_dbm().
Definition at line 840 of file dbm.c.
References datum::dptr, datum::dsize, GetDBM2, key, rb_ary_new(), rb_ary_push(), rb_tainted_str_new(), and val.
Referenced by Init_dbm().
Definition at line 402 of file dbm.c.
References argc, fdbm_fetch(), Qnil, rb_ary_new2, and rb_ary_push().
Referenced by Init_dbm().
|
static |
Definition at line 60 of file dbm.c.
References dbmdata::di_dbm, and xfree().
void Init_dbm | ( | void | ) |
Definition at line 1045 of file dbm.c.
References fdbm_alloc(), fdbm_aref(), fdbm_clear(), fdbm_close(), fdbm_closed(), fdbm_delete(), fdbm_delete_if(), fdbm_each_key(), fdbm_each_pair(), fdbm_each_value(), fdbm_empty_p(), fdbm_fetch_m(), fdbm_has_key(), fdbm_has_value(), fdbm_index(), fdbm_initialize(), fdbm_invert(), fdbm_key(), fdbm_keys(), fdbm_length(), fdbm_reject(), fdbm_replace(), fdbm_s_open(), fdbm_select(), fdbm_shift(), fdbm_store(), fdbm_to_a(), fdbm_to_hash(), fdbm_update(), fdbm_values(), fdbm_values_at(), INT2FIX, NULL, rb_cDBM, rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_method(), rb_define_singleton_method(), rb_eDBMError, rb_eStandardError, rb_include_module(), rb_mEnumerable, rb_sprintf(), rb_str_new2, RUBY_DBM_RW_BIT, RUBY_EXTERN, and version.
|
static |
Definition at line 70 of file dbm.c.
References dbmdata::di_dbm, and size.
|
static |
Definition at line 599 of file dbm.c.
References Check_Type, fdbm_store(), Qnil, RARRAY_CONST_PTR, RARRAY_LEN, rb_eArgError, rb_raise(), and T_ARRAY.
Referenced by fdbm_replace(), and fdbm_update().
|
static |
|
static |
Definition at line 33 of file dbm.c.
Referenced by Init_dbm().
|
static |
Definition at line 33 of file dbm.c.
Referenced by closed_dbm(), fdbm_clear(), fdbm_delete(), fdbm_delete_if(), fdbm_store(), and Init_dbm().