Commit Graph

70 Commits

Author SHA1 Message Date
Masaki Muranaka a9f2473377 Add null char terminate to each symbol name. 2013-03-30 13:17:29 +09:00
Masaki Muranaka 24eb120148 Add CHAR_BIT check. There are uint8_t to char conversions. 2013-03-29 16:32:15 +09:00
Masaki Muranaka 9074983b22 Reduce temporary memory allocations. They are redundant. 2013-03-29 16:28:13 +09:00
Masaki Muranaka 2b6e9ee556 Modify the type of line-number to uint16_t. Type short is not portable. And it cannot be more than UINT16_MAX because of the mrbc binary format. 2013-03-29 16:26:00 +09:00
Masaki Muranaka 8742313079 Remove RiteFile as no used. 2013-03-29 16:21:12 +09:00
Yukihiro "Matz" Matsumoto b29b421817 Merge pull request #1101 from monaka/pr-cleanup-includes
Cleanup includes
2013-03-28 19:34:15 -07:00
Masaki Muranaka 74f04849c4 Rearrange SIZE_MAX. It is supported also VC++ since its version10. And there seems SIZE_MAX is defined in stdint.h. And it possibly (depends on the version of VC++) conflicts with SIZE_MAX in limits.h. This patch is no need if I did not support VC++. 2013-03-29 11:02:35 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yuichiro MASUI 1e58b9c2bf Fixed wrong section size calculation 2013-03-29 01:35:30 +09:00
Yukihiro "Matz" Matsumoto e8d98a3854 return value from fread(3) just cannot be ignored 2013-03-28 22:42:06 +09:00
Daniel Bovensiepen e952d55ba0 Catch return values to silent compiler 2013-03-28 07:09:05 +00:00
Yuichiro MASUI f3ebb89392 Added debug infomation section into .mrb file 2013-03-27 18:21:04 +09:00
mattn 38789c4282 Remove unused variable 2013-03-27 11:58:48 +09:00
Yukihiro Matz Matsumoto 638c5a96d7 bug in fread(3) error check 2013-03-27 11:53:14 +09:00
Yukihiro Matz Matsumoto a0f6e4d58e resolve conflict from #964 2013-03-27 00:52:24 +09:00
Masaki Muranaka 3aa3b4af90 Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
Yukihiro Matz Matsumoto 243669308d obsolete mrb_object; opposite of bc870ce 2013-03-15 23:16:20 +09:00
Masaki Muranaka 5bed51e584 Don't use int. It decreases portability. Use size_t as array index and length. It avoids overflow in the extreme situations. 2013-03-09 00:35:58 +09:00
Masaki Muranaka 8a7f5360cf Sanity check. As there are implicaton SIZE_MAX >= UINT32_MAX in this code. This assumption may break on some targets which have 16bit memory space. 2013-03-09 00:30:06 +09:00
Masaki Muranaka 51de2ba1d9 Clean up code. 2013-03-09 00:24:17 +09:00
Masaki Muranaka 6ff50568e1 Store to *bin_size if bin_size != NULL. 2013-03-09 00:23:08 +09:00
Masaki Muranaka 07017a4188 Use type cast not void* but char*. Don't substiture void pointers. 2013-03-09 00:12:19 +09:00
Masaki Muranaka faa1e5670a Remove unused substitutions and calculations. 2013-03-08 23:03:40 +09:00
Masaki Muranaka 9324c2168a Don't initialize variables that store result as MRB_DUMP_OK. It possibly causes bugs on modifications in the future. 2013-03-08 22:48:32 +09:00
Yuichiro MASUI 814094230c Change unsigned char to uint8_t 2013-03-08 18:55:15 +09:00
Yuichiro MASUI 2842583678 New mrb format. The detail is in https://github.com/mruby/mruby/issues/944 2013-03-08 03:14:21 +09:00
Masaki Muranaka 6cd7017ec1 Remove trailing whitespaces. This is just a cosmetic change. 2013-03-03 10:54:00 +09:00
Masaki Muranaka 2bfb88825d Fix errors caused by stdio.h dependent code. 2013-02-23 17:05:18 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00
Yukihiro Matz Matsumoto 323d8501d6 zero initialize hex buffers; close 768 2013-01-22 00:40:04 +09:00
Masaki Muranaka 86b3200746 Fix error handlings. 2013-01-09 13:33:00 +09:00
Masaki Muranaka 81b6895885 Merge branch 'master' of github.com:mruby/mruby into pr-strict-error-checking 2013-01-09 13:29:59 +09:00
Masaki Muranaka 0b337accad Extract each expresion in "if" statements. It is for maintainability. 2013-01-09 12:19:39 +09:00
Masaki Muranaka 94fb04a51e Remove redundant null checks. 2013-01-09 11:22:39 +09:00
Yukihiro Matz Matsumoto f1ed143624 mange arena_idx smarter for smaller ARENA_SIZE; now default to 100 from 1024 2012-12-07 16:58:50 +09:00
Yukihiro Matz Matsumoto f486774352 refactor and move irep malloc away to mrb_add_irep() 2012-12-07 15:57:40 +09:00
Yukihiro Matz Matsumoto b8e5a57047 rename mrb_load_irep etc. for naming consistency 2012-12-05 02:48:29 +09:00
skandhas 922d50a694 compatible with MSVC 2012-11-07 10:28:20 +08:00
Yukihiro "Matz" Matsumoto b720156c99 Merge pull request #515 from iij/pr-fix-mrb-format
fixes *.mrb dump/load format with escaped character.
2012-10-29 23:30:59 -07:00
Masaki Muranaka 30f7a93d41 Use NULL instead of 0. (It is not a bug fix but a cosmetic change.) 2012-10-30 14:25:00 +09:00
Akira Yumiyama 94d16805a5 fixes *.mrb dump/load format with escaped character.
- hex-style string support
 - mrb format changes like:
  - "\n" (before: \n -> after: \n)
  - '\n' (before: \n -> after: \\n)
2012-10-30 08:30:18 +09:00
Yukihiro "Matz" Matsumoto c6c4da8c48 Merge pull request #510 from masuidrive/master
define convert method mrb_int/mrb_float with C string
2012-10-28 10:45:43 -07:00
Yuichiro MASUI 15f46a1feb define convert method mrb_int/mrb_float with C string 2012-10-27 14:26:50 +09:00
Masaki Muranaka 1933e2660c Use substitution instead of memset in structure initialization. 2012-10-25 15:47:45 +09:00
Masaki Muranaka e84dfd4337 Fix degrades by #490. (Some changes are reverted.) 2012-10-17 21:32:50 +09:00
Masaki Muranaka 170d5e7181 Avoid memcpy() on copying structure. 2012-10-15 13:15:29 +09:00
Yukihiro Matsumoto 9206dcb00d remove assignment to unused dst; close #424 2012-08-18 21:00:51 +09:00
Max Anselm 5a4beeed2d Make all(?) void casts explicit for C++ 2012-07-29 19:48:48 -04:00
Yukihiro Matsumoto 7496625fc3 initialize stuctures on stack without memset(); close #350 2012-07-09 11:50:48 +09:00
Masaki Muranaka 568af55187 Refactor hex_to_str(). 2012-06-26 20:41:42 +09:00