Skip to content

Commit e3c9931

Browse files
committed
Format tracked Lua scripts like other short_src refs.
1 parent 8115d84 commit e3c9931

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/src/lauxlib.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
#include "lauxlib.h"
2525

26+
/* begin_clink_change */
27+
#include "lobject.h"
28+
/* end_clink_change */
29+
2630

2731
/*
2832
** {======================================================
@@ -661,7 +665,9 @@ void add_loaded_file (lua_State *L, const char *filename, int add)
661665
if (add) {
662666
/* add to end of array */
663667
int e = luaL_len(L, -1) + 1;
664-
lua_pushstring(L, filename);
668+
char short_src[LUA_IDSIZE];
669+
luaO_chunkid(short_src, filename, LUA_IDSIZE);
670+
lua_pushstring(L, short_src);
665671
lua_rawseti(L, -2, e);
666672
} else {
667673
/* TODO: Loop to find last matching entry. */

0 commit comments

Comments
 (0)