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
Mitchell Blank Jr
4105b59568
C++ compilability -- make mrb_object() macro return an RObject, not void
2012-05-19 22:18:34 -07:00
Yukihiro Matsumoto
aeca23166b
remove dependency to node.h and pool.h
2012-05-19 15:52:47 +09:00
Yukihiro Matsumoto
a4d3579e31
add extern "C" guards; close #126
2012-05-18 02:02:49 +09:00
Yukihiro Matsumoto
2541530239
add mrb_define_singleton_method/mrb_define_module_function
2012-05-17 02:44:41 +09:00
Yukihiro Matsumoto
a3a9d136aa
remove "comparison is always true" warning
2012-05-15 18:59:25 +09:00
Yukihiro Matsumoto
3483e360ed
remove unused #include
2012-05-11 10:26:50 +09:00
Yukihiro Matsumoto
affb5cb7c2
remove encode_class and converter_class from mrb_state
2012-05-10 23:16:28 +09:00
Yukihiro Matsumoto
4e40121f71
remove regex_class and match_class from mrb_state
2012-05-10 23:11:20 +09:00
Yukihiro Matsumoto
4d3ed8c4f9
remove mrb->range_class
2012-05-10 23:07:54 +09:00
Yuichiro MASUI
11b6366e48
add const to char*
2012-05-06 20:04:33 +09:00
Yukihiro Matsumoto
b0e94d8c14
Time class available; based on code from @beoran; sorry for jumbo patch
2012-05-06 00:52:22 +09:00
Yukihiro Matsumoto
e0460c1157
hash refactored
2012-05-05 08:55:58 +09:00
Yukihiro Matsumoto
c9a51c43bc
use int8_t for tt
2012-05-05 07:59:15 +09:00
Yukihiro Matsumoto
e806f55e69
move mrb_str_new prototype to mruby.h
2012-05-04 22:39:21 +09:00
roco
4ec6d41f16
rm whitespace
2012-04-30 14:29:19 -07:00
Yukihiro Matsumoto
fc66d308a1
remove bit field from mrb_value
2012-04-30 00:27:02 +09:00
Yukihiro Matsumoto
3725fe657d
return value of mrb_obj_is_kind_of() should be int (used as boolean); fix #71
2012-04-30 00:06:01 +09:00
Yukihiro Matsumoto
86946043c3
disclose mrb_top_self() and use it in mruby.c
2012-04-25 11:50:03 +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
748d762e85
object instance variable do not use st.c
2012-04-21 12:42:43 +09:00
Yukihiro "Matz" Matsumoto
36be1d6270
Merge pull request #18 from pbhogan/master
...
#undef DEBUG for compatibility with environments that define DEBUG (like Xcode)
2012-04-20 07:55:36 -07:00
Yukihiro "Matz" Matsumoto
90ef60d96c
Merge pull request #19 from ranmocy/master
...
fixed statement alignment
2012-04-20 07:54:02 -07:00
Ranmocy
9e32b5152e
fixed statement alignment
2012-04-20 22:39:46 +08:00
Patrick Hogan
4cb86f87a1
#undef DEBUG for compatibility with environments that define DEBUG (like Xcode)
...
Signed-off-by: Patrick Hogan <pbhogan@gmail.com >
2012-04-20 09:32:35 -05:00
Yukihiro Matsumoto
59a85eef46
Merge branch 'master' of github.com:mruby/mruby
2012-04-20 22:34:21 +09:00
Yukihiro Matsumoto
41bf311cd1
remove dependency to SIZEOF_INT
2012-04-20 22:31:58 +09:00
Frank Celler
3d034f52dd
assign will break under C++ even when included with extern C
2012-04-20 15:10:46 +02:00
mimaki
43683ec878
add file header in mruby.h
2012-04-20 17:03:43 +09:00
NAKAMURA Usaku
ff47338973
In mruby.h, there is no definitions of RSTRING_* here, so cannot compile if the compiler is not GCC.
2012-04-20 15:34:41 +09:00
mimaki
e0d6430f63
add mruby sources
2012-04-20 09:39:03 +09:00