[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Correct way to push an empty string?
- From: Sean Conner <sean@...>
- Date: Sun, 23 Aug 2015 14:47:02 -0400
It was thus said that the Great Roberto Ierusalimschy once stated:
> > Yes I followed the code through as well, but I’m not happy with
> > basing usage on what the code happens to do when the spec is silent
> > about it.
>
> Maybe it is just me, but it seems that it goes without saying (both for
> memcpy and for luaL_pushlstring and anything similar) that if you use
> zero bytes in address 'a', 'a' should be irrelevant.
So, what should malloc(0) return?
-spc (There are two schools of thought here ... )