Commit Graph

207 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 539d9cb855 need not to add assertion in STR_SET_LEN() where n is mrb_int 2014-03-22 22:33:09 +09:00
cubicdaiya 51947f132b Use bool-macro instead of magic-number 2014-03-22 09:55:48 +09: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
cubicdaiya cee152670a unify indent style 2014-03-16 07:44:44 +09:00
Yukihiro "Matz" Matsumoto 048bca43c9 string length type to be mrb_int 2014-03-15 15:47:21 +09:00
ksss 49a048c544 set bit field for mrb_bool 2014-03-10 13:14:07 +00:00
Yukihiro "Matz" Matsumoto 4f27089b4a Merge branch 'master' of github.com:mruby/mruby 2014-03-09 03:16:28 +09:00
cremno bfc522bcd5 use mrb_str_cat_lit for literals 2014-03-08 18:38:31 +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
ksss 54132e4364 make embed string when create literals 2014-03-06 13:47:51 +00:00
ksss 4070b5987a embed small string
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
2014-03-06 13:12:08 +00:00
cubicdaiya ebe4711df8 fix off-by-one error in String#rindex(fixnum)
null-terminated string should not be included in search targets.
2014-03-04 21:58:47 +09:00
Yukihiro "Matz" Matsumoto 18f0fcb0c7 add new macros for MRB_STR_SHARED operations, based on 0f7aecf from @ksss; ref #1782 2014-03-04 01:33:58 +09:00
cubicdaiya 8336072e86 fix SEGV bug for mrb_str_new_static
mrb_str_new_static causes seg-fault when 3rd argument is negative.
2014-02-28 02:07:09 +09:00
cubicdaiya 30fe3f5d4b fix SEGV bug for mrb_str_new
mrb_str_new causes seg-fault when 3rd argument is negative.
2014-02-28 01:30:09 +09:00
cubicdaiya a238c9c1c3 make mrb_str_dump a bit faster 2014-02-28 00:20:36 +09:00
cubicdaiya 94c5a5ee73 use mrb_str_new_lit instead of mrb_str_new for C string literals 2014-02-26 02:23:50 +09:00
Yukihiro "Matz" Matsumoto 19a08b8455 Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Yukihiro "Matz" Matsumoto 4a2c37df93 made mrb_define_class to return existing class, with heavy refactoring 2014-02-08 13:44:31 +09:00
cremno 4507985c3e use mrb_bool, FALSE and TRUE more
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
2014-01-31 18:00:36 +01:00
cremno f2a62a74ed clean up external symbols
remove unused and unneeded:
- sysexit_status
- type (a global variable)

add mrb_ prefix to:
- codedump_all
- class_instance_method_list
- parser_dump

make various functions static, incl.:
- yyparse
- make_exception
2014-01-31 01:30:18 +01:00
Yukihiro "Matz" Matsumoto 5346bdd76b move range aware aget to array.c from mruby-array-ext gem 2014-01-29 14:53:38 +09:00
h2so5 a030cab7d1 escape non-ascii characters correctly in String#inspect 2014-01-21 21:36:59 +09:00
cremno 84e9c4befe string.c: remove str_mod_check
Clang 3.4 emits '-Wunused-function' - and it's really unused!
But according to the description this seems to be a bug:

>Warn whenever a static function is declared but not defined or
>a non-inline static function is unused. This warning is enabled by
-Wall.

Source: <http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>
2014-01-07 18:15:45 +01:00
Yukihiro "Matz" Matsumoto dc27c2be46 Merge pull request #1634 from cremno/use-mrb_fixnum_p
tiny word boxing optimization
2014-01-02 15:46:00 -08:00
cremno 18433731ed remove various preprocessor conditionals
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
cremno 09bb30870b tiny word boxing optimization 2014-01-02 06:36:29 +01:00
Yukihiro "Matz" Matsumoto 673d9183cf avoid copying when the original string comes with MRB_STR_NOFREE 2013-12-25 10:30:48 +09:00
Yukihiro "Matz" Matsumoto 9b7b18aaf4 clear STR_NOFREE flag on modify 2013-12-25 10:19:35 +09:00
take_cheeze df780ae5e9 add mrb_intern_lit for creating symbol from string literal 2013-12-01 10:38:59 +09:00
Yukihiro "Matz" Matsumoto 9c6398a444 rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513 2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto fb386011df rename API mrb_str_dup_static() -> mrb_str_pool() 2013-11-20 08:37:16 +09:00
Miura Hideki 54c5b12fb7 irep->pool struct pool -> mrb_value 2013-11-19 20:38:02 +09:00
Yukihiro "Matz" Matsumoto 677a2ac226 irep->pool not to be GCed 2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto 97ce25fbd0 index to mrb_digitmap[] should always be positive 2013-09-21 17:15:58 +09:00
Tomoyuki Sahara f77dc2e6cb Merge branch 'mruby' into pr-typeerror-string-start-end-with
Conflicts:
	mrbgems/mruby-string-ext/src/string.c
	mrbgems/mruby-string-ext/test/string.rb
2013-08-26 23:20:22 +09:00
h2so5 23df879a81 Fix a problem of 'z' option and shared string 2013-08-24 06:52:46 +09:00
Tomoyuki Sahara 53ff8172e5 add mrb_string_type(). 2013-08-23 15:06:26 +09:00
Jun Hiroe d4b2d0a912 I fix ISO No in String class in comparison with ISO_IEC_30170_2012(E)-Charactor_PDF_document.pdf 2013-08-11 21:15:01 +09:00
Yukihiro "Matz" Matsumoto 8d7e716158 String =~ and match to work with pluggable Regexp; close #1398 2013-07-23 20:22:15 +09:00
Jun Hiroe 8e42868600 Repalace int with mrb_bool because a return value is boolean. 2013-07-15 23:17:12 +09:00
Jun Hiroe 39b78ee48c Replace 0 with '\0' as nul terminated string. 2013-07-11 01:08:40 +09:00
Masaki Muranaka e4ae05ed9b Cleanup mrb_str_resize(). 2013-06-21 16:06:35 +09:00
cubicdaiya 967c9cff2b make mrb_str_new_cstr DRY
Using str_new eliminates duplicated codes in mrb_str_new_cstr.
2013-06-21 09:53:10 +09:00
kimu_shu e720782f81 Add MRB_WORD_BOXING mode (represent mrb_value as a word) 2013-05-26 10:09:17 +09:00
Yukihiro "Matz" Matsumoto 8890a992a6 always use unsigned int as mrb_bool even in C++ 2013-04-29 09:23:43 +09:00
Yukihiro "Matz" Matsumoto a1df3fdb0c fix mrb_string_shared memory leaks 2013-04-29 07:47:12 +09:00
Yukihiro "Matz" Matsumoto 5077f9ec8b move mrb_shared_string definition to src/string.c 2013-04-29 07:24:55 +09:00
Yukihiro "Matz" Matsumoto 5c68195c88 mrb_str_new_static(): zero copy string creation 2013-04-28 02:47:22 +09:00