Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 146397 Details for
Bug 198048
stratagus build and run issues in devel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Updated patch to fix backtraces when lua errors are thrown
stratagus--use-lua51.diff (text/plain), 1.92 KB, created by
Hans de Goede
on 2007-01-24 11:09:00 UTC
(
hide
)
Description:
Updated patch to fix backtraces when lua errors are thrown
Filename:
MIME Type:
Creator:
Hans de Goede
Created:
2007-01-24 11:09:00 UTC
Size:
1.92 KB
patch
obsolete
>diff -ur stratagus-2.2.2.orig/src/stratagus/script.cpp stratagus-2.2.2/src/stratagus/script.cpp >--- stratagus-2.2.2.orig/src/stratagus/script.cpp 2006-11-20 01:18:04.000000000 +0100 >+++ stratagus-2.2.2/src/stratagus/script.cpp 2007-01-24 11:53:31.000000000 +0100 >@@ -169,6 +169,23 @@ > return status; > } > >+int traceback (lua_State *L) { >+ lua_getfield(L, LUA_GLOBALSINDEX, "debug"); >+ if (!lua_istable(L, -1)) { >+ lua_pop(L, 1); >+ return 1; >+ } >+ lua_getfield(L, -1, "traceback"); >+ if (!lua_isfunction(L, -1)) { >+ lua_pop(L, 2); >+ return 1; >+ } >+ lua_pushvalue(L, 1); /* pass error message */ >+ lua_pushinteger(L, 2); /* skip this function and traceback */ >+ lua_call(L, 2, 1); /* call debug.traceback */ >+ return 1; >+} >+ > /** > ** Call a lua function > ** >@@ -183,8 +200,7 @@ > int base; > > base = lua_gettop(Lua) - narg; // function index >- lua_pushliteral(Lua, "_TRACEBACK"); >- lua_rawget(Lua, LUA_GLOBALSINDEX); // get traceback function >+ lua_pushcfunction(Lua, traceback); /* push traceback function */ > lua_insert(Lua, base); // put it under chunk and args > signal(SIGINT, laction); > status = lua_pcall(Lua, narg, (clear ? 0 : LUA_MULTRET), base); >diff -ur stratagus-2.2.2.orig/src/ui/widgets.cpp stratagus-2.2.2/src/ui/widgets.cpp >--- stratagus-2.2.2.orig/src/ui/widgets.cpp 2007-01-07 01:25:04.000000000 +0100 >+++ stratagus-2.2.2/src/ui/widgets.cpp 2007-01-24 11:53:07.000000000 +0100 >@@ -192,14 +192,17 @@ > ** > ** @param eventId FIXME: docu > */ >+int traceback (lua_State *L); >+ > void LuaActionListener::action(const std::string &eventId) > { > int status; > int base; > base = lua_gettop(luastate); >- lua_getglobal(luastate, "_TRACEBACK"); > lua_rawgeti(luastate, LUA_REGISTRYINDEX, luaref); > lua_pushstring(luastate, eventId.c_str()); >+ lua_pushcfunction(luastate, traceback); >+ lua_insert(luastate, base); > status = lua_pcall(luastate, 1, 0, base); //FIXME call error reporting function > if (status) { > const char *msg;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198048
:
132109
|
132110
|
132111
|
141196
|
141198
| 146397 |
146398