Author: fperrad
Date: Thu Mar 27 02:11:42 2008
New Revision: 26576
Modified:
trunk/languages/lua/pmc/lua.pmc
Log:
[Lua]
- fix where & traceback
since r26495, Parrot_Context_info.file is a STRING* (previously a char*)
Modified: trunk/languages/lua/pmc/lua.pmc
==============================================================================
--- trunk/languages/lua/pmc/lua.pmc (original)
+++ trunk/languages/lua/pmc/lua.pmc Thu Mar 27 02:11:42 2008
@@ -41,13 +41,8 @@
Parrot_block_DOD(interp);
if (Parrot_Context_get_info(interp, ctx, &info)) {
- const char *file = info.file;
- res = Parrot_sprintf_c(interp, "\t%s:%d in function '%Ss'\n",
- file, info.line, info.subname);
-
- /* free the non-constant string, but not the constant one */
- if (strncmp("(unknown file)", file, 14) < 0)
- string_cstring_free(file);
+ res = Parrot_sprintf_c(interp, "\t%Ss:%d in function '%Ss'\n",
+ info.file, info.line, info.subname);
}
Parrot_unblock_DOD(interp);
@@ -418,13 +413,9 @@
Parrot_block_DOD(INTERP);
if (Parrot_Context_get_info(INTERP, sub_ctx, &info)) {
- STRING *res = Parrot_sprintf_c(INTERP, "%s:%d:",
+ STRING *res = Parrot_sprintf_c(INTERP, "%Ss:%d:",
info.file, info.line);
- /* free the non-constant string, but not the constant one
*/
- if (strncmp("(unknown file)", info.file, 14) < 0)
- string_cstring_free(info.file);
-
Parrot_unblock_DOD(INTERP);
RETURN(STRING *res);
}