Home | History | Annotate | Download | only in dc

Lines Matching defs:copy

7  * Permission to use, copy, modify, and distribute this software for any
72 /* Copy number or string content into already allocated target */
74 stack_dup_value(const struct value *a, struct value *copy)
76 copy->type = a->type;
82 copy->u.num = dup_number(a->u.num);
85 copy->u.string = strdup(a->u.string);
86 if (copy->u.string == NULL)
91 copy->array = a->array == NULL ? NULL : array_dup(a->array);
93 return copy;
106 struct value copy;
113 stack_push(stack, stack_dup_value(value, &copy));
119 struct value copy;
125 copy = stack->stack[stack->sp];
127 stack->stack[stack->sp-1] = copy;