Ruby: internal/encoding.h Source File

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

encoding.h
1#ifndef INTERNAL_ENCODING_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_ENCODING_H
11#include "ruby/ruby.h" /* for ID */
12#include "ruby/encoding.h" /* for rb_encoding */
13
14#define rb_enc_autoload_p(enc) (!rb_enc_mbmaxlen(enc))
15#define rb_is_usascii_enc(enc) ((enc) == rb_usascii_encoding())
16#define rb_is_ascii8bit_enc(enc) ((enc) == rb_ascii8bit_encoding())
17#define rb_is_locale_enc(enc) ((enc) == rb_locale_encoding())
18
19/* encoding.c */
20 ID rb_id_encoding(void);
21 rb_encoding *rb_enc_get_from_index(int index);
22 rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
23int rb_encdb_replicate(const char *alias, const char *orig);
24int rb_encdb_alias(const char *alias, const char *orig);
25int rb_enc_autoload(rb_encoding *enc);
26int rb_encdb_dummy(const char *name);
27void rb_encdb_declare(const char *name);
28void rb_enc_set_base(const char *name, const char *orig);
29int rb_enc_set_dummy(int index);
30PUREFUNC(int rb_data_is_encoding(VALUE obj));
31
32#endif /* INTERNAL_ENCODING_H */
encoding.h
Encoding relates APIs.
ruby.h
OnigEncodingTypeST
Definition onigmo.h:160
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