Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 3/3] Constify two local variables.
- X-seq: zsh-workers 37276
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH 3/3] Constify two local variables.
- Date: Tue, 1 Dec 2015 17:11:21 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=18KFNUOh3wXQ3YRsll1tzIRazR9QKtz9qOfxAVXSO+A=; b=vjChdxKLFyvLEe+r421A1BG+oynRSaM+fQeFvxwYowjnRv0zuTtIK2xCP4d4B9gKuQ jiPfVX7rIF+5aK0VrsrgBqlHlA2YYYBuvuLXzi4Na3oA3Alyf1zU7JpcqBxDeNedZKKt UTpea6wnPvif3K5MwYMEf+cIrIi3D05kxHSgMCqoivL2yKJGApezmr5+lJXb9xpzAxwh jL1RP89Uv7c3hqFehgKKgcl7vyNmHrNfmmNVI8Zp4hnnBvdKeOhrhVGGgWgR5nGy1+CH b2RTropiV7A/FPaWZSuUmcSn6f8XeYkuvIdg+24xp4HSjyt7+7/7/uQiokuBuOO20Ep2 4uDw==
- In-reply-to: <20151202003654.GE2462@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20151202003654.GE2462@tarsus.local2>
On Dec 2, 12:36am, Daniel Shahaf wrote:
} Subject: Re: [PATCH 3/3] Constify two local variables.
}
} #define N (sizeof(void*) * arrlen(vals))
} vals = getfn()
} munge_in_place(vals)
} dummy = zalloc(N)
} memcpy(dummy, vals, N)
} setfn(dummy)
Would that memcpy() really work, or would it need to be zarrdup() to copy
each of the elements as well? Because e.g. arrsetfn() does freearray().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author