lua-hooks/ext/luajit/src/lj_strfmt.h in immunio-1.1.2 vs lua-hooks/ext/luajit/src/lj_strfmt.h in immunio-1.1.5
- old
+ new
@@ -1,8 +1,8 @@
/*
** String formatting.
-** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
+** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_STRFMT_H
#define _LJ_STRFMT_H
@@ -62,15 +62,16 @@
#define STRFMT_P (STRFMT_PTR)
#define STRFMT_Q (STRFMT_STR|STRFMT_T_QUOTED)
#define STRFMT_S (STRFMT_STR)
#define STRFMT_U (STRFMT_UINT)
#define STRFMT_X (STRFMT_UINT|STRFMT_T_HEX)
+#define STRFMT_G14 (STRFMT_G | ((14+1) << STRFMT_SH_PREC))
/* Maximum buffer sizes for conversions. */
#define STRFMT_MAXBUF_XINT (1+22) /* '0' prefix + uint64_t in octal. */
#define STRFMT_MAXBUF_INT (1+10) /* Sign + int32_t in decimal. */
-#define STRFMT_MAXBUF_NUM LUAI_MAXNUMBER2STR
+#define STRFMT_MAXBUF_NUM 32 /* Must correspond with STRFMT_G14. */
#define STRFMT_MAXBUF_PTR (2+2*sizeof(ptrdiff_t)) /* "0x" + hex ptr. */
/* Format parser. */
LJ_FUNC SFormat LJ_FASTCALL lj_strfmt_parse(FormatState *fs);
@@ -81,13 +82,12 @@
lua_assert(*fs->e == 0); /* Must be NUL-terminated (may have NULs inside). */
}
/* Raw conversions. */
LJ_FUNC char * LJ_FASTCALL lj_strfmt_wint(char *p, int32_t k);
-LJ_FUNC char * LJ_FASTCALL lj_strfmt_wnum(char *p, cTValue *o);
LJ_FUNC char * LJ_FASTCALL lj_strfmt_wptr(char *p, const void *v);
LJ_FUNC char * LJ_FASTCALL lj_strfmt_wuleb128(char *p, uint32_t v);
-LJ_FUNC const char *lj_strfmt_wstrnum(char *buf, cTValue *o, MSize *lenp);
+LJ_FUNC const char *lj_strfmt_wstrnum(lua_State *L, cTValue *o, MSize *lenp);
/* Unformatted conversions to buffer. */
LJ_FUNC SBuf * LJ_FASTCALL lj_strfmt_putint(SBuf *sb, int32_t k);
#if LJ_HASJIT
LJ_FUNC SBuf * LJ_FASTCALL lj_strfmt_putnum(SBuf *sb, cTValue *o);