diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 8 | ||||
-rw-r--r-- | src/textadept.c | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index e28f375a..6b99bcb7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -69,6 +69,8 @@ else LDFLAGS += -ldl MAKE = make else + CC=cc + CXX=c++ LDFLAGS += -liconv MAKE = gmake endif @@ -270,14 +272,14 @@ textadeptjit-curses.exe: $(sci_objs) $(sci_lex_objs) ScintillaTerm.o \ # Install/uninstall. install: $(install_targets) | ../core ../doc ../init.lua ../lexers ../LICENSE \ - ../modules ../properties.lua ../themes + ../modules ../themes install -d $(DESTDIR)$(bin_dir) $(DESTDIR)$(data_dir) install $^ $(DESTDIR)$(data_dir) cp -r $| $(DESTDIR)$(data_dir) ln -s $(subst .., $(data_dir), $^) $(DESTDIR)$(bin_dir) if [ -d "$(XDG_DATA_DIR)" ]; then \ install -d $(DESTDIR)$(XDG_DATA_DIR); \ - install -t $(DESTDIR)$(XDG_DATA_DIR) $(desktop_files); \ + install $(desktop_files) $(DESTDIR)$(XDG_DATA_DIR); \ fi if [ -d "$(PIXMAPS_DIR)" ]; then \ install -d $(DESTDIR)$(PIXMAPS_DIR); \ @@ -534,7 +536,7 @@ clean-deps: # Count lines of code and generate ctags. sources = ../core ../modules/ansi_c ../modules/lua ../modules/textadept \ - ../themes textadept.c Makefile ../init.lua ../properties.lua + ../themes textadept.c Makefile ../init.lua count: $(cloc) ; perl $< $(sources) --not-match-f=tadoc.lua ctags: ctags -R --langdef=luax --langmap=luax:.lua --exclude="*doc*" \ diff --git a/src/textadept.c b/src/textadept.c index 73fd9591..9b16bf9d 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1521,10 +1521,10 @@ static int lL_init(lua_State *L, int argc, char **argv, int reinit) { lua_setfield(L, LUA_REGISTRYINDEX, "ta_arg"); lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "ta_buffers"); lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "ta_views"); - } else { // clear package.loaded and _G - lua_getglobal(L, "package"), lua_getfield(L, -1, "loaded"); + } else { // clear _LOADED and _G + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lL_cleartable(L, lua_gettop(L)); - lua_pop(L, 2); // package.loaded and package + lua_pop(L, 1); // _LOADED #if LUA_VERSION_NUM >= 502 lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS); lL_cleartable(L, lua_gettop(L)); |