Ruby: include/ruby/internal/encoding/symbol.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

symbol.h
Go to the documentation of this file.
1#ifndef RUBY_INTERNAL_ENCODING_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RUBY_INTERNAL_ENCODING_SYMBOL_H
24#include "ruby/internal/attr/nonnull.h"
25#include "ruby/internal/dllexport.h"
26#include "ruby/internal/encoding/encoding.h"
27#include "ruby/internal/value.h"
28
29 RBIMPL_SYMBOL_EXPORT_BEGIN()
30
31
45 ID rb_intern3(const char *name, long len, rb_encoding *enc);
46
47 RBIMPL_ATTR_NONNULL(())
56int rb_enc_symname_p(const char *str, rb_encoding *enc);
57
69int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc);
70
82 ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
83
96 VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
97
98 RBIMPL_SYMBOL_EXPORT_END()
99
100#endif /* RUBY_INTERNAL_ENCODING_SYMBOL_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
encoding.h
Defines rb_encoding.
rb_enc_symname_p
int rb_enc_symname_p(const char *str, rb_encoding *enc)
Identical to rb_symname_p(), except it additionally takes an encoding.
Definition symbol.c:208
rb_intern3
ID rb_intern3(const char *name, long len, rb_encoding *enc)
Identical to rb_intern2(), except it additionally takes an encoding.
Definition symbol.c:725
rb_check_symbol_cstr
VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id_cstr(), except for the return type.
Definition symbol.c:1192
rb_enc_symname2_p
int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
Identical to rb_enc_symname_p(), except it additionally takes the passed string's length.
Definition symbol.c:411
rb_check_id_cstr
ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id(), except it takes a pointer to a memory region instead of Ruby's string.
Definition symbol.c:1181
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
OnigEncodingTypeST
Definition onigmo.h:160
value.h
Defines VALUE and ID.
ID
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40