Explorar o código

ncd: modules: value: rename value::set() to value::reset()

ambrop7 %!s(int64=13) %!d(string=hai) anos
pai
achega
5a411164dd
Modificáronse 2 ficheiros con 6 adicións e 6 borrados
  1. 4 4
      ncd/modules/value.c
  2. 2 2
      ncd/tests/value.ncd

+ 4 - 4
ncd/modules/value.c

@@ -122,7 +122,7 @@
  *   The value must be a string value.
  * 
  * Synopsis:
- *   value::set(what)
+ *   value::reset(what)
  * 
  * Description:
  *   Effectively deconstructs and reconstructs the value object. More precisely,
@@ -1372,7 +1372,7 @@ fail0:
     NCDModuleInst_Backend_Dead(i);
 }
 
-static void set_func_new (NCDModuleInst *i)
+static void reset_func_new (NCDModuleInst *i)
 {
     NCDValRef what_arg;
     if (!NCDVal_ListRead(i->args, 1, &what_arg)) {
@@ -1473,8 +1473,8 @@ static const struct NCDModule modules[] = {
         .type = "value::delete",
         .func_new = delete_func_new
     }, {
-        .type = "value::set",
-        .func_new = set_func_new
+        .type = "value::reset",
+        .func_new = reset_func_new
     }, {
         .type = "value::substr",
         .base_type = "value",

+ 2 - 2
ncd/tests/value.ncd

@@ -105,7 +105,7 @@ process main {
     assert(a);
 
     value("A") v;
-    v->set("B");
+    v->reset("B");
     val_equal(v, "B") a;
     assert(a);
 
@@ -115,7 +115,7 @@ process main {
     assert(a);
     val_equal(vb, "b") a;
     assert(a);
-    vb->set("B");
+    vb->reset("B");
     val_equal(v, {"a", "c"}) a;
     assert(a);
     val_equal(vb, "B") a;