Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions
defines.h File Reference
#include "ruby/config.h"
#include <stdio.h>
#include "ruby/missing.h"
Include dependency graph for defines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONSTFUNC(x)   x
 
#define PUREFUNC(x)   x
 
#define NORETURN_STYLE_NEW   1
 
#define NORETURN(x)   x
 
#define DEPRECATED(x)   x
 
#define DEPRECATED_BY(n, x)   DEPRECATED(x)
 
#define DEPRECATED_TYPE(mesg, decl)   decl
 
#define NOINLINE(x)   x
 
#define ALWAYS_INLINE(x)   x
 
#define HAVE_ATTRIBUTE_ERRORFUNC   0
 
#define ERRORFUNC(mesg, x)   x
 
#define HAVE_ATTRIBUTE_WARNINGFUNC   0
 
#define WARNINGFUNC(mesg, x)   x
 
#define GCC_VERSION_SINCE(major, minor, patchlevel)   0
 
#define RB_LIKELY(x)   (x)
 
#define RB_UNLIKELY(x)   (x)
 
#define PRINTF_ARGS(decl, string_index, first_to_check)   decl
 
#define RB_GNUC_EXTENSION
 
#define RB_GNUC_EXTENSION_BLOCK(x)   (x)
 
#define RUBY
 
#define _(args)   ()
 
#define __(args)   ()
 
#define ANYARGS
 
#define xmalloc   ruby_xmalloc
 
#define xmalloc2   ruby_xmalloc2
 
#define xcalloc   ruby_xcalloc
 
#define xrealloc   ruby_xrealloc
 
#define xrealloc2   ruby_xrealloc2
 
#define xfree   ruby_xfree
 
#define RUBY_ATTR_ALLOC_SIZE(params)
 
#define STRINGIZE(expr)   STRINGIZE0(expr)
 
#define STRINGIZE0(expr)   #expr
 
#define RUBY_FUNC_EXPORTED
 
#define EXTERN   RUBY_EXTERN /* deprecated */
 
#define RUBY_MBCHAR_MAXSIZE   INT_MAX
 
#define FLUSH_REGISTER_WINDOWS   ((void)0)
 
#define PATH_SEP   ":"
 
#define PATH_SEP_CHAR   PATH_SEP[0]
 
#define PATH_ENV   "PATH"
 
#define CASEFOLD_FILESYSTEM   0
 
#define DLEXT_MAXLEN   4
 
#define RUBY_PLATFORM   "unknown-unknown"
 
#define FUNC_MINIMIZED(x)   x
 
#define FUNC_UNOPTIMIZED(x)   x
 
#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args)   FUNC_MINIMIZED(type prot) {return (type)name args;}
 
#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args)   FUNC_MINIMIZED(void prot) {name args;}
 
#define RUBY_ALIAS_FUNCTION(prot, name, args)   RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
 
#define UNALIGNED_WORD_ACCESS   0
 
#define PACKED_STRUCT(x)   x
 
#define PACKED_STRUCT_UNALIGNED(x)   x
 

Functions

void * xmalloc (size_t) RUBY_ATTR_ALLOC_SIZE((1))
 
