Ruby: include/ruby/ruby.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
ruby.h File Reference
`#include "ruby/internal/config.h"`
`#include <stdarg.h>`
`#include "defines.h"`
`#include "ruby/internal/anyargs.h"`
`#include "ruby/internal/arithmetic.h"`
`#include "ruby/internal/core.h"`
`#include "ruby/internal/ctype.h"`
`#include "ruby/internal/dllexport.h"`
`#include "ruby/internal/error.h"`
`#include "ruby/internal/eval.h"`
`#include "ruby/internal/event.h"`
`#include "ruby/internal/fl_type.h"`
`#include "ruby/internal/gc.h"`
`#include "ruby/internal/glob.h"`
`#include "ruby/internal/globals.h"`
`#include "ruby/internal/has/warning.h"`
`#include "ruby/internal/interpreter.h"`
`#include "ruby/internal/iterator.h"`
`#include "ruby/internal/memory.h"`
`#include "ruby/internal/method.h"`
`#include "ruby/internal/module.h"`
`#include "ruby/internal/newobj.h"`
`#include "ruby/internal/rgengc.h"`
`#include "ruby/internal/scan_args.h"`
`#include "ruby/internal/special_consts.h"`
`#include "ruby/internal/symbol.h"`
`#include "ruby/internal/value.h"`
`#include "ruby/internal/value_type.h"`
`#include "ruby/internal/variable.h"`
`#include "ruby/assert.h"`
`#include "ruby/backward/2/assume.h"`
`#include "ruby/backward/2/inttypes.h"`
`#include "ruby/backward/2/limits.h"`
`#include "ruby/intern.h"`
`#include "ruby/subst.h"`
`#include "ruby/backward.h"`

Go to the source code of this file.

## Macros
#define | USE_SYMBOL_AS_METHOD_NAME 1
#define | FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
#define | FilePathStringValue(v) ((v) = rb_get_path(v))
#define | RUBY_VM 1 /* YARV */
#define | HAVE_NATIVETHREAD
#define | InitVM(ext) {void InitVM_##ext(void);InitVM_##ext();}

## Functions
VALUE | rb_get_path (VALUE)
VALUE | rb_get_path_no_checksafe (VALUE)
const char * | rb_class2name (VALUE)
const char * | rb_obj_classname (VALUE)
void | rb_p (VALUE)
VALUE | rb_equal (VALUE, VALUE)
| This function is an optimized version of calling #==. More...
VALUE | rb_require (const char *)
int | ruby_native_thread_p (void)
int | ruby_snprintf (char *str, size_t n, char const *fmt,...)
int | ruby_vsnprintf (char *str, size_t n, char const *fmt, va_list ap)

## Detailed Description

Author
  $Author$

Date
  Thu Jun 10 14:26:32 JST 1993

Copyright
  Copyright (C) 1993-2008 Yukihiro Matsumoto
  Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000 Information-technology Promotion Agency, Japan
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Definition in file ruby.h.

## Macro Definition Documentation

## ◆ FilePathStringValue

#define FilePathStringValue | ( |  | v | ) | ((v) = rb_get_path(v))

Definition at line 64 of file ruby.h.

## ◆ FilePathValue

#define FilePathValue | ( |  | v | ) | (RB_GC_GUARD(v) = rb_get_path(v))

Definition at line 61 of file ruby.h.

## ◆ HAVE_NATIVETHREAD

#define HAVE_NATIVETHREAD

Definition at line 109 of file ruby.h.

## ◆ InitVM

#define InitVM | ( |  | ext | ) | {void InitVM_##ext(void);InitVM_##ext();}

Definition at line 112 of file ruby.h.

## ◆ RUBY_VM

#define RUBY_VM 1 /* YARV */

Definition at line 108 of file ruby.h.

## ◆ USE_SYMBOL_AS_METHOD_NAME

#define USE_SYMBOL_AS_METHOD_NAME 1

Definition at line 58 of file ruby.h.

## Function Documentation

## ◆ rb_class2name()

const char * rb_class2name | ( | VALUE | klass | ) |

Definition at line 299 of file variable.c.

References NIL_P, NULL, rb_class_real(), and RSTRING_PTR.

Referenced by rb_obj_classname(), and rb_profile_frame_classpath().

## ◆ rb_get_path()

VALUE rb_get_path | ( | VALUE | obj | ) |

Definition at line 245 of file file.c.

References rb_get_path_check_convert(), and rb_get_path_check_to_string().

Referenced by rb_feature_provided(), rb_find_file(), rb_find_file_ext(), rb_get_path_no_checksafe(), and rb_resolve_feature_path().

## ◆ rb_get_path_no_checksafe()

VALUE rb_get_path_no_checksafe | ( | VALUE | obj | ) |

Definition at line 239 of file file.c.

References rb_get_path().

## ◆ rb_obj_classname()

const char * rb_obj_classname | ( | VALUE | obj | ) |

Definition at line 308 of file variable.c.

References CLASS_OF, and rb_class2name().

Referenced by rb_builtin_class_name(), rb_Hash(), rb_hash_set_default_proc(), and rb_int_cmp().

## ◆ rb_p()

void rb_p | ( | VALUE | obj | ) |

Definition at line 7964 of file io.c.

References rb_inspect(), and rb_obj_as_string().

## ◆ rb_require()

VALUE rb_require | ( | const char * | fname | ) |

Definition at line 1199 of file load.c.

References rb_require_string(), and rb_str_new_cstr.

Referenced by Init_bubblebabble(), Init_generator(), Init_parser(), and Init_psych_parser().

## ◆ ruby_native_thread_p()

int ruby_native_thread_p | ( | void |  | ) |

Definition at line 5564 of file thread.c.

## ◆ ruby_snprintf()

int ruby_snprintf | ( | char * | str,
|  | size_t | n,
|  | char const * | fmt,
|  |  | ...
| ) |  |

Definition at line 1037 of file sprintf.c.

References EOF, and str.

## ◆ ruby_vsnprintf()

int ruby_vsnprintf | ( | char * | str,
|  | size_t | n,
|  | char const * | fmt,
|  | va_list | ap
| ) |  |

Definition at line 1010 of file sprintf.c.

References EOF, and str.