openbsd-ports/lang/lua/files/luser_fixedpoint.h
jolan b9f762be69 add fixedpoint flavor, uses int instead of double to represent numbers
in lua.  mostly just an academic exercise, but is 300% faster on zaurus
when doing simple arithmetic

ok pedro@
2006-01-21 01:29:40 +00:00

7 lines
245 B
C

/* $OpenBSD: luser_fixedpoint.h,v 1.1 2006/01/21 01:29:40 jolan Exp $ */
#define LUA_NUMBER int
#define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%d"
#define lua_str2number(s,p) ((int) strtol((s), (p), 10))