void * xmalloc2 (size_t, size_t) RUBY_ATTR_ALLOC_SIZE((1
 
void void * xcalloc (size_t, size_t) RUBY_ATTR_ALLOC_SIZE((1
 
void void void * xrealloc (void *, size_t) RUBY_ATTR_ALLOC_SIZE((2))
 
void * xrealloc2 (void *, size_t, size_t) RUBY_ATTR_ALLOC_SIZE((2
 
void void xfree (void *)
 

Macro Definition Documentation

◆ _

#define _ (   args)    ()

Definition at line 160 of file defines.h.

◆ __

#define __ (   args)    ()

Definition at line 167 of file defines.h.

◆ ALWAYS_INLINE

#define ALWAYS_INLINE (   x )    x

Definition at line 49 of file defines.h.

◆ ANYARGS

#define ANYARGS

◆ CASEFOLD_FILESYSTEM

#define CASEFOLD_FILESYSTEM   0

Definition at line 307 of file defines.h.

◆ CONSTFUNC

#define CONSTFUNC (   x )    x

Definition at line 27 of file defines.h.

◆ DEPRECATED

#define DEPRECATED (   x )    x

Definition at line 37 of file defines.h.

◆ DEPRECATED_BY

#define DEPRECATED_BY (   n,
 
)    DEPRECATED(x)

Definition at line 40 of file defines.h.

◆ DEPRECATED_TYPE

#define DEPRECATED_TYPE (   mesg,
  decl 
)    decl

Definition at line 43 of file defines.h.

◆ DLEXT_MAXLEN

#define DLEXT_MAXLEN   4

Definition at line 312 of file defines.h.

Referenced by rb_feature_p().

◆ ERRORFUNC

#define ERRORFUNC (   mesg,
 
)    x

Definition at line 53 of file defines.h.

◆ EXTERN

#define EXTERN   RUBY_EXTERN /* deprecated */

Definition at line 271 of file defines.h.

◆ FLUSH_REGISTER_WINDOWS

#define FLUSH_REGISTER_WINDOWS   ((void)0)

◆ FUNC_MINIMIZED

#define FUNC_MINIMIZED (   x )    x

Definition at line 320 of file defines.h.

◆ FUNC_UNOPTIMIZED

#define FUNC_UNOPTIMIZED (   x )    x

Definition at line 323 of file defines.h.

◆ GCC_VERSION_SINCE

#define GCC_VERSION_SINCE (   major,
  minor,
  patchlevel 
)    0

Definition at line 72 of file defines.h.

◆ HAVE_ATTRIBUTE_ERRORFUNC

#define HAVE_ATTRIBUTE_ERRORFUNC   0

Definition at line 52 of file defines.h.

◆ HAVE_ATTRIBUTE_WARNINGFUNC

#define HAVE_ATTRIBUTE_WARNINGFUNC   0

Definition at line 58 of file defines.h.

◆ NOINLINE

#define NOINLINE (   x )    x

Definition at line 46 of file defines.h.

Referenced by rb_check_symbol_cstr().

◆ NORETURN

#define NORETURN (   x )    x

Definition at line 34 of file defines.h.

◆ NORETURN_STYLE_NEW

#define NORETURN_STYLE_NEW   1

Definition at line 32 of file defines.h.

◆ PACKED_STRUCT

#define PACKED_STRUCT (   x)    x

Definition at line 349 of file defines.h.

◆ PACKED_STRUCT_UNALIGNED

#define PACKED_STRUCT_UNALIGNED (   x)    x

Definition at line 355 of file defines.h.

◆ PATH_ENV

#define PATH_ENV   "PATH"

◆ PATH_SEP

#define PATH_SEP   ":"

Definition at line 293 of file defines.h.

Referenced by dln_find_1(), dln_find_exe_r(), Init_File(), and main().

◆ PATH_SEP_CHAR

#define PATH_SEP_CHAR   PATH_SEP[0]

Definition at line 295 of file defines.h.

Referenced by push_include(), and rb_path_check().

◆ PRINTF_ARGS

#define PRINTF_ARGS (   decl ,
  string_index,
  first_to_check 
)    decl

Definition at line 89 of file defines.h.

◆ PUREFUNC

#define PUREFUNC (   x )    x

Definition at line 30 of file defines.h.

◆ RB_GNUC_EXTENSION

#define RB_GNUC_EXTENSION

Definition at line 96 of file defines.h.

◆ RB_GNUC_EXTENSION_BLOCK

#define RB_GNUC_EXTENSION_BLOCK (   x)    (x)

Definition at line 97 of file defines.h.

◆ RB_LIKELY

#define RB_LIKELY (   x)    (x)

Definition at line 81 of file defines.h.

◆ RB_UNLIKELY

#define RB_UNLIKELY (   x)    (x)

Definition at line 82 of file defines.h.

Referenced by rb_alloc_tmp_buffer2().

◆ RUBY

#define RUBY

Definition at line 145 of file defines.h.

◆ RUBY_ALIAS_FUNCTION

#define RUBY_ALIAS_FUNCTION (   prot,
  name,
  args 
)    RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)

Definition at line 334 of file defines.h.

◆ RUBY_ALIAS_FUNCTION_TYPE

#define RUBY_ALIAS_FUNCTION_TYPE (   type,
  prot,
  name,
  args 
)    FUNC_MINIMIZED(type prot) {return (type)name args;}

Definition at line 326 of file defines.h.

◆ RUBY_ALIAS_FUNCTION_VOID

#define RUBY_ALIAS_FUNCTION_VOID (   prot,
  name,
  args 
)    FUNC_MINIMIZED(void prot) {name args;}

Definition at line 330 of file defines.h.

◆ RUBY_ATTR_ALLOC_SIZE

#define RUBY_ATTR_ALLOC_SIZE (   params)

Definition at line 193 of file defines.h.

◆ RUBY_FUNC_EXPORTED

#define RUBY_FUNC_EXPORTED

◆ RUBY_MBCHAR_MAXSIZE

#define RUBY_MBCHAR_MAXSIZE   INT_MAX

Definition at line 275 of file defines.h.

