mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge branch 'master' of github.com:mruby/mruby
This commit is contained in:
@@ -64,6 +64,15 @@ Toolchain configuration for Visual Studio 2012 on Windows.
|
||||
|
||||
toolchain :vs2012
|
||||
|
||||
#### Android
|
||||
|
||||
Toolchain configuration for Android.
|
||||
|
||||
toolchain :androideabi
|
||||
|
||||
Requires the custom standalone Android NDK and the toolchain path
|
||||
in ```ANDROID_STANDALONE_TOOLCHAIN```.
|
||||
|
||||
### Binaries
|
||||
|
||||
It is possible to select which tools should be compiled during the compilation
|
||||
|
||||
+1
-1
@@ -3000,7 +3000,7 @@ yywarn(parser_state *p, const char *s)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (p->nerr < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
|
||||
else if (p->nwarn < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
|
||||
n = strlen(s);
|
||||
c = (char *)parser_palloc(p, n + 1);
|
||||
memcpy(c, s, n + 1);
|
||||
|
||||
@@ -1160,7 +1160,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
L_RAISE:
|
||||
ci = mrb->ci;
|
||||
mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern(mrb, "lastpc"), mrb_voidp_value(pc));
|
||||
mrb_obj_iv_set(mrb, mrb->exc, mrb_intern(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->cibase));
|
||||
mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->cibase));
|
||||
eidx = ci->eidx;
|
||||
if (ci == mrb->cibase) {
|
||||
if (ci->ridx == 0) goto L_STOP;
|
||||
|
||||
@@ -68,7 +68,11 @@ module MRuby
|
||||
def define_rules(build_dir, source_dir='')
|
||||
@out_ext = build.exts.object
|
||||
|
||||
generated_file_matcher = Regexp.new("^#{build_dir}/(.*)#{Regexp.escape out_ext}$")
|
||||
if build_dir.include? "mrbgems/"
|
||||
generated_file_matcher = Regexp.new("^#{build_dir}/(.*)#{Regexp.escape out_ext}$")
|
||||
else
|
||||
generated_file_matcher = Regexp.new("^#{build_dir}/(?!mrbgems/.+/)(.*)#{Regexp.escape out_ext}$")
|
||||
end
|
||||
source_exts.each do |ext, compile|
|
||||
rule generated_file_matcher => [
|
||||
proc { |file|
|
||||
|
||||
@@ -5,7 +5,9 @@ module MRuby
|
||||
gemrake = File.join(gemdir, "mrbgem.rake")
|
||||
|
||||
fail "Can't find #{gemrake}" unless File.exists?(gemrake)
|
||||
Gem.current = nil
|
||||
load gemrake
|
||||
return nil unless Gem.current
|
||||
|
||||
Gem.current.dir = gemdir
|
||||
Gem.current.build = MRuby::Build.current
|
||||
|
||||
@@ -23,6 +23,7 @@ end
|
||||
# which will be tested by this
|
||||
# assertion
|
||||
def assert(str = 'Assertion failed', iso = '')
|
||||
print(str, (iso != '' ? " [#{iso}]" : ''), ' : ') if $mrbtest_verbose
|
||||
begin
|
||||
if(!yield)
|
||||
$asserts.push(assertion_string('Fail: ', str, iso))
|
||||
@@ -37,6 +38,7 @@ def assert(str = 'Assertion failed', iso = '')
|
||||
$kill_test += 1
|
||||
print('X')
|
||||
end
|
||||
print("\n") if $mrbtest_verbose
|
||||
end
|
||||
|
||||
##
|
||||
|
||||
+6
-1
@@ -36,7 +36,7 @@ check_error(mrb_state *mrb)
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
mrb_state *mrb;
|
||||
mrb_value return_value;
|
||||
@@ -52,6 +52,11 @@ main(void)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) {
|
||||
printf("verbose mode: enable\n\n");
|
||||
mrb_gv_set(mrb, mrb_intern(mrb, "$mrbtest_verbose"), mrb_true_value());
|
||||
}
|
||||
|
||||
mrb_init_mrbtest(mrb);
|
||||
/* evaluate the test */
|
||||
return_value = mrb_load_string(mrb, prog);
|
||||
|
||||
Reference in New Issue
Block a user