Ruby 3.5.0dev (2025-02-22 revision 412997300569c1853c09813e4924b6df3d7e8669)
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
27#include "ruby/internal/value.h"
28
30
31
45ID rb_intern3(const char *name, long len, rb_encoding *enc);
46
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
82ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
83
96VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
97
99
100#endif /* RUBY_INTERNAL_ENCODING_SYMBOL_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
Defines rb_encoding.
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:227
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:1242
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:430
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:1231
int len
Length of the buffer.
Definition io.h:8
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
Defines VALUE and ID.
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40