Ruby: include/ruby/internal/intern/load.h File Reference

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

Macros | Functions
load.h File Reference

Public APIs related to rb_f_require(). More...

`#include "ruby/internal/dllexport.h"`
`#include "ruby/internal/value.h"`

Go to the source code of this file.

## Macros
#define | RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
#define | HAVE_RB_EXT_RACTOR_SAFE 1

## Functions
void | rb_load (VALUE, int)
void | rb_load_protect (VALUE, int, int *)
int | rb_provided (const char *)
int | rb_feature_provided (const char *, const char **)
void | rb_provide (const char *)
VALUE | rb_f_require (VALUE, VALUE)
VALUE | rb_require_string (VALUE)
void | rb_ext_ractor_safe (bool flag)

## Detailed Description

Public APIs related to rb_f_require().

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  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.

Warning
  Symbols prefixed with either `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.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__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 load.h.

## Macro Definition Documentation

## ◆ HAVE_RB_EXT_RACTOR_SAFE

#define HAVE_RB_EXT_RACTOR_SAFE 1

Definition at line 40 of file load.h.

## ◆ RB_EXT_RACTOR_SAFE

#define RB_EXT_RACTOR_SAFE | ( |  | f | ) | rb_ext_ractor_safe(f)

Definition at line 39 of file load.h.

## Function Documentation

## ◆ rb_ext_ractor_safe()

void rb_ext_ractor_safe | ( | bool | flag | ) |

Definition at line 1058 of file load.c.

Referenced by Init_bigdecimal(), Init_cparse(), Init_escape(), Init_generator(), Init_monitor(), Init_openssl(), Init_parser(), Init_pathname(), Init_socket(), Init_stringio(), Init_strscan(), Init_zlib(), InitVM_digest(), and ruby_Init_Fiber_as_Coroutine().

## ◆ rb_f_require()

VALUE rb_f_require | ( | VALUE | obj,
|  | VALUE | fname
| ) |  |

Definition at line 880 of file load.c.

References rb_require_string().

Referenced by Init_load().

## ◆ rb_feature_provided()

int rb_feature_provided | ( | const char * | feature,
|  | const char ** | loading
| ) |  |

Definition at line 571 of file load.c.

References FALSE, IS_DLEXT, IS_RBEXT, IS_SOEXT, Qnil, rb_file_expand_path_fast(), RB_GC_GUARD, rb_get_path(), rb_str_new2, RSTRING_PTR, strchr(), strrchr(), and TRUE.

Referenced by rb_provided().

## ◆ rb_load()

void rb_load | ( | VALUE | fname,
|  | int | wrap
| ) |  |

Definition at line 702 of file load.c.

References FilePathValue, and rb_find_file().

Referenced by rb_load_protect().

## ◆ rb_load_protect()

void rb_load_protect | ( | VALUE | fname,
|  | int | wrap,
|  | int * | pstate
| ) |  |

Definition at line 710 of file load.c.

References EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, rb_load(), and TAG_NONE.

## ◆ rb_provide()

void rb_provide | ( | const char * | feature | ) |

Definition at line 616 of file load.c.

References rb_fstring_cstr.

Referenced by Init_Complex(), Init_Rational(), Init_version(), and InitVM_Enumerator().

## ◆ rb_provided()

int rb_provided | ( | const char * | feature | ) |

Definition at line 565 of file load.c.

References rb_feature_provided().

Referenced by ruby_init_ext().

## ◆ rb_require_string()

VALUE rb_require_string | ( | VALUE | fname | ) |

Definition at line 1183 of file load.c.

References EC_JUMP_TAG, Qfalse, Qtrue, and TAG_RETURN.

Referenced by rb_f_require(), rb_f_require_relative(), and rb_require().