Commit Graph

609 Commits

Author SHA1 Message Date
cremno cbc84ba5b2 error.h: add extern "C" for C++ 2014-03-05 19:50:13 +01:00
cubicdaiya dd4ddcae38 fix a comment end of include guard 2014-03-04 20:35:11 +09:00
cubicdaiya a514e31f6b introduce mrb_exc_new_str_lit for C string literals 2014-03-04 02:45:13 +09:00
Tatsuya Matsumoto 71319ac335 fix include guard style. 2014-03-03 00:46:39 +09:00
take_cheeze 23ef20624c fix compile error 2014-03-01 20:05:29 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
Yukihiro "Matz" Matsumoto 675fd3dc80 allow send method not to call mrb_funcall if calling method is implemented in Ruby; fix #1680 ref #1765 2014-03-01 18:13:10 +09:00
Yukihiro "Matz" Matsumoto 7074a55913 revert changes to mrbconf.h 2014-03-01 10:53:38 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto 2c7204fc93 mrb_fiber_yield() is available now; you have to link mruby-fiber mrbgem to use the function; there's no function available to create new fiber from C (countapart of Lua's lua_newthread), but that's because you cannot create a new fiber from C due to mruby C API design limitation. define your method to create fibers in Ruby; close #1269 2014-03-01 00:48:08 +09:00
Yukihiro "Matz" Matsumoto 5b8229715d revert 38e9ce21 and API changed; mrb_get_backtrace() -> renamed to mrb_exc_backtrace since this is a backtrace method implementation of Exception; mrb_get_backtrace_at() -> removed; mrb_get_backtrace() -> added to get backtrace in array (like caller) 2014-02-27 04:34:30 +09:00
Yukihiro "Matz" Matsumoto 38e9ce21f8 add new function mrb_get_backtrace_at() to get backtrace at ci and pc 2014-02-27 03:45:52 +09:00
Yukihiro "Matz" Matsumoto c93f873ac0 Merge pull request #1744 from cubicdaiya/feature/introduce_mrb_str_cat_lit
Introduce mrb_str_cat_lit
2014-02-26 21:54:05 +09:00
cubicdaiya 6b3801c30d introduce mrb_str_cat_lit() to create strings from C string litrals 2014-02-26 03:03:00 +09:00
Yukihiro "Matz" Matsumoto 7952e7af3c Merge pull request #1740 from tmash06/fix_missing_spaces
fix missing spaces.
2014-02-26 01:54:27 +09:00
Yukihiro "Matz" Matsumoto d747ea72c4 resolve conflict 2014-02-26 00:06:58 +09:00
Tatsuya Matsumoto fd903c1f38 fix missing spaces. 2014-02-26 00:06:23 +09:00
take_cheeze faad3e2ecd add MRB_ prefix to STRINGIZE macro 2014-02-24 23:13:21 +09:00
take_cheeze 08ea324593 move src/error.h to include/mruby/error.h 2014-02-20 22:41:29 +09:00
cremno 61577e8d6b mrb_flo_to_str: internal linkage 2014-02-18 04:37:35 +01:00
Paolo Bosetti 0b603baa53 Added spaces in version.h macros for complying with C++11 2014-02-17 17:54:49 +01:00
cremno 1838099e00 more mrb_flo_to_str fixes
- remove float check (take mrb_float instead of mrb_value)
- support -0.0
- fix range error if log10 is called when n == 0.0
- MSVC older than 2013: add signbit macro (for double)
2014-02-17 12:37:39 +01:00
Yukihiro "Matz" Matsumoto 4b981adc58 remove max_digit from mrb_flo_to_str() 2014-02-17 09:40:30 +09:00
Yukihiro "Matz" Matsumoto 69eaaa146c Merge pull request #1705 from takahashim/version-number
MRUBY_VERSION should be only numbers separated by dot, like JRUBY_VERSION or Rubinius::VERSION
2014-02-14 01:27:05 +09:00
Yukihiro "Matz" Matsumoto 9ad55617c3 Merge pull request #1703 from cremno/parenthesize-mrbdump-errnos
dump.h: parenthesize negative errnos
2014-02-14 01:26:13 +09:00
takahashim ac4443879a MRUBY_VERSION should be only numbers separated by dot, like JRUBY_VERSION or Rubinius::VERSION 2014-02-13 22:19:42 +09:00
cremno 5a76288f3f remove mrb_str_literal declaration
definition was removed in 677a2ac
2014-02-13 13:39:44 +01:00
cremno e8945b8598 dump.h: parenthesize negative errnos 2014-02-13 13:39:22 +01:00
Tomoyuki Sahara 50ef284015 include mruby/version.h in mruby.h 2014-02-12 10:26:19 +09:00
cremno 7691b64963 array implementation: several small changes
src/array.c:
 - make various functions without declaration in the mruby headers static
 - removed all uncessary int casts and two useless comments
 mrb_ary_new_from_values: move to similar functions
 mrb_check_array_type: fix indentation

