[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit-FFI suggestions
- From: Tony Finch <dot@...>
- Date: Thu, 9 Jun 2011 20:38:15 +0100
Scott Shumaker <sshumaker@gmail.com> wrote:
> I wanted to use the built-in htonl, htons and friends. However, they
> are actually defined as macros on my system. This can be trivially
> fixed by writing a wrapper function. However, I can't name the wrapped
> function 'htonl', or else I'll have conflicts with the macro.
You can probably define the wrapper functions like this:
uint32_t (htonl)(uint32_t h) {
return htonl(h);
}
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Irish Sea: Variable mainly southwest, 4. Slight or moderate. Showers. Good.