Ruby: miniinit.c Source File

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

miniinit.c
1/**********************************************************************
2
3 miniinit.c -
4
5 $Author$
6 created at: Thu Jul 11 22:09:57 JST 2013
7
8 Copyright (C) 2013 Yukihiro Matsumoto
9
10**********************************************************************/
11
12#include "ruby/ruby.h"
13#include "ruby/encoding.h"
14
15/* loadpath.c */
16const char ruby_exec_prefix[] = "";
17const char ruby_initial_load_paths[] = "";
18
19/* localeinit.c */
20 VALUE
21 rb_locale_charmap(VALUE klass)
22{
23 /* never used */
24 return Qnil;
25}
26
27int
28rb_locale_charmap_index(void)
29{
30 return -1;
31}
32
33int
34Init_enc_set_filesystem_encoding(void)
35{
36 return rb_enc_to_index(rb_default_external_encoding());
37}
38
39void rb_encdb_declare(const char *name);
40int rb_encdb_alias(const char *alias, const char *orig);
41void
42Init_enc(void)
43{
44 rb_encdb_declare("ASCII-8BIT");
45 rb_encdb_declare("US-ASCII");
46 rb_encdb_declare("UTF-8");
47 rb_encdb_alias("BINARY", "ASCII-8BIT");
48 rb_encdb_alias("ASCII", "US-ASCII");
49}
50
51#include "mini_builtin.c"
Qnil
#define Qnil
Old name of RUBY_Qnil.
Definition special_consts.h:60
encoding.h
Encoding relates APIs.
rb_locale_charmap
VALUE rb_locale_charmap(VALUE klass)
Returns a platform-depended "charmap" of the current locale.
Definition localeinit.c:91
ruby.h
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40