include/mruby/array.h:
 mrb_shared_array: padding (default "mrbconf.h" on an usual 64-bit system)
                   sizeof(mrb_int)==sizeof(int)==4 && sizeof(mrb_value*)==8

both:
 mrb_ary_aget:  remove declaration in header and make static
                nobody uses it which is not surprising since it has 1 req arg!
 mrb_assoc_new: small optimization and move to similar functions
 mrb_ary_len:   re-implement as static inline function (it is used by mrbgems)
                programmers should directly use RARRAY_LEN instead
2014-02-12 00:37:47 +01:00
Yukihiro "Matz" Matsumoto 27dbcd0f0d add RUBY_ENGINE; ref #576 2014-02-11 15:37:03 +09:00
Yukihiro "Matz" Matsumoto ee0b7d150b Merge branch 'original2' of https://github.com/miura1729/mruby into miura1729-original2 2014-02-09 18:37:20 +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
Miura Hideki 5df82e357c Store raw stack address in callinfo instead of offset from stbas 2014-02-09 16:42:25 +09:00
Yukihiro "Matz" Matsumoto d8a5f12053 forget to add function prototypes 2014-02-08 13:56:15 +09:00
Yukihiro "Matz" Matsumoto 56b5356f6b add MRUBY_RELEASE info in numbers 2014-02-07 16:57:17 +09:00
Yukihiro "Matz" Matsumoto 95e2be6508 forgot to add new files 2014-02-07 12:24:24 +09:00
Yukihiro "Matz" Matsumoto ed1bf9aa80 introduce mrb_str_new_lit() to create strings from C string litrals 2014-02-06 07:50:34 +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 a2cfc9a9af rework mruby-objectspace and gc.[ch]
- functions should have C linkage (for C++ code)
- add prefix to each_object_callback
- use more appropriate variable types / initialization
- ObjectSpace::count_objects has 1 opt. arg.
- prefer mrb_intern_lit to mrb_intern_cstr for str. lit.
- mruby/value.h is included by mruby.h
- adjust coding style
2014-01-31 17:42:05 +01:00
Yukihiro "Matz" Matsumoto 4e2a9509dc Merge pull request #1669 from cremno/copyright-2014
update copyright year
2014-01-31 00:01:09 -08:00
Yukihiro "Matz" Matsumoto 210e7b668e Merge pull request #1668 from cremno/etc-c-cleanup
etc.c: small cleanup
2014-01-31 00:00:41 -08:00
cremno eaf445ea5c mruby.h: remove mrb_str_format declaration
The function mrb_str_format is only defined when the mrbgem mruby-sprintf was
activated. That might not always be the case (by default it currently is).
mrb_str_format still has external linkage, so from now on mrbgem authors
have to declare it in their source code if they want or need to call it.
2014-01-30 23:50:18 +01:00
cremno 3ee946dab4 Happy new year! (update copyright year)
Let's not wait until May this time
(f0a9b95af3)!
2014-01-30 23:17:24 +01:00
cremno d90f52f552 etc.c: small cleanup (delete unused functions)
mrb_data_object_alloc: unnecessary cast
mrb_lastline_get: mruby doesn't support $_, weird and unused code
mrb_exec_recursive: see 4e46abb869
mrb_block_proc: unused, doesn't really do anything (or needs to be
rewritten)
mrb_obj_to_sym: actually use id (and MSVC detected unreachable code)
2014-01-30 23:16:46 +01:00
Yukihiro "Matz" Matsumoto a68a517028 refactor parser lineno adjustment; ref #1667 2014-01-31 00:49:46 +09:00
h2so5 36e0925053 more accurate backtrace lineno 2014-01-30 10:08:04 +09:00
Yukihiro "Matz" Matsumoto e0e5aebc66 add callback invocation from OP_DEBUG 2014-01-23 15:08:38 +09: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 09bb30870b tiny word boxing optimization 2014-01-02 06:36:29 +01:00