Ruby 3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
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 */
20ID rb_id_encoding(void);
21const char * rb_enc_inspect_name(rb_encoding *enc);
22rb_encoding *rb_enc_get_from_index(int index);
23rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
24int rb_encdb_replicate(const char *alias, const char *orig);
25int rb_encdb_alias(const char *alias, const char *orig);
26int rb_enc_autoload(rb_encoding *enc);
27int rb_encdb_dummy(const char *name);
28void rb_encdb_declare(const char *name);
29void rb_enc_set_base(const char *name, const char *orig);
30int rb_enc_set_dummy(int index);
31void rb_enc_raw_set(VALUE obj, rb_encoding *enc);
32
33PUREFUNC(int rb_data_is_encoding(VALUE obj));
34
35/* vm.c */
36void rb_free_global_enc_table(void);
37
38#endif /* INTERNAL_ENCODING_H */
Encoding relates APIs.
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