1#ifndef INTERNAL_STRING_H
2#define INTERNAL_STRING_H
19#define STR_NOEMBED FL_USER1
20#define STR_SHARED FL_USER2
23# undef rb_fstring_cstr
48static inline bool STR_EMBED_P(
VALUE str);
49static inline bool STR_SHARED_P(
VALUE str);
51static inline VALUE QUOTE_ID(
ID v);
52static inline bool is_ascii_string(
VALUE str);
53static inline bool is_broken_string(
VALUE str);
54static inline VALUE rb_str_eql_internal(
const VALUE str1,
const VALUE str2);
56RUBY_SYMBOL_EXPORT_BEGIN
78#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
79#define rb_fstring_literal(str) rb_fstring_lit(str)
80#define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
81#define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
121rb_str_eql_internal(
const VALUE str1,
const VALUE str2)
124 const char *ptr1, *ptr2;
135#if __has_builtin(__builtin_constant_p)
136# define rb_fstring_cstr(str) \
137 (__builtin_constant_p(str) ? \
138 rb_fstring_new((str), (long)strlen(str)) : \
139 (rb_fstring_cstr)(str))
Internal header absorbing C compipler differences.
#define MJIT_SYMBOL_EXPORT_END
#define MJIT_SYMBOL_EXPORT_BEGIN
char str[HTML_ESCAPE_MAX_LEN+1]
#define RSTRING_LEN(string)
#define RSTRING_PTR(string)
#define ENC_CODERANGE_7BIT
int rb_enc_str_coderange(VALUE)
#define ENC_CODERANGE_BROKEN
Thin wrapper to ruby/config.h.
int rb_str_comparable(VALUE, VALUE)
VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc)
VALUE rb_str_initialize(VALUE str, const char *ptr, long len, rb_encoding *enc)
VALUE rb_str_locktmp_ensure(VALUE str, VALUE(*func)(VALUE), VALUE arg)
char * rb_str_fill_terminator(VALUE str, const int termlen)
const char * ruby_escaped_char(int c)
void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen)
VALUE rb_str_eql(VALUE str1, VALUE str2)
int rb_str_symname_p(VALUE)
VALUE rb_str_quote_unprintable(VALUE)
VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc)
size_t rb_str_memsize(VALUE)
VALUE rb_str_opt_plus(VALUE x, VALUE y)
VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len, rb_encoding *from, int ecflags, VALUE ecopts)
VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc)
VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc)
VALUE rb_str_tmp_frozen_acquire(VALUE str)
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p)
VALUE rb_str_concat_literals(size_t num, const VALUE *strary)
VALUE rb_str_upto_each(VALUE, VALUE, int, int(*each)(VALUE, VALUE), VALUE)
void rb_str_make_independent(VALUE str)
void rb_str_tmp_frozen_release(VALUE str, VALUE tmp)
VALUE rb_str_upto_endless_each(VALUE, int(*each)(VALUE, VALUE), VALUE)
VALUE rb_obj_as_string_result(VALUE str, VALUE obj)
VALUE rb_str_chomp_string(VALUE str, VALUE chomp)
VALUE rb_fstring_new(const char *ptr, long len)
char * rb_str_to_cstr(VALUE str)
VALUE rb_id_quote_unprintable(ID)
#define rb_fstring_cstr(str)
int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc)
VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str)
VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl)
int memcmp(const void *s1, const void *s2, size_t len)