Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/mruby-1.3.0
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-proc-ext/src/proc.c

    r321 r331  
    1 #include "mruby.h"
    2 #include "mruby/proc.h"
    3 #include "mruby/opcode.h"
    4 #include "mruby/array.h"
    5 #include "mruby/string.h"
    6 #include "mruby/debug.h"
     1#include <mruby.h>
     2#include <mruby/proc.h>
     3#include <mruby/opcode.h>
     4#include <mruby/array.h>
     5#include <mruby/string.h>
     6#include <mruby/debug.h>
    77
    88static mrb_value
     
    5353    line = mrb_debug_get_line(irep, 0);
    5454    if (line != -1) {
    55       mrb_str_append(mrb, str, mrb_fixnum_value(line));
     55      str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_value(line));
    5656    }
    5757    else {
     
    108108  const struct mrb_irep *irep = proc->body.irep;
    109109  mrb_aspec aspec;
    110   mrb_value parameters;
     110  mrb_value sname, parameters;
    111111  int i, j;
    112112
    113113  if (MRB_PROC_CFUNC_P(proc)) {
    114114    // TODO cfunc aspec is not implemented yet
     115    return mrb_ary_new(mrb);
     116  }
     117  if (!irep) {
    115118    return mrb_ary_new(mrb);
    116119  }
     
    135138
    136139  parameters = mrb_ary_new_capa(mrb, irep->nlocals-1);
     140
    137141  for (i = 0, p = parameters_list; p->name; p++) {
    138     mrb_value sname = mrb_symbol_value(mrb_intern_cstr(mrb, p->name));
     142    if (p->size <= 0) continue;
     143    sname = mrb_symbol_value(mrb_intern_cstr(mrb, p->name));
    139144    for (j = 0; j < p->size; i++, j++) {
    140       mrb_assert(i < (irep->nlocals-1));
    141       mrb_ary_push(mrb, parameters, mrb_assoc_new(mrb,
    142         sname,
    143         mrb_symbol_value(irep->lv[i].name)
    144       ));
     145      mrb_value a = mrb_ary_new(mrb);
     146      mrb_ary_push(mrb, a, sname);
     147      if (irep->lv[i].name) {
     148        mrb_ary_push(mrb, a, mrb_symbol_value(irep->lv[i].name));
     149      }
     150      mrb_ary_push(mrb, parameters, a);
    145151    }
    146152  }
Note: See TracChangeset for help on using the changeset viewer.