Commit Graph

16 Commits

Author SHA1 Message Date
Yukihiro Matsumoto 6e67d83c95 should mark iv from MRB_TT_DATA 2012-05-22 18:36:52 +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 e93a17ed78 gc should handle regexp and match objects 2012-05-07 19:19:55 +09:00
Yukihiro Matsumoto 98518795b0 argument type of mrb_gc_free_ht() has changed 2012-05-07 16:59:39 +09:00
Yukihiro Matsumoto e0460c1157 hash refactored 2012-05-05 08:55:58 +09:00
roco 4ec6d41f16 rm whitespace 2012-04-30 14:29:19 -07:00
Yukihiro "Matz" Matsumoto 2b6be16308 Merge pull request #61 from pbhogan/fix-warnings
Fix various warnings
2012-04-27 08:56:39 -07:00
Yukihiro Matsumoto 32db0e5d8c struct RString member should not be mrb_value 2012-04-28 00:32:34 +09:00
Patrick Hogan 4b99def2ae Clean up switch statements.
Some formatting and add default label to silence warning about unhanded cases.

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
2012-04-26 08:36:32 -05:00
Patrick Hogan f41aae73fd Call dfree member on RData/MRB_TT_DATA when collected
Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
2012-04-24 08:39:32 -05:00
Yukihiro Matsumoto 8b367098ac move header files {irep,dump,cdump,ritehash}.h to /include/mruby 2012-04-24 17:41:28 +09: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
Yukihiro Matsumoto 356788607b should not free mrb stack; a bug found&fixed by @miura1729 2012-04-20 18:54:54 +09:00
Yukihiro Matsumoto d1144220cb move src/mdata.h to include/mruby/data.h 2012-04-20 17:18:30 +09:00
mimaki e0d6430f63 add mruby sources 2012-04-20 09:39:03 +09:00