mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
keep memory-error message in the global state, so that its use
does not depend on Lua internalizing strings to avoid a string creation on memory errors
This commit is contained in:
parent
28aa733c15
commit
055104f5b6
4 changed files with 13 additions and 9 deletions
4
lmem.h
4
lmem.h
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lmem.h,v 1.34 2009/04/17 14:40:13 roberto Exp roberto $
|
||||
** $Id: lmem.h,v 1.35 2009/12/16 16:42:58 roberto Exp roberto $
|
||||
** Interface to Memory Manager
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -13,8 +13,6 @@
|
|||
#include "llimits.h"
|
||||
#include "lua.h"
|
||||
|
||||
#define MEMERRMSG "not enough memory"
|
||||
|
||||
|
||||
#define luaM_reallocv(L,b,on,n,e) \
|
||||
((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue