lua-users home
lua-l archive

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



       I try to using "long double" to redefine lua_Number,but my program failed.

       this is what i changed in luaconf.h(version5.1.4):

        //#define LUA_NUMBER_DOUBLE
        #define LUA_NUMBER  long double
        #define LUAI_UACNUMBER long double
        #define LUA_NUMBER_SCAN     "%Lf"
        #define LUA_NUMBER_FMT      "%.14Lg"
        #define LUAI_USER_ALIGNMENT_T   union {long double u; void *s; long l; }
      
     this is the core stack of my program:

#0  0x00002b791a851997 in luaH_getnum (t=0xf2a7520, key=0) at ltable.c:437
437       if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))
(gdb) bt
#0  0x00002b791a851997 in luaH_getnum (t=0xf2a7520, key=0) at ltable.c:437
#1  0x00002b791a851e82 in luaH_getn (t=0x1) at ltable.c:567
#2  0x00002b791a84a27f in inclinenumber (ls=0xf291bb0) at llex.c:133
#3  0x00002b791a84ba45 in luaX_lookahead (ls=0x2b791a8429a7) at llex.c:459
#4  0x00002b791a84bb53 in luaM_toobig (L=0x7ffff25dee10) at lmem.c:67
#5  0x00002b791a84db1b in recfield (ls=0x2b791a84db1b, cc=0x7ffff25de070) at lparser.c:451
#6  0x00002b791a84e5c3 in simpleexp (ls=0x2b791a84a27f, v=0x7ffff25de140) at lparser.c:730
#7  0x00002b791a84e826 in getbinopr (op=285) at lparser.c:789
#8  0x00002b791a84ea54 in block_follow (token=11129) at lparser.c:872
#9  0x00002b791a84eb28 in check_conflict (ls=0x2b791a84eb28, lh=0x7ffff25de1e0, v=0x2b7900000003) at lparser.c:919
#10 0x00002b791a84e2b9 in funcargs (ls=0x7ffff25dee10, f=0x7ffff25de280) at lparser.c:623
#11 0x00002b791a84edb9 in breakstat (ls=0x1) at lparser.c:979
.......

did i miss some thing?