tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] changing lua_Number to int64_t



On Sat, Nov 16, 2013 at 6:21 AM, Marc Balmer <marc%msys.ch@localhost> wrote:
> Changing the number type to int64_t is certainly a good idea.  Two
> questions, however:
>
> 1) Why do you remove the sys/modules/lua/inttypes.g file?

Because this place holder is no long necessary. I have just replaced
that for sys/inttypes.h (adding -I${S}/sys to CPPFLAGS).

> 2) In sys/modules/lua/luaconf.h, lua_str2number is still #defined as
> stroll(), which assumes long long.  Shouldn't that be changed as well to
> a function taking int64_t as argument?

Yes, my bad; sorry, I forgot about str2number. I've adjusted the
patch. Now, I'm using (int64_t) strtoimax() instead of strtoll(). I
think it should be alright because intmax_t is always greater or equal
than int64_t. I moved strtoimax.c to common/libc. Don't know if
someone sees a problem on that.

The patch is attached.

Regards,
-- 
Lourival Vieira Neto

Attachment: lua_kernel_int64_t-3.patch
Description: Binary data



Home | Main Index | Thread Index | Old Index