dearblue
14133f4057
Fix macro arguments with paren
2018-12-18 23:05:36 +09:00
Yukihiro "Matz" Matsumoto
53e2df3e93
Restore mrb_string_type function for compatibility.
2018-11-19 16:13:26 +09:00
Yukihiro "Matz" Matsumoto
9516731329
Use type checking mrb_to_str instead of converting mrb_str_to_str.
2018-11-19 12:08:28 +09:00
Yukihiro "Matz" Matsumoto
ff08856fe3
Remove implicit conversion using to_str method; fix #3854
...
We have added internal convenience method `__to_str` which
does string type check.
The issue #3854 was fixed but fundamental flaw of lack of stack
depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA`
for workaround.
2018-11-19 12:05:46 +09:00
dearblue
9da9e5eb4e
Fix typo for concatenate
2018-09-07 22:32:34 +09:00
Yukihiro "Matz" Matsumoto
e4662d77e7
Should not use FSHARED state for string from irep pools; fix #3829
...
This strings in `irep` pools may be freed forcefully in `mrb_irep_free`.
This commit probably fixes #3817 as well.
2017-11-03 08:24:47 +09:00
Yukihiro "Matz" Matsumoto
7edbe428ca
Add new type of shared string: RSTR_FSHARED.
...
`RSTR_FSHARED` use frozen strings as shared body instead of
`struct mrb_shared_string`. This reduces allocation from
literal strings.
2017-10-01 16:24:43 +09:00
Tomasz Dąbrowski
3e1d60ae0b
fix: src\hash.c(27): warning C4244: '=': conversion from 'mrb_int' to 'khint_t', possible loss of data
2017-09-27 22:22:05 +02:00
Yukihiro "Matz" Matsumoto
f1767fd079
Separate mrb_str_buf_new and mrb_str_new_capa.
...
`mrb_str_buf_new` is an old function that ensures capacity size of
`MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use
`mrb_str_new_capa` instead.
2017-08-18 22:17:48 +09:00
Christopher Aue
f937af5745
Extended Module#const_get to support class paths
2017-07-28 23:19:49 +02:00
Christopher Aue
c7018ea962
Added mrb_str_index to the mrb API
2017-07-28 21:07:20 +02:00
Yukihiro "Matz" Matsumoto
77331d127b
Unify else clause style
2017-04-03 16:56:27 +09:00
hhc0null
af4f6e8dc6
Fix a typo.
2017-01-12 00:02:17 +09:00
Takashi Kokubun
10bb7ad693
Implement Object#freeze
2016-12-11 03:44:15 +09:00
Yukihiro "Matz" Matsumoto
f9f19f34dd
replace _cstr by _lit for litral C strings; ref #3300
2016-11-27 20:53:25 +09:00
Nobuyoshi Nakada
6511bfd79a
Removed trailing spaces
2016-09-28 12:29:41 +09:00
Yukihiro "Matz" Matsumoto
afbe211c60
mrb_str_strlen() should be MRB_API; ref #3216
2016-09-27 10:29:56 +09:00
Ralph Desir(Mav7)
189ad47346
yard docs for string.h
2016-07-23 02:47:32 -04:00
Yukihiro "Matz" Matsumoto
25e4ec3f37
cache UTF8 status for utf8_strlen(); ref #980
2016-02-04 23:33:16 +09:00
Yukihiro "Matz" Matsumoto
36fabe104b
new API function mrb_string_value_len()
2015-12-01 16:18:01 +09:00
Yukihiro "Matz" Matsumoto
065966dae4
common.h are supposed to be included from other header, so call it with quotes; ref #3032
2015-11-28 00:10:38 +09:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00
Tomoyuki Sahara
90b7ec88dc
YARD doc for mrb_str_to_cstr.
2015-11-24 16:03:58 +09:00
Seba Gamboa
649901b75c
Merge doc/api/mruby/string.h.md contents
2015-10-08 12:55:28 -03:00
Seba Gamboa
a0fe0c40b1
Remove old doxygen tags
2015-10-08 12:29:10 -03:00
Seba Gamboa
40bf7bde78
Sorting documentation grouping
2015-09-21 01:48:42 -03:00
Seba Gamboa
c127614638
Setting up doxygen groups
2015-09-20 21:14:07 -03:00
Seba Gamboa
7505bad677
Playing around with some documentations schemes
2015-09-18 23:59:29 -03:00
Yukihiro "Matz" Matsumoto
1a45447b8b
add String#freeze to the core
2015-08-27 17:54:30 +09:00
Yukihiro "Matz" Matsumoto
9e4b012478
Merge pull request #2570 from cubicdaiya/issues/unify_duplicated_functions
...
Unify and rename duplicated functions (noregexp() and regexp_check()).
2014-08-29 01:09:33 +09:00
Tatsuhiko Kubo
5fa30aeaea
Fix mismatches for MRB_API declarations.
2014-08-29 01:06:22 +09:00
Tatsuhiko Kubo
db29a25ada
Rename functions for avoinding symbol confiliction.
...
Add prefix(mrb) to noregexp() and regexp_check().
2014-08-28 19:18:52 +09:00
Tatsuhiko Kubo
d958aa2cb1
Unify duplicated functions (noregexp() and regexp_check()).
2014-08-28 19:13:57 +09:00
Yukihiro "Matz" Matsumoto
fce644df59
Merge pull request #2508 from iij/pr-mrb-str-to-cstr-returns-mutable
...
revert accidental constify.
2014-08-05 16:32:52 +09:00
Tomoyuki Sahara
412b9eb827
revert accidental constify.
2014-08-05 15:02:27 +09:00
Yukihiro "Matz" Matsumoto
db7b01c0b3
turn string obsolete functions into macros
2014-08-04 00:53:58 +09:00
Yukihiro "Matz" Matsumoto
206f89e209
add MRB_API modifiers to mruby API functions
2014-08-04 00:47:08 +09:00
Jun Hiroe
9c259c501a
Add NOFREE macros
2014-06-11 01:00:35 +09:00
Yukihiro "Matz" Matsumoto
32e450166f
move STR_* macros to mruby/string.h with renaming
2014-06-07 22:16:16 +09:00
Yukihiro "Matz" Matsumoto
b1dd57efa1
move IS_EVSTR macro that should be private to src/string.c
2014-06-06 00:19:46 +09:00
cremno
739b155535
remove mrb_str_offset
2014-04-29 07:13:44 +02:00
cremno
91c22f32f4
rename mrb_str_buf_append to mrb_str_cat_str
...
The new name is better and less confusing, because:
- `mrb_str_append` calls `mrb_str_to_str` and this function doesn't
- `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
2014-04-27 22:33:22 +02:00
Yukihiro "Matz" Matsumoto
83c1399af0
eliminate plain int except for a few cases like arena_index
2014-04-25 04:01:57 +09:00
cremno
bc23a5e9e5
remove mrb_str_buf_cat
...
It does the same as `mrb_str_cat`.
2014-04-21 21:28:06 +02:00
Yukihiro "Matz" Matsumoto
792c1add0c
string functions arguments changed from mrb_int to size_t that would take strlen()
2014-03-19 00:46:27 +09:00
Yukihiro "Matz" Matsumoto
048bca43c9
string length type to be mrb_int
2014-03-15 15:47:21 +09:00
cremno
e4afd5374f
add mrb_strlen_lit which makes _lit macros safer
...
strlen(3) + string literal is usually optimized but strlen(3) doesn't
check if its argument is really a string literal. This is important for
mruby's _static functions to which some _lit macros are expanded (string
literals have static storage). See comment for some additional info.
remove unnecessary parentheses
2014-03-12 17:56:08 +01:00
Yukihiro "Matz" Matsumoto
6423011986
remove invocation of strlen() on buffer of strings; with refactoring
2014-03-09 02:35:49 +09:00
Masaki Muranaka
270d25bf2d
Make type casts safer.
2014-03-08 15:53:59 +09:00
take_cheeze
c3f3a0484a
use sizeof(void*) instead of mrb_int size and extend embed string size
2014-03-08 00:32:59 +09:00