Ruby: include/ruby/internal/intern/ruby.h Source File

Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)

ruby.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_RUBY_H
23#include "ruby/internal/attr/nonnull.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* ruby.c */
31#define rb_argv rb_get_argv()
32
41 RUBY_EXTERN VALUE rb_argv0;
42
43/* io.c */
44
51 VALUE rb_get_argv(void);
52
53/* ruby.c */
54
55 RBIMPL_ATTR_NONNULL(())
64void *rb_load_file(const char *file);
65
73void *rb_load_file_str(VALUE file);
74
75 RBIMPL_SYMBOL_EXPORT_END()
76
77#endif /* RBIMPL_INTERN_RUBY_H */
dllexport.h
Tweaking visibility of C variables/functions.
RUBY_EXTERN
#define RUBY_EXTERN
Declaration of externally visible global variables.
Definition dllexport.h:45
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:74
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
rb_argv0
VALUE rb_argv0
The value of $0 at process bootup.
Definition ruby.c:1848
rb_get_argv
VALUE rb_get_argv(void)
Queries the arguments passed to the current process that you can access from Ruby as ARGV.
Definition io.c:14628
rb_load_file_str
void * rb_load_file_str(VALUE file)
Identical to rb_load_file(), except it takes the argument as a Ruby's string instead of C's.
Definition ruby.c:2927
rb_load_file
void * rb_load_file(const char *file)
Loads the given file.
Definition ruby.c:2920
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40