Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 3/3] Constify two local variables.



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