Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions
defines.h File Reference
#include "ruby/config.h"
#include <stdio.h>
#include "ruby/missing.h"

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   <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
 
#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

Definition at line 173 of file defines.h.

◆ CASEFOLD_FILESYSTEM

#define CASEFOLD_FILESYSTEM   0

Definition at line 316 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 321 of file defines.h.

◆ ERRORFUNC

#define ERRORFUNC (   mesg,
 
)    x

Definition at line 53 of file defines.h.

◆ EXTERN

#define EXTERN   <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->

Definition at line 279 of file defines.h.

◆ FLUSH_REGISTER_WINDOWS

#define FLUSH_REGISTER_WINDOWS   ((void)0)

Definition at line 296 of file defines.h.

◆ FUNC_MINIMIZED

#define FUNC_MINIMIZED (   x )    x

Definition at line 329 of file defines.h.

◆ FUNC_UNOPTIMIZED

#define FUNC_UNOPTIMIZED (   x )    x

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

◆ 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 358 of file defines.h.

◆ PACKED_STRUCT_UNALIGNED

#define PACKED_STRUCT_UNALIGNED (   x)    x

Definition at line 364 of file defines.h.

◆ PATH_ENV

#define PATH_ENV   "PATH"

Definition at line 306 of file defines.h.

Referenced by dln_find_exe_r().

◆ PATH_SEP

#define PATH_SEP   ":"

Definition at line 302 of file defines.h.

Referenced by dln_find_exe_r().

◆ PATH_SEP_CHAR

#define PATH_SEP_CHAR   PATH_SEP[0]

Definition at line 304 of file defines.h.

Referenced by 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.

◆ 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 343 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 335 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 339 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

Definition at line 263 of file defines.h.

Referenced by rb_ary_free(), rb_free_generic_ivar(), rb_str_free(), and rb_str_unlocktmp().

◆ RUBY_MBCHAR_MAXSIZE

#define RUBY_MBCHAR_MAXSIZE   INT_MAX

Definition at line 284 of file defines.h.

◆ RUBY_PLATFORM

#define RUBY_PLATFORM   "unknown-unknown"

Definition at line 325 of file defines.h.

Referenced by Init_fiddle().

◆ STRINGIZE

#define STRINGIZE (   expr)    STRINGIZE0(expr)

Definition at line 203 of file defines.h.

◆ STRINGIZE0

#define STRINGIZE0 (   expr)    #expr

Definition at line 205 of file defines.h.

◆ UNALIGNED_WORD_ACCESS

#define UNALIGNED_WORD_ACCESS   0

Definition at line 354 of file defines.h.

◆ WARNINGFUNC

#define WARNINGFUNC (   mesg,
 
)    x

Definition at line 59 of file defines.h.

◆ xcalloc

#define xcalloc   ruby_xcalloc

Definition at line 185 of file defines.h.

Referenced by rb_parser_calloc(), and RUBY_ALIAS_FUNCTION().

◆ 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 *  )

◆ xmalloc()

void* xmalloc ( size_t  )

◆ xmalloc2()

void* xmalloc2 ( size_t  ,
size_t   
)

◆ xrealloc()

void void void* xrealloc ( void *  ,
size_t   
)

◆ xrealloc2()

void* xrealloc2 ( void *  ,
size_t  ,
size_t   
)