We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 681b2f1 commit 89ee154Copy full SHA for 89ee154
1 file changed
vlib/v/gen/c/assign.v
@@ -265,6 +265,9 @@ fn (mut g Gen) assign_stmt(node_ ast.AssignStmt) {
265
g.write('${type_to_free} ${sref_name} = (') // TODO: we are copying the entire string here, optimize
266
// we can't just do `.str` since we need the extra data from the string struct
267
// doing `&string` is also not an option since the stack memory with the data will be overwritten
268
+ if left0.is_auto_deref_var() {
269
+ g.write('*')
270
+ }
271
g.expr(left0) // node.left[0])
272
if first_left_type.has_flag(.shared_f) {
273
g.write('->val')
0 commit comments