◆ RUBY_PLATFORM

#define RUBY_PLATFORM   "unknown-unknown"

Definition at line 316 of file defines.h.

Referenced by ibf_load_setup(), Init_fiddle(), init_loadpath(), and iseq_ibf_dump().

◆ STRINGIZE

#define STRINGIZE (   expr)    STRINGIZE0(expr)

Definition at line 203 of file defines.h.

Referenced by long_toobig().

◆ STRINGIZE0

#define STRINGIZE0 (   expr)    #expr

Definition at line 205 of file defines.h.

◆ UNALIGNED_WORD_ACCESS

#define UNALIGNED_WORD_ACCESS   0

Definition at line 345 of file defines.h.

Referenced by search_nonascii().

◆ WARNINGFUNC

#define WARNINGFUNC (   mesg,
 
)    x

Definition at line 59 of file defines.h.

◆ xcalloc

#define xcalloc   ruby_xcalloc

◆ xfree

#define xfree   ruby_xfree

Definition at line 188 of file defines.h.

◆ xmalloc

#define xmalloc   ruby_xmalloc

◆ xmalloc2

#define xmalloc2   ruby_xmalloc2

Definition at line 184 of file defines.h.

◆ xrealloc

#define xrealloc   ruby_xrealloc

◆ xrealloc2

#define xrealloc2   ruby_xrealloc2

Definition at line 187 of file defines.h.

Function Documentation

◆ xcalloc()

void void* xcalloc ( size_t  ,
size_t   
)

◆ xfree()

void void xfree ( void *  )

Referenced by allocate_converted_string(), append_fspath(), argf_free(), bbuf_free(), BSD_vfprintf(), clean_hooks(), clear_load_arg(), clear_optimize_info(), constat_delete(), date_strftime_alloc(), date_strftime_internal(), dealloc(), deallocate(), dir_free(), dyna_pop_gen(), exec_end_call_list(), exec_end_procs_chain(), fiddle_handle_free(), fiddle_handle_sym(), fiddle_ptr_free(), flo_to_s(), free_conlist(), free_const_entry_i(), free_dbm(), free_dump_arg(), free_load_arg(), free_loading_table_entry(), gc_mark_roots(), gzfile_free(), hash_id_table_free(), hash_table_extend(), i_free_name_entry(), id2key(), is_mbc_newline_ex(), iseq_set_sequence(), list_id_table_foreach_values(), list_id_table_free(), list_table_extend(), load_path_getcwd(), loaded_features_index_clear_i(), local_pop_gen(), match_at(), mix_id_table_insert(), mSyslog_close(), name_add(), obj_free(), ole_wc2mb_alloc(), onig_compile_ruby(), onig_free(), onig_free_body(), onig_node_free(), onig_node_str_clear(), onig_number_of_names(), onig_region_free(), onig_region_resize(), onig_st_insert_strend(), ossl_bn_hash(), output_hex_charref(), parser_free(), path_check_0(), rand_init(), random_free(), rb_alias_variable(), rb_big_realloc(), rb_class_remove_from_module_subclasses(), rb_class_remove_from_super_subclasses(), rb_const_remove(), rb_default_home_dir(), rb_dir_getwd(), rb_econv_binmode(), rb_econv_close(), rb_econv_insert_output(), rb_econv_open0(), rb_econv_set_replacement(), rb_execarg_run_options(), rb_file_expand_path_internal(), rb_free_generic_ivar(), rb_freeaddrinfo(), rb_gc_free_node(), rb_gc_unregister_address(), rb_method_definition_release(), rb_obj_copy_ivar(), rb_objspace_call_finalizer(), rb_objspace_free(), rb_parser_free(), rb_stat_init(), rb_stat_init_copy(), rb_str_casemap(), rb_str_drop_bytes(), rb_thread_priority_set(), rb_transcoding_close(), rb_w32_home_dir(), release_thread_shield(), remove_trace(), replace_to_long_name(), ruby_getcwd(), ruby_setenv(), sock_s_unpack_sockaddr_in(), start_document(), strftimev(), strio_free(), token_info_pop_gen(), transcode_search_path(), unset_addr_list_end(), update_string_node_case_fold(), VpFree(), vtable_free(), w_float(), zlib_mem_free(), and zstream_free().

◆ xmalloc()

void* xmalloc ( size_t  )

◆ xmalloc2()

void* xmalloc2 ( size_t  ,
size_t   
)

Referenced by zlib_mem_alloc().

◆ xrealloc()

void void void* xrealloc ( void *  ,
size_t   
)

◆ xrealloc2()

void* xrealloc2 ( void *  ,
size_t  ,
size_t   
)