aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/manual/11_Scripting.md4
-rw-r--r--src/Makefile9
2 files changed, 10 insertions, 3 deletions
diff --git a/doc/manual/11_Scripting.md b/doc/manual/11_Scripting.md
index 90ec3a39..c73819a8 100644
--- a/doc/manual/11_Scripting.md
+++ b/doc/manual/11_Scripting.md
@@ -26,6 +26,10 @@ same configuration (`luaconf.h`) as vanilla Lua with the following exceptions:
* The `LUA_COMPAT_VARARG`, `LUA_COMPAT_MOD`, `LUA_COMPAT_GFIND`, and
`LUA_COMPAT_OPENLIB` compatibility flags for Lua 5.0 are turned off.
+In addition, the [Lua Coco](http://coco.luajit.org/index.html) extension is used
+to allow coroutines to yield across the C call boundary, which would normally
+cause an error.
+
## Scintilla
The editing component used by Textadept is [Scintilla](http://scintilla.org).
diff --git a/src/Makefile b/src/Makefile
index 667f591e..b326db63 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -13,7 +13,9 @@ else
PLAT_FLAGS = -DGTK -D__BSD__
endif
SCI_THREAD_FLAG =
-LUA_CFLAGS = -DLUA_USE_LINUX
+#LUA_CFLAGS = -DLUA_USE_LINUX
+#Lua Coco needs the following flags because GCC is stupid.
+LUA_CFLAGS = -DLUA_USE_LINUX -fomit-frame-pointer -maccumulate-outgoing-args
TEXTADEPT = textadept
TEXTADEPT_RC =
EXPORTLUASYMS = -rdynamic -Wl,--retain-symbols-file -Wl,lua.sym
@@ -28,7 +30,8 @@ PKG_CONFIG = pkg-config --define-variable=prefix=win32gtk
PKG_CONFIG_PATH = $(shell pwd)/win32gtk/lib/pkgconfig
PLAT_FLAGS = -DGTK -D__WIN32__
SCI_THREAD_FLAG = -DG_THREADS_IMPL_NONE
-LUA_CFLAGS = -D_WIN32 -DWIN32
+#LUA_CFLAGS = -D_WIN32 -DWIN32
+LUA_CFLAGS = -D_WIN32 -DWIN32 -fomit-frame-pointer -maccumulate-outgoing-args
TEXTADEPT = textadept.exe
TEXTADEPT_RC = textadept_rc.o
EXPORTLUASYMS = -Wl,--retain-symbols-file -Wl,lua.sym
@@ -88,7 +91,7 @@ LUA_OBJS = lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lvm.o lzio.o \
lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o ltablib.o lstrlib.o \
loadlib.o loslib.o linit.o \
- lpeg.o lfs.o
+ lpeg.o lfs.o lcoco.o
GCOCOADIALOG = gcocoadialog.o
# Scintilla