Commit Graph

107 Commits

Author SHA1 Message Date
Masaki Muranaka 95c34a90ca Remove RB_GC_GUARD(x) macro. See also mruby/mruby#948. 2013-03-05 13:00:17 +09:00
Masaki Muranaka 5a025813b5 Include stdio.h in mrbconf.h instead of C extension sources. 2013-03-05 01:38:51 +09:00
Carson McDonald a306ac7651 The variable len isn't used anywhere. 2013-03-03 07:57:20 -05:00
Masaki Muranaka e4231a0a33 Add typedef to structures that have mrb_ prefix. Use typedef-ed type instead of struct directly. 2013-03-01 14:28:22 +09:00
Masaki Muranaka cb7cf4e795 Simplify mrb_range_beg_len(). Don't use OTHER macro. 2013-02-26 15:43:19 +09:00
Yukihiro "Matz" Matsumoto bbd50cca2f Merge pull request #878 from monaka/pr-reduce-sprintf
Reduce sprintf() calls. Remove mrb_int_to_str() and MRB_INT_FORMAT.
2013-02-23 21:31:39 -08:00
Masaki Muranaka b833df3d37 Remove commented out code. Remove redundant function calls. 2013-02-24 00:11:48 +09:00
Masaki Muranaka dd62349749 Reduce sprintf() calls. Remove mrb_int_to_str() and MRB_INT_FORMAT. 2013-02-23 21:21:15 +09:00
Yukihiro Matz Matsumoto 7ce9cc3b83 String#split should honor limit arg 2013-02-18 18:47:25 +09:00
mattn 55ef8c50fb REGEXP_CLASS 2013-02-15 10:22:10 +09:00
mattn 6aee0485fc Should be OP_LOADL 2013-02-15 09:22:59 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00
Akira Yumiyama 397d1e7aa9 add mrb_str_to_cstr 2013-02-11 21:02:35 +09:00
Masamitsu MURASE eaf32e02e0 Restore arena in String#split. 2013-02-03 17:10:05 +09:00
Masaki Muranaka 3ab1afa07d Remove API mrb_str_catf(). 2013-01-29 17:21:50 +09:00
skandhas 15c96cf8b5 remove mrb_str_each_line form src/string.c 2013-01-11 15:38:55 +08:00
Masamitsu MURASE 72ae2150c7 Modify String#bytes.
It should return non-negative integer.
2012-12-19 23:54:00 +09:00
Masamitsu MURASE a7182c20eb Fix memory leak in String#to_i and String#to_f. 2012-12-10 02:29:38 +09:00
Yukihiro Matz Matsumoto 1d3f4b3ff7 Fix typos: invalide -> invalid; patch from @darashi; close #577 2012-12-01 12:10:29 +09:00
Yukihiro Matz Matsumoto 7cea9d7b94 int and mrb_int should not be mixed under -DMRB_INT64; may fix #557 2012-11-17 02:16:35 +09:00
Akira Yumiyama d090f3eedb adjust string length after String#chomp! 2012-11-08 15:13:23 +09:00
Yukihiro Matz Matsumoto c903910c6b replace RBASIC by mrb_basic 2012-11-04 13:56:08 +09:00
Yukihiro Matz Matsumoto d2d2e9f5f9 add new predicates mrb_string_p(),mrb_array_p(),mrb_hash_p() 2012-11-04 05:02:39 +09:00
Yukihiro Matsumoto fe36bdb7f1 add String#bytes to return bytes in a string 2012-11-01 06:12:11 +09:00
Masaki Muranaka 6069a33089 mrb_raisef(): new function. Same as previou version of mrb_raise().
mrb_raise(): API modified. It cannot treat variable arguments.
2012-10-23 09:42:22 +09:00
Masaki Muranaka dd10048094 Remove redundant sizeof(char). "Always sizeof(char) == 1" is described in ISO C specs. 2012-10-22 11:21:04 +09:00
Yukihiro Matsumoto f0f113ef0e should define String#+ (non inlined); close #469 2012-09-13 22:28:04 +09:00
Tomoyuki Sahara 32b88c72af two more wrapper macros for ctype.h
we need them on the platform where 'char' is signed.
2012-09-12 14:02:58 +09:00
emboss a24fde1889 Define DBL_DIG only if it wasn't previously defined
DBL_DIG may already be defined on the target system,
defining it without checking first may overwrite
system values.
2012-09-11 03:02:28 +02:00
Yukihiro Matsumoto e5dde46c7c reduce mrb_funcall invocations 2012-08-18 19:29:07 +09:00
Yukihiro Matsumoto 1ed39d5c05 use TRUE/FALSE instead of 1/0 2012-08-13 04:19:24 +09:00
Yukihiro "Matz" Matsumoto ff707384c3 Merge pull request #407 from silverhammermba/cpp
C++ compatibility
2012-07-29 17:42:17 -07:00
Yukihiro Matsumoto bd035bcbb6 do not use INT32_MAX; close #407 2012-07-30 09:40:41 +09:00
Max Anselm 5a4beeed2d Make all(?) void casts explicit for C++ 2012-07-29 19:48:48 -04:00
Masaki Muranaka b2fc62f3a9 Remove commented out code. 2012-07-29 15:25:14 +09:00
Junji Sawada 96366117ea Remove unnecessary header inclusion 2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto 48c73ac630 less <stdio.h> 2012-07-13 10:13:47 +09:00
Yukihiro Matsumoto ae2cd24afb remove st.h inclusion 2012-07-13 00:24:44 +09:00
Yukihiro Matsumoto 4406a08d58 remove debug printf; close #345 2012-07-06 19:46:27 +09:00
Masamitsu MURASE 866f797125 Fix str_replace in string.c
- Increment refcnt of shared string.
 - Free buffer before replacing.
 - Clear MRB_STR_SHARED after decref is called.
 - Fix target of aux.capa.
2012-06-30 21:42:10 +09:00
Yukihiro Matsumoto 0a88499f32 sizeof("a") is bigger by one than strlen("a") 2012-06-27 15:19:40 +09:00
Yukihiro Matsumoto 6f9ed1c5b2 use return value from sprintf/snprintf 2012-06-27 15:14:56 +09:00
Masamitsu MURASE c152c194a1 Prevent memory leak when string literal is created. 2012-06-26 01:34:41 +09:00
Yukihiro Matsumoto f045e64675 reduce calling mrb_str_new_cstr() to avoid strlen(); #301 2012-06-23 13:51:50 +09:00
Yukihiro Matsumoto 2d781f5c1d remove assertion for false assumption; mrb_str_new(0, len) where len > 0 can be used to allocate an unintialized string 2012-06-23 09:49:14 +09:00
Masaki Muranaka 21f2e5364b Use mrb_str_new() instead of mrb_str_new2() as possible. 2012-06-22 17:02:08 +09:00
Yukihiro Matsumoto a70c4e0c79 reduce calling of strlen(); #301 2012-06-21 16:22:29 +09:00
Yukihiro Matsumoto ef50e63a63 remove RuntimeError from mrb_state 2012-06-20 20:43:27 +09:00
Masaki Muranaka 2c93fab066 Remove TRUE/FALSE definition in C sources. (Reported by #282 but not applied.) 2012-06-15 16:55:49 +09:00
Yukihiro Matsumoto 76f7aecff3 use ENABLE/DISABLE instead of INCLUDE for configuration macro names 2012-06-15 15:34:49 +09:00