RAPL

Check-in [d367592391]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d367592391b18e86d71d2ee92ef1a2a81a6ced98
User & Date: arnulf 2012-04-13 07:28:33
Context
2012-04-13
20:55
fixes and removed unused or duplicate code Leaf check-in: 3015a81095 user: arnulf tags: trunk
07:28
fixes check-in: d367592391 user: arnulf tags: trunk
2012-04-07
15:58
fix for setFromAny check-in: 7770b50f1e user: arnulf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rapl_pkg_corecmd.js.

1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
        complain = 0;
        i++;
        continue;
      }
      break;
    }
    while (i < args.length) {
      if (interp.variable_obj_type.unsetVariable(args[i], complain ? interp.FUNCTION_FLGAS_LEAVE_ERRMSG : interp.FUNCTION_FLAGS_NONE) != interp.OK && complain) {
        return interp.ERROR;
      }
      i++;
    }
    return interp.OK;
  });








|







1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
        complain = 0;
        i++;
        continue;
      }
      break;
    }
    while (i < args.length) {
      if (interp.variable_obj_type.unsetVariable(args[i], complain ? interp.FUNCTION_FLAGS_LEAVE_ERR_MSG : interp.FUNCTION_FLAGS_NONE) != interp.OK && complain) {
        return interp.ERROR;
      }
      i++;
    }
    return interp.OK;
  });

Changes to rapl_variable_obj_type.js.

231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
  setVariableStr: function(name, obj_ptr) {
    var varbl = this;
    var intp = varbl.interp;
    var obj = intp.default_obj;
    var name_obj_ptr;
    var result;

    name_obj_ptr = intp.var_obj_type.newStringObj(name, -1, "VARIABLE_OBJ_TYPE_2");
    name_obj_ptr.incrRefCount("I_VARIABLE_OBJ_TYPE_4");
    result = varbl.setVariable(name_obj_ptr, obj_ptr);
    name_obj_ptr.decrRefCount("D_VARIABLE_OBJ_TYPE_3");
    return result;
  },

  /* ==================== setGlobalVariableStr ================================== */







|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
  setVariableStr: function(name, obj_ptr) {
    var varbl = this;
    var intp = varbl.interp;
    var obj = intp.default_obj;
    var name_obj_ptr;
    var result;

    name_obj_ptr = intp.string_obj_type.newStringObj(name, -1, "VARIABLE_OBJ_TYPE_2");
    name_obj_ptr.incrRefCount("I_VARIABLE_OBJ_TYPE_4");
    result = varbl.setVariable(name_obj_ptr, obj_ptr);
    name_obj_ptr.decrRefCount("D_VARIABLE_OBJ_TYPE_3");
    return result;
  },

  /* ==================== setGlobalVariableStr ================================== */

Changes to simple_tests/t14.test.

1
2
3
4
5
6
7
8
9
10
11
12
..
21
22
23
24
25
26
27
28
29
30
31
32
33
tcltest::test simple-14.0 "t14.tcl" -body {
set ::result [list]
namespace ensemble create -map [list create ::mtcl::dict::create keys ::mtcl::dict::keys] -command ::mdict

namespace eval ::mtcl::dict {

proc keys {dict_value args} {
  if {[llength $args] > 1} {
    return -code error "only one pattern allowed"
  }
  set keys [list]
  foreach entry $dict_value {
................................................................................
    lappend my_dict [list $key $value]
  }
  return $my_dict
}

}

set xx [mdict create k1 v1 k2 v2 k3 v3 k4 v4]
lappend ::result "XX!$xx!"
set yy [mdict keys $xx]
lappend ::result "YY!$yy!"
return $::result
} -result {{XX!{k1 v1} {k2 v2} {k3 v3} {k4 v4}!} {YY!k1 k2 k3 k4!}}


|

|







 







|

|



1
2
3
4
5
6
7
8
9
10
11
12
..
21
22
23
24
25
26
27
28
29
30
31
32
33
tcltest::test simple-14.0 "t14.tcl" -body {
set ::result [list]
namespace ensemble create -map [list create ::mtcl::dict2::create keys ::mtcl::dict2::keys] -command ::mdict2

namespace eval ::mtcl::dict2 {

proc keys {dict_value args} {
  if {[llength $args] > 1} {
    return -code error "only one pattern allowed"
  }
  set keys [list]
  foreach entry $dict_value {
................................................................................
    lappend my_dict [list $key $value]
  }
  return $my_dict
}

}

set xx [mdict2 create k1 v1 k2 v2 k3 v3 k4 v4]
lappend ::result "XX!$xx!"
set yy [mdict2 keys $xx]
lappend ::result "YY!$yy!"
return $::result
} -result {{XX!{k1 v1} {k2 v2} {k3 v3} {k4 v4}!} {YY!k1 k2 k3 k4!}}