diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-05-29 16:05:25 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-05-29 16:05:25 -0300 |
commit | 18a583306babbd670b871ed11fa170de3f92157d (patch) | |
tree | 6370c7d4a3997a4fe2ba3ca9959310e8dcab95ae /bugs | |
parent | fc8d077612a235b42d5defd48d6ba923ed85a17f (diff) | |
download | lua-18a583306babbd670b871ed11fa170de3f92157d.tar.gz lua-18a583306babbd670b871ed11fa170de3f92157d.tar.bz2 lua-18a583306babbd670b871ed11fa170de3f92157d.zip |
patch may be a little simpler
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1422,15 +1422,21 @@ since = [[?]], | |||
1422 | example = [[ ]], | 1422 | example = [[ ]], |
1423 | patch = [[ | 1423 | patch = [[ |
1424 | lvm.c: | 1424 | lvm.c: |
1425 | @@ -61,7 +61,7 @@ | 1425 | @@ -61,11 +61,9 @@ |
1426 | lu_byte mask = L->hookmask; | 1426 | lu_byte mask = L->hookmask; |
1427 | const Instruction *oldpc = L->savedpc; | 1427 | const Instruction *oldpc = L->savedpc; |
1428 | L->savedpc = pc; | 1428 | L->savedpc = pc; |
1429 | - if (mask > LUA_MASKLINE) { /* instruction-hook set? */ | 1429 | - if (mask > LUA_MASKLINE) { /* instruction-hook set? */ |
1430 | - if (L->hookcount == 0) { | ||
1431 | - resethookcount(L); | ||
1432 | - luaD_callhook(L, LUA_HOOKCOUNT, -1); | ||
1433 | - } | ||
1430 | + if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { | 1434 | + if ((mask & LUA_MASKCOUNT) && L->hookcount == 0) { |
1431 | if (L->hookcount == 0) { | 1435 | + resethookcount(L); |
1432 | resethookcount(L); | 1436 | + luaD_callhook(L, LUA_HOOKCOUNT, -1); |
1433 | luaD_callhook(L, LUA_HOOKCOUNT, -1); | 1437 | } |
1438 | if (mask & LUA_MASKLINE) { | ||
1439 | Proto *p = ci_func(L->ci)->l.p; | ||
1434 | ]], | 1440 | ]], |
1435 | } | 1441 | } |
1436 | 1442 | ||