Commit Graph

73 Commits

Author SHA1 Message Date
Masaki Muranaka 05ad6902fd Remove API mrb_string_value(). There have mrb_str_to_str() in the core. And mrb_string_value() is no merit to keep using. 2013-03-29 18:01:25 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yukihiro "Matz" Matsumoto a6cca7c2c4 Merge branch 'pr-fix-mrb_format' of https://github.com/monaka/mruby into monaka-pr-fix-mrb_format 2013-03-28 22:46:51 +09:00
Masaki Muranaka c0b5220418 Modify mrb_name_error() to use mrb_format(). 2013-03-28 17:35:04 +09:00
Masaki Muranaka d329d1f421 Fix. In some cases, %S substitutions were failed. 2013-03-28 15:08:29 +09:00
Masaki Muranaka 9c831c9a9c Remove the escape backslash from the result string. 2013-03-28 15:07:34 +09:00
Yukihiro Matz Matsumoto 18b2683b97 use new mrb_format API from mrb_raisef; its only format specifier is "%S" (stringify) and takes mrb_value; close #1062 2013-03-27 23:41:23 +09:00
Yukihiro Matz Matsumoto 8ce842a5d9 implement mrb_format and mrb_vformat 2013-03-27 23:03:48 +09:00
crimsonwoods c2c95f09e5 remove unused functions 'mrb_strerrno' and 'mrb_bug_errno'. 2013-03-25 23:41:20 +09:00
mattn aec5ac493e Remove unused mrb_sprintf 2013-03-24 00:52:25 +09:00
Masaki Muranaka 0cedf8fa02 Rename API mrb_str_cat2() to mrb_str_cat_cstr(). This is for naming orthogonality. mrb_str_cat2() is also left for backward compatibility. 2013-03-23 16:29:30 +09:00
Masaki Muranaka 92821cf2ef Use mrb_str_cat() instead of mrb_str_cat2() as possible. 2013-03-23 15:55:55 +09:00
Masaki Muranaka f8fa56d8c3 Use mrb_intern2() instead of mrb_intern(). This is for avoiding overhead by strlen(). 2013-03-22 14:22:45 +09:00
Yukihiro Matz Matsumoto d0d920e909 rename mrb_true_or_false_value() to mrb_bool_value() 2013-03-19 12:03:54 +09:00
Masaki Muranaka 2930bc50a9 Use mrb_true_or_false_value() / in exc_equal(). 2013-03-19 11:04:20 +09:00
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