Commit Graph

66 Commits

Author SHA1 Message Date
Max Anselm ea25912999 Undefine new for class rather than instance.
Applies to NilClass, TrueClass, FalseClass, Fixnum, and Float. Add
mrb_undef_class_method for DRYness.
2012-07-25 18:22:26 -04:00
Yukihiro Matsumoto 88b638cf82 instance_eval should set target_class in the block 2012-07-24 23:16:41 +09:00
Yukihiro Matsumoto 8ae67d10b3 make MRB_ARENA_SIZE to be configurable 2012-07-19 11:28:06 +09:00
Yukihiro Matsumoto 36664174cb change return type of mrb_p() to void 2012-07-17 23:48:55 +09:00
Yukihiro Matsumoto 234b8e853c make class_from_sym static 2012-07-15 16:37:23 +09:00
Yukihiro Matsumoto e380692224 mrb_load_xxx to return undef + mrb_undef_p 2012-07-14 07:38:43 +09:00
Yukihiro Matsumoto 0e2a81740a we don't need xmalloc; close #356 2012-07-09 11:42:15 +09:00
Yukihiro Matsumoto 8268ba2755 remove MRB_TT_THREAD,MRB_TT_THREADGRP 2012-07-06 19:52:50 +09:00
Yukihiro Matsumoto ff42f8f485 move RDoc comments 2012-07-05 22:56:51 +09:00
Yukihiro Matsumoto ef50e63a63 remove RuntimeError from mrb_state 2012-06-20 20:43:27 +09:00
Yukihiro Matsumoto 9e78fea7b3 remove unreference Error class macros 2012-06-15 14:04:25 +09:00
Yukihiro Matsumoto 195d1dd685 do not use fixed sized buffer in mrb_bug/mrb_warn; close #287 2012-06-15 14:03:02 +09:00
Masaki Muranaka 3fb9408669 Fix redundant declraration warnings by gcc. 2012-06-14 18:28:05 +09:00
Yuichiro MASUI 5046375d51 add auxiliary data pointer to mrb_state 2012-06-08 00:59:26 +09:00
Yukihiro Matsumoto b7cc7fffe7 symbol can contain non printable characters 2012-06-05 08:34:09 +09:00
Yukihiro Matsumoto 4e46abb869 remove unused mrb_exec_recursive 2012-06-03 17:52:04 +09:00
Frank Celler c3e0aedece export exception handling 2012-06-02 12:09:43 +02:00
Frank Celler aeffe3f712 fixed prototype: g++ will complain about definition not being a prototype, should work with GCC and VC as well 2012-06-02 11:54:14 +02:00
Yukihiro Matsumoto bf20cc800e remove unused prototypes from mruby.h 2012-06-01 06:47:09 +09:00
Yukihiro Matsumoto aafd787e58 remove mrb_rs from mruby.h 2012-06-01 02:53:50 +09:00
Yukihiro Matsumoto 617ea34d97 remove CONST_ID from mruby.h 2012-06-01 02:53:15 +09:00
Yukihiro Matsumoto 9e826933b5 remove IO related prototypes from mruby.h 2012-06-01 02:51:48 +09:00
Yukihiro Matsumoto 2efc7dba42 remove ruby_setjmp from mruby.h 2012-06-01 02:50:59 +09:00
Yukihiro Matsumoto 034ef8696f remove KASH from mruby.h 2012-06-01 02:50:07 +09:00
Yukihiro Matsumoto f3fce2ff03 remove REALLOC_N 2012-06-01 02:49:04 +09:00
Yukihiro Matsumoto 1f704552cc move respond_to and instance_of prototypes to mruby.h 2012-06-01 02:48:19 +09:00
Yukihiro Matsumoto 69ed2d2c3c add prototype for mrb_garbage_collect() 2012-06-01 02:43:39 +09:00
Yukihiro Matsumoto 1add4558a6 add prototype for mrb_garbage_collect() 2012-06-01 02:43:29 +09:00
Yukihiro Matsumoto 29f4bf0109 remove unused event related declarations 2012-06-01 02:43:06 +09:00
Yukihiro Matsumoto e36285769a new API mrb_gc_protect() to add object to arena 2012-06-01 02:40:52 +09:00
Yukihiro Matsumoto ae9d9a0781 correctly share string bodies 2012-05-31 22:49:38 +09:00
Yukihiro Matsumoto 3e8d330c2c remove #new from immediate classes 2012-05-31 11:11:55 +09:00
Yukihiro Matsumoto ad9e841c53 made mrb_get_args() better (optinal args, type checks); close #173 #176 2012-05-24 01:09:36 +09:00
Yukihiro Matsumoto abacbf6672 always use value.i for MRB_TT_FALSE 2012-05-22 10:24:37 +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
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