From: Elijah Conners Date: Tue, 13 Sep 2022 17:34:02 GMT Subject: Re: [PATCH] reftable: pass pq_entry by address Message-ID: <18337ea407a.10c144c52599576.4708941661785569426@elijahpepe.com> In-Reply-To: Junio C Hamano writes: > Do we have any hard guidance like "do not pass an data item whose > size is larger than 64 bytes" in our coding guidelines? If not, > make sure that the reference to 64 bytes does not look like one. While we don't have hard guidance like that, putting an object that exceeds 64 bytes on the stack is dangerous. > In any case, wouldn't it make sense to make the "we pass reference > not because we want to let the callee modify the value, but because > the callee deep in the callchain wants to copy the contents out of > it" parameter a pointer to a constant? Yes. I overlooked that making this change. Feel free to make that change, otherwise I'll do it myself.