Masaki Muranaka
3aa3b4af90
Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
...
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
Yukihiro Matz Matsumoto
243669308d
obsolete mrb_object; opposite of bc870ce
2013-03-15 23:16:20 +09:00
Tomoyuki Sahara
c0b844033f
mrb_str_new2 -> mrb_str_new_cstr
2013-03-13 10:29:17 +09:00
Tomoyuki Sahara
00cf5e32a2
Merge branch 'master' into pr-systemcallerror
2013-03-13 10:22:59 +09:00
Tomoyuki Sahara
7103e03274
mrb_sys_fail raises SystemCallError if we have it.
2013-03-13 09:55:06 +09:00
Masaki Muranaka
be506de3fc
Remove mrb_str_new2(). Use mrb_str_new_cstr() instead.
...
Make mrb_str_new_cstr() accept NULL pointer. It generates 0byte strings by NULL pointer.
2013-03-12 17:54:40 +09:00
Masaki Muranaka
0e662e3bcd
Make some printf enclose in #ifdef ENABLE_STDIO.
2013-03-05 01:43:57 +09:00
Masaki Muranaka
6ae3a1b83e
Modify API configuration.
...
C API mrb_p() is always callable.
- But it will do nothing when ENABLE_STDIO is not defined.
Kernel#__printstr__ is always callable.
- But it will do nothing when ENABLE_STDIO is not defined.
2013-03-05 01:38:51 +09:00
Masaki Muranaka
5a025813b5
Include stdio.h in mrbconf.h instead of C extension sources.
2013-03-05 01:38:51 +09:00
Yukihiro "Matz" Matsumoto
afa5b26826
Merge pull request #931 from matsumoto-r/fix_some_indents
...
Adjust some indents
2013-03-03 04:32:37 -08:00
Masaki Muranaka
6cd7017ec1
Remove trailing whitespaces. This is just a cosmetic change.
2013-03-03 10:54:00 +09:00
MATSUMOTO Ryosuke
809732ab40
Adjust some indents
2013-03-02 10:26:54 -08:00
Yukihiro Matz Matsumoto
ffd7aeeb68
print the error message before abort()
2013-02-21 15:59:50 +09:00
Masaki Muranaka
d2386eb9b0
Remove unused define and commented out code.
2013-01-30 11:37:56 +09:00
Masamitsu MURASE
b4255c70a1
Remove multiple definition of RuntimeError.
2013-01-14 18:26:39 +09:00
Tomoyuki Sahara
80ed166e9f
show all callinfo's.
2012-11-02 10:33:23 +09:00
Masaki Muranaka
6069a33089
mrb_raisef(): new function. Same as previou version of mrb_raise().
...
mrb_raise(): API modified. It cannot treat variable arguments.
2012-10-23 09:42:22 +09:00
Yukihiro Matsumoto
2830624410
fix indent of mrb_exc_raise
2012-10-04 14:20:33 +09:00
Tomoyuki Sahara
7a7f267b88
check if an Exception instance has a "mesg" attribute
...
fix the issue that "Exception.new.inspect" causes SIGSEGV.
2012-09-12 20:08:56 +09:00
Yukihiro Matsumoto
9e7ca5d944
mrb might be intialized incompletely from mrbc; close #457
2012-09-09 13:14:32 +09:00
Yukihiro Matsumoto
4e8317f5df
do no generate lineno info if no filename is specified
2012-09-03 15:33:35 +09:00
Yukihiro Matsumoto
ba0154c671
should print file:line when exception is raised within mrblib
2012-09-03 01:26:12 +09:00
Yukihiro Matsumoto
f114916610
source position added to exception representation
2012-08-31 15:58:33 +09:00
Yukihiro Matsumoto
d1f2841660
abort() if mrb->jmp is empty
2012-08-22 11:17:37 +09:00
Yukihiro Matsumoto
e5dde46c7c
reduce mrb_funcall invocations
2012-08-18 19:29:07 +09:00
Yukihiro Matsumoto
c9fe903fe1
now segmented list can be used as instance variable tables by -DMRB_USE_IV_SEGLIST; we still need to measure the performance and memory consumption
2012-08-12 01:59:18 +09:00
Yukihiro Matsumoto
d271bf0aa6
make mrb_funcall_argv and mrb_funcall_with_block to take mrb_sym as a method name
2012-08-01 13:15:02 +09:00
Masaki Muranaka
b2fc62f3a9
Remove commented out code.
2012-07-29 15:25:14 +09:00
Junji Sawada
96366117ea
Remove unnecessary header inclusion
2012-07-14 11:39:25 +09:00
Masaki Muranaka
d534f26f16
Use sizeof to get char array sizes.
2012-06-27 10:36:39 +09:00
Yukihiro Matsumoto
ef50e63a63
remove RuntimeError from mrb_state
2012-06-20 20:43:27 +09:00
Yukihiro Matsumoto
8f9b958f1e
raise should initialize Exception object
2012-06-19 12:54:49 +09:00
Yukihiro Matsumoto
955a48d964
move exception definiton to mrblib
2012-06-18 10:30:17 +09:00
Yukihiro Matsumoto
742c4fb86f
ignore id to create NameError
2012-06-18 09:06:13 +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
cfd5f5157d
Move Subclasses of ScriptError to mrblib.
2012-06-15 13:06:43 +09:00
Masaki Muranaka
ccec3da35b
Use return value of vsnprintf() for the string length. It is redundant using strlen().
2012-06-15 12:27:44 +09:00
Masaki Muranaka
9983e1d773
Remove unused funcions.
2012-06-15 12:26:17 +09:00
Masaki Muranaka
56103509c8
Remove as NotImplemenetedError is defined in mrblib/.
2012-06-15 02:36:51 +09:00
Masaki Muranaka
f564ec7e82
Remove some redundant code.
2012-06-15 00:56:00 +09:00
Yukihiro Matsumoto
b775bc771e
remove unused variable
2012-06-14 01:19:45 +09:00
Yukihiro Matsumoto
df7be84dba
add newline between functions
2012-06-14 01:18:07 +09:00
Yukihiro Matsumoto
6bdd257c42
inspect format for exception has changed
2012-06-14 01:17:44 +09:00
Yukihiro Matsumoto
fae483ff2a
the argument for Exception.new is optinal
2012-05-31 11:15:51 +09:00
Yukihiro Matsumoto
d9227aa41d
remove ZeroDivisionError since mruby gives float for integer division
2012-05-24 21:10:23 +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
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
b68e69aa32
remove unused assignments
2012-05-17 12:57:08 +09:00
Masaki Muranaka
3407376936
Remove unused static functions.
2012-05-16 16:06:12 +09:00