luaD_reallocstack
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: luaD_reallocstack
- From: "john rayn" <johnrayn@...>
- Date: 2005年8月18日 03:34:02 +0800
Dear lua user,
When I tried to compile lua 5.0 with VisualC++6, I was confused by some
code in ldo.c:
void luaD_reallocstack(lua_State * L, int newsize)
{
TObject *oldstack = L->stack;
luaM_reallocvector(L, L->stack, L->stacksize, newsize, TObject);
^^^^^^^^
I think oldstack(old L->stack) will be a Dangling
Pointer
L->stacksize = newsize;
L->stack_last = L->stack + newsize - 1 - EXTRA_STACK;
correctstack(L, oldstack);
^^^^^^^
is oldstack a Dangling Pointer here ?
}
With best regards
John Rayn
JohnRayn@hotmail.com
2005年08月18日
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com