X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=blobdiff_plain;f=csrc%2Foceani.mdc;h=beb4fc9830f41e25f4fbe65e54bb4195a3abde18;hp=19c9471cec06bb1bc331f26a3e3cb4fecd1864c1;hb=bc126aadf03e4e64710f2ad7d76d1247090219d5;hpb=88d54b5afa776ae4cc7100dc30238538e509a442 diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 19c9471..beb4fc9 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -691,7 +691,7 @@ A separate function encoding these cases will simplify some code later. } } - static void _dup_value(struct type *type, + static void _dup_value(struct type *type, struct value *vold, struct value *vnew) { switch (type->vtype) { @@ -1031,7 +1031,7 @@ list of in_scope names. The storage of the value of a variable will be described later. For now we just need to know that when a variable goes out of scope, it might -need to be freed. For this we need to be able to find it, so assume that +need to be freed. For this we need to be able to find it, so assume that `var_value()` will provide that. ###### variable fields @@ -2061,7 +2061,7 @@ function will be needed. struct value *v; v = (void*) val->ptr + type->structure.fields[i].offset; if (type->structure.fields[i].init) - dup_value(type->structure.fields[i].type, + dup_value(type->structure.fields[i].type, type->structure.fields[i].init, v); else @@ -2480,7 +2480,6 @@ further detailed when Expression Lists are introduced. } } }$ - $*binode Args -> ArgsLine NEWLINE ${ $0 = $var->type, vl); for (i = 0; i < argc; i++) { struct value *vl2 = vl->array + i * v->var->type->array.member->size; - arg.str.txt = argv[i]; arg.str.len = strlen(argv[i]);