Commit Graph

13 Commits

Author SHA1 Message Date
Yukihiro Matsumoto b11d4647e9 ISO conforming lambda 2012-06-20 15:41:22 +09:00
Yukihiro Matsumoto e9231bca7a allow lambda duplication 2012-06-20 15:26:10 +09:00
Yukihiro Matsumoto 4523bee953 cast style consistency 2012-05-23 03:31:55 +09:00
Mitchell Blank Jr 9e336b00e5 More C++ compilability work: mrb_obj_alloc void* conversions
One of the biggest set of changes needed to make C++ compile, is that you
can't autoconvert "void*" to a different pointer type without a cast (you
can of course, convert pointers *to* "void*"!)

For the first part, convert the users of "mrb_obj_alloc".  Since it has
to return something, make it RBasic* (that's what mrb_obj_alloc() is
operating on anyway).  This way, even in C you'll get a warning if you
don't cast it.

For places where there are a lot of similar calls to mrb_obj_alloc(),
this can be easily hidden through a macro.  I did this in string.c:
    #define mrb_obj_alloc_string(mrb) ((struct RString *) mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))

I also updated the mrb_object() macro to also return a RBasic* -- my
previous commit changed that from "void*" -> "RObject*", but I figure
it should be consistent with mrb_obj_alloc()
2012-05-20 09:43:14 -07:00
Yukihiro Matsumoto 300f97a0d2 mrb_closure_new uses current irep's nlocals instead of blocks; a patch from @tociyuki 2012-05-04 09:19:55 +09:00
roco 4ec6d41f16 rm whitespace 2012-04-30 14:29:19 -07:00
Yukihiro "Matz" Matsumoto ef6c8cd01c Merge pull request #69 from k-tsj/fix-proc-segv
Use mrb_get_args instead of direct stack access
2012-04-28 07:44:41 -07:00
Kazuki Tsujimoto 8ce5893e1a Use mrb_get_args instead of direct stack access 2012-04-28 09:45:56 +09:00
Patrick Hogan ec27c18dae Fix a few casting warnings.
Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
2012-04-26 08:36:32 -05:00
mimaki c80487561f Merge branch 'master' of github.com:mruby/mruby
Conflicts:
	src/variable.c
2012-04-23 11:51:47 +09:00
mimaki 835443614d add file header 2012-04-23 11:46:16 +09:00
Kazuki Tsujimoto 5859a204fe Fix SEGV when calling Proc object created by Proc.new 2012-04-22 19:23:44 +09:00
mimaki e0d6430f63 add mruby sources 2012-04-20 09:39:03 +09:00