~ubuntu-branches/ubuntu/wily/mruby/wily

« back to all changes in this revision

Viewing changes to src/etc.c

  • Committer: Package Import Robot
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2015-08-17 19:53:07 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20150817195307-cr9lv1n8vd19wl7a
Tags: 1.1.0+20150817+gita1731254-1
* Snapshot, taken from the master (20150817).
* Add patches/change_optimize_O2.patch. (Closes: #795367)
* Add patches/add_fpic_amd64.patch. (Closes: #795407)

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
MRB_API mrb_sym
68
68
mrb_obj_to_sym(mrb_state *mrb, mrb_value name)
69
69
{
70
 
  mrb_value tmp;
71
70
  mrb_sym id;
72
71
 
73
72
  switch (mrb_type(name)) {
74
73
    default:
75
 
      tmp = mrb_check_string_type(mrb, name);
76
 
      if (mrb_nil_p(tmp)) {
77
 
        tmp = mrb_inspect(mrb, name);
78
 
        mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a symbol", tmp);
 
74
      name = mrb_check_string_type(mrb, name);
 
75
      if (mrb_nil_p(name)) {
 
76
        name = mrb_inspect(mrb, name);
 
77
        mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a symbol", name);
79
78
      }
80
 
      name = tmp;
81
79
      /* fall through */
82
80
    case MRB_TT_STRING:
83
81
      name = mrb_str_intern(mrb, name);