Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cArray. More...
Go to the source code of this file.
Macros | |
#define | rb_ary_new2 rb_ary_new_capa |
#define | rb_ary_new3 rb_ary_new_from_args |
#define | rb_ary_new4 rb_ary_new_from_values |
Public APIs related to rb_cArray.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file array.h.
#define rb_ary_new2 rb_ary_new_capa |
#define rb_ary_new3 rb_ary_new_from_args |
#define rb_ary_new4 rb_ary_new_from_values |
Definition at line 1802 of file array.c.
References argc, argv, rb_ary_aref1(), and rb_check_arity.
Referenced by Init_Array().
Definition at line 4938 of file array.c.
References select_bang_arg::ary, key, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_check_array_type(), and rb_equal().
Referenced by Init_Array().
Definition at line 1314 of file array.c.
References argv, ARY_SET_LEN, len, and RARRAY_LEN.
Referenced by rb_mod_init_copy().
Definition at line 4534 of file array.c.
References select_bang_arg::ary, ARY_CAPA, ARY_DEFAULT_SIZE, ARY_EMBED_P, ARY_SET_EMBED_LEN, ARY_SET_LEN, ARY_SHARED_P, ary_verify, and FL_SET_EMBED.
Referenced by Init_Array(), rb_threadptr_pending_interrupt_clear(), and ruby_set_argv().
Definition at line 5198 of file array.c.
References INT2FIX, len, NIL_P, Qnil, Qundef, RARRAY_LEN, rb_check_array_type(), and rb_exec_recursive_paired().
Referenced by Init_Array().
Definition at line 3956 of file array.c.
References select_bang_arg::ary, ary_verify, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_store(), rb_block_given_p(), rb_equal(), and rb_yield().
Referenced by Init_Array().
Definition at line 4010 of file array.c.
References select_bang_arg::ary, ARY_INCREASE_LEN, ary_verify, len, MEMMOVE, ptr, Qnil, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR_USE_TRANSIENT, and rb_ary_modify().
Definition at line 2666 of file array.c.
References ARY_SET_LEN, ary_verify, len, RARRAY_CONST_PTR_TRANSIENT, RARRAY_LEN, and rb_ary_new2.
Referenced by rb_ary_sort().
Definition at line 2517 of file array.c.
References ary_verify, RARRAY_AREF, RARRAY_LEN, rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 1672 of file array.c.
Referenced by EVENTSINK_Invoke(), rb_ary_aref1(), rb_ary_at(), rb_debug_inspector_frame_binding_get(), rb_debug_inspector_frame_class_get(), rb_debug_inspector_frame_iseq_get(), rb_debug_inspector_frame_self_get(), rb_error_frozen_object(), and rb_resolve_me_location().
void rb_ary_free | ( | VALUE | ary | ) |
Definition at line 864 of file array.c.
References ARY_HEAP_CAPA, ARY_OWNS_HEAP_P, ARY_SHARED_P, ARY_SHARED_ROOT_OCCUPIED, ARY_SHARED_ROOT_P, RARRAY_LEN, RB_DEBUG_COUNTER_INC, and USE_DEBUG_COUNTER.
Definition at line 674 of file array.c.
References rb_obj_freeze().
Referenced by rb_method_definition_set().
Definition at line 5126 of file array.c.
References select_bang_arg::ary, Qfalse, Qtrue, RARRAY_AREF, RARRAY_LEN, and rb_equal().
Referenced by Init_Array().
Definition at line 2780 of file array.c.
References len, NIL_P, RARRAY_AREF, RARRAY_LEN, rb_check_string_type(), rb_enc_associate(), rb_str_buf_new(), rb_str_new, rb_str_set_len(), rb_usascii_encoding(), rb_usascii_str_new, RSTRING_LEN, and StringValue.
Referenced by rb_insn_operand_intern(), rb_proc_isolate_bang(), and rb_proc_ractor_make_shareable().
void rb_ary_modify | ( | VALUE | ary | ) |
Definition at line 606 of file array.c.
References rb_ary_cancel_sharing().
Referenced by rb_ary_delete_at(), rb_ary_resize(), rb_ary_reverse(), rb_ary_rotate(), rb_ary_sort_bang(), and rb_ary_store().
VALUE rb_ary_new | ( | void | ) |
Definition at line 749 of file array.c.
References RARRAY_EMBED_LEN_MAX, and rb_ary_new2.
Referenced by EVENTSINK_Invoke(), Init_Encoding(), Init_GC(), Init_load(), Init_ossl_asn1(), Init_VM(), Init_win32ole(), Init_win32ole_event(), ole_methods_from_typeinfo(), ole_variant2val(), ossl_get_errors(), rb_call_end_proc(), rb_f_global_variables(), rb_f_untrace_var(), rb_insn_operand_intern(), rb_memory_view_extract_item_members(), rb_mod_ancestors(), rb_mod_included_modules(), rb_obj_instance_variables(), and rb_ractor_thread_list().
Definition at line 743 of file array.c.
References rb_cArray.
Referenced by rb_hash_keys(), rb_hash_values(), and rb_insns_name_array().
Definition at line 754 of file array.c.
References ARY_SET_LEN, and rb_ary_new2.
Definition at line 788 of file array.c.
References rb_ary_tmp_new_from_values(), and rb_cArray.
Referenced by rb_insn_operand_intern().
Definition at line 4800 of file array.c.
References ARY_SET_LEN, len, RARRAY_CONST_PTR_TRANSIENT, RARRAY_LEN, rb_ary_new2, and to_ary.
Referenced by Init_Array().
Definition at line 1350 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ARY_OWNS_HEAP_P, ARY_SET_LEN, ary_verify, Qnil, RARRAY_AREF, and RARRAY_LEN.
Definition at line 1301 of file array.c.
References ARY_SET_LEN, ary_verify, ptr, RARRAY_LEN, RARRAY_PTR_USE_TRANSIENT, and RB_OBJ_WRITE.
Referenced by EVENTSINK_Invoke(), Init_Array(), Init_Encoding(), Init_VM(), ole_typedesc2val(), ossl_get_errors(), rb_f_global_variables(), rb_f_untrace_var(), rb_gc_register_mark_object(), rb_get_kwargs(), rb_get_values_at(), rb_hash_values_at(), rb_insn_operand_intern(), rb_insns_name_array(), rb_iseq_parameters(), rb_memory_view_extract_item_members(), rb_mod_ancestors(), rb_mod_included_modules(), rb_ractor_thread_list(), rb_threadptr_pending_interrupt_enque(), rb_uninterruptible(), rb_unnamed_parameters(), ruby_init_loadpath(), ruby_set_argv(), and yyparse().
Definition at line 4967 of file array.c.
References select_bang_arg::ary, Qnil, RARRAY_AREF, RARRAY_LEN, rb_equal(), and T_ARRAY.
Referenced by Init_Array().
Definition at line 4484 of file array.c.
References ARY_HEAP_LEN, ARY_HEAP_PTR, ARY_OWNS_HEAP_P, ARY_SET_LEN, ARY_SET_PTR, ARY_SHARED_P, ARY_SHARED_ROOT, ary_verify, FL_SET_EMBED, FL_UNSET_EMBED, FL_UNSET_SHARED, RARRAY_CONST_PTR_TRANSIENT, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, and to_ary.
Referenced by Init_Array().
expands or shrinks ary to len elements.
expanded region will be filled with Qnil.
ary | an array |
len | new size |
Definition at line 2235 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ARY_EMBED_P, ARY_EMBED_PTR, ARY_HEAP_PTR, ARY_MAX_SIZE, ARY_SET_CAPA, ARY_SET_EMBED_LEN, ARY_SET_HEAP_LEN, ARY_SET_LEN, ary_verify, len, MEMCPY, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, rb_ary_modify(), rb_eIndexError, and rb_raise().
Referenced by rb_get_values_at(), rb_mod_init_copy(), and rb_nmin_run().
Definition at line 2679 of file array.c.
References RARRAY_LEN, and rb_cArray.
Definition at line 2998 of file array.c.
References len, RARRAY_LEN, RARRAY_PTR_USE_TRANSIENT, and rb_ary_modify().
Referenced by rb_nmin_run().
Definition at line 3079 of file array.c.
References cnt, len, ptr, Qnil, RARRAY_LEN, RARRAY_PTR_USE_TRANSIENT, and rb_ary_modify().
Definition at line 687 of file array.c.
References ARY_EMBED_P, ARY_SHARED_P, Qfalse, Qtrue, and RARRAY.
Referenced by rb_get_expanded_load_path().
Definition at line 1413 of file array.c.
References ARY_DEFAULT_SIZE, ARY_EMBED_P, ARY_INCREASE_LEN, ARY_INCREASE_PTR, ARY_SHARED_P, ARY_SHARED_ROOT, ARY_SHARED_ROOT_OCCUPIED, ary_verify, assert, len, MEMMOVE, ptr, Qnil, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR_USE_TRANSIENT, and top.
Definition at line 3396 of file array.c.
References ary_sort_data::ary, rb_ary_dup(), and rb_ary_sort_bang().
Referenced by Init_Array().
Definition at line 3298 of file array.c.
References ary_sort_data::ary, ARY_EMBED_LEN, ARY_EMBED_P, ARY_EMBED_PTR, ARY_HEAP_LEN, ARY_HEAP_PTR, ARY_SET_CAPA, ARY_SET_EMBED_LEN, ARY_SET_HEAP_LEN, ARY_SET_LEN, ARY_SET_PTR, ARY_SHARED_P, ary_verify, assert, ary_sort_data::cmp_opt, FL_FREEZE, FL_SET, FL_SET_EMBED, FL_UNSET, FL_UNSET_EMBED, FL_UNSET_SHARED, len, cmp_opt_data::opt_inited, cmp_opt_data::opt_methods, ptr, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify(), rb_block_given_p(), rb_cArray, and ruby_qsort().
Referenced by Init_Array(), and rb_ary_sort().
Definition at line 1141 of file array.c.
References ARY_CAPA, ARY_MAX_SIZE, ARY_SET_LEN, len, RARRAY_LEN, rb_ary_modify(), rb_eIndexError, and rb_raise().
Referenced by Init_ossl_asn1(), ossl_generate_cb_2(), rb_ary_delete(), rb_ary_delete_same(), rb_sym_to_proc(), and rb_unnamed_parameters().
Definition at line 1700 of file array.c.
References len, and rb_ary_subseq_step().
Definition at line 846 of file array.c.
References rb_ary_transient_heap_evacuate, and TRUE.
Referenced by Init_load(), Init_sym(), Init_Thread(), Init_vm_objects(), rb_default_coverage(), rb_gc_register_mark_object(), rb_get_kwargs(), rb_mod_init_copy(), rb_nmin_run(), rb_struct_new(), and rb_sym_to_proc().
Definition at line 2133 of file array.c.
References NIL_P, rb_ary_new3, and rb_check_array_type().
Definition at line 975 of file array.c.
References rb_ary_new3.
Referenced by rb_big_divmod(), rb_big_divrem_normal(), rb_gcdlcm(), rb_hash_assoc(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), and yyparse().
Definition at line 988 of file array.c.
References rb_check_convert_type_with_id(), and T_ARRAY.
Referenced by rb_Array(), rb_ary_assoc(), rb_ary_cmp(), rb_ary_to_ary(), rb_hash_set_pair(), rb_io_popen(), rb_yield_splat(), and rb_yield_splat_kw().
VALUE rb_get_values_at | ( | VALUE | obj, |
long | olen, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE(*)(VALUE, long) | func | ||
) |
Definition at line 3673 of file array.c.
References argc, argv, FIX2LONG, FIXNUM_P, len, NUM2LONG, RARRAY_LEN, rb_ary_new2, rb_ary_push(), rb_ary_resize(), and rb_range_beg_len().