You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: Francesco M. <fr...@us...> - 2007-04-23 22:44:36
|
Update of /cvsroot/wxlua/wxLua/build/msw In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32574/build/msw Modified Files: makefile.bcc makefile.gcc makefile.vc makefile.wat Log Message: updated bakefile build system to use wxWidgets standard presets Index: makefile.vc =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/makefile.vc,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** makefile.vc 13 Feb 2007 18:43:11 -0000 1.43 --- makefile.vc 23 Apr 2007 22:44:29 -0000 1.44 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= *************** *** 42,49 **** SHARED = 0 ! # The directory where wxWidgets library is installed ! WX_DIR = $(WXWIN) ! ! # Use DLL build of wx library to use? [0,1] # 1 - DLL WX_SHARED = 0 --- 42,47 ---- SHARED = 0 ! # Use DLL build of wx library? [0,1] ! # 0 - Static # 1 - DLL WX_SHARED = 0 *************** *** 57,60 **** --- 55,61 ---- WX_MONOLITHIC = 0 + # The directory where wxWidgets library is installed + WX_DIR = $(WXWIN) + # Should the wxLua applications be compiled ? [0,1] USE_APPS = 1 *************** *** 109,115 **** MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" \ ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_DIR="$(WX_DIR)" \ ! WX_SHARED="$(WX_SHARED)" WX_VERSION="$(WX_VERSION)" \ ! WX_MONOLITHIC="$(WX_MONOLITHIC)" USE_APPS="$(USE_APPS)" \ USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" \ RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" \ --- 110,116 ---- MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" \ ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_SHARED="$(WX_SHARED)" \ ! WX_VERSION="$(WX_VERSION)" WX_MONOLITHIC="$(WX_MONOLITHIC)" \ ! WX_DIR="$(WX_DIR)" USE_APPS="$(USE_APPS)" \ USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" \ RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" \ *************** *** 122,189 **** ### Conditionally set variables: ### ! !if "$(SHARED)" == "0" ! SHARED_SUFFIX = !endif ! !if "$(SHARED)" == "1" ! SHARED_SUFFIX = dll !endif !if "$(SHARED)" == "0" ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\vc$(WXLIBPOSTFIX)_lib !endif !if "$(SHARED)" == "1" ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\vc$(WXLIBPOSTFIX)_dll !endif !if "$(USE_APPS)" == "1" __apps___depname = sub_apps !endif - !if "$(BUILD)" == "debug" && "$(UNICODE)" == "0" - WXLIBPOSTFIX = d - !endif - !if "$(BUILD)" == "debug" && "$(UNICODE)" == "1" - WXLIBPOSTFIX = ud - !endif - !if "$(BUILD)" == "release" && "$(UNICODE)" == "1" - WXLIBPOSTFIX = u - !endif ! all: vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ! vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX): ! -if not exist vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) mkdir vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ### Targets: ### ! all: ..\..\lib\vc_dll ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ..\..\lib\vc_lib sub_modules $(__apps___depname) clean: ! -if exist vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj del vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj ! -if exist vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res del vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res ! -if exist vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.pch del vcmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.pch ! cd ..\..\modules\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) clean ! cd $(MAKEDIR) ! cd ..\..\apps\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) clean ! cd $(MAKEDIR) ! ! ..\..\lib\vc_dll: ! if not exist ..\..\lib\vc_dll mkdir ..\..\lib\vc_dll ! ! ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES): ! if not exist ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) mkdir ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ! ..\..\lib\vc_lib: ! if not exist ..\..\lib\vc_lib mkdir ..\..\lib\vc_lib sub_modules: ! cd ..\..\modules\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) ! cd $(MAKEDIR) !if "$(USE_APPS)" == "1" sub_apps: ! cd ..\..\apps\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) ! cd $(MAKEDIR) !endif --- 123,193 ---- ### Conditionally set variables: ### ! !if "$(BUILD)" == "debug" && "$(UNICODE)" == "1" ! WXLIBPOSTFIX = ud !endif ! !if "$(BUILD)" == "debug" && "$(UNICODE)" == "0" ! WXLIBPOSTFIX = d ! !endif ! !if "$(BUILD)" == "release" && "$(UNICODE)" == "1" ! WXLIBPOSTFIX = u ! !endif ! !if "$(WX_SHARED)" == "0" ! WXLIBPATH = \lib\vc_lib ! !endif ! !if "$(WX_SHARED)" == "1" ! WXLIBPATH = \lib\vc_dll !endif !if "$(SHARED)" == "0" ! _BUILDDIR_SHARED_SUFFIX = !endif !if "$(SHARED)" == "1" ! _BUILDDIR_SHARED_SUFFIX = _dll !endif !if "$(USE_APPS)" == "1" __apps___depname = sub_apps !endif ! all: vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX): ! -if not exist vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) mkdir vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ### Targets: ### ! all: test_for_selected_wxbuild sub_modules $(__apps___depname) clean: ! -if exist vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj del vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj ! -if exist vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res del vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res ! -if exist vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.pch del vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.pch ! cd modules\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) clean ! cd "$(MAKEDIR)" ! cd apps\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) clean ! cd "$(MAKEDIR)" ! test_for_selected_wxbuild: ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo The selected wxWidgets build is not available! ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo Please use the options prefixed with WX_ to select another wxWidgets build. ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! exit 1 sub_modules: ! cd modules\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) ! cd "$(MAKEDIR)" !if "$(USE_APPS)" == "1" sub_apps: ! cd apps\build\msw $(MAKE) -f makefile.vc $(MAKEARGS) ! cd "$(MAKEDIR)" !endif *************** *** 192,196 **** @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ../..\docs doxygen doxygen.cfg --- 196,200 ---- @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ..\..\docs doxygen doxygen.cfg Index: makefile.bcc =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/makefile.bcc,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** makefile.bcc 13 Feb 2007 18:43:11 -0000 1.39 --- makefile.bcc 23 Apr 2007 22:44:29 -0000 1.40 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= *************** *** 65,74 **** !endif ! # The directory where wxWidgets library is installed ! !ifndef WX_DIR ! WX_DIR = $(WXWIN) ! !endif ! ! # Use DLL build of wx library to use? [0,1] !ifndef WX_SHARED WX_SHARED = 0 --- 65,69 ---- !endif ! # Use DLL build of wx library? [0,1] !ifndef WX_SHARED WX_SHARED = 0 *************** *** 85,88 **** --- 80,88 ---- !endif + # The directory where wxWidgets library is installed + !ifndef WX_DIR + WX_DIR = $(WXWIN) + !endif + # Should the wxLua applications be compiled ? [0,1] !ifndef USE_APPS *************** *** 171,176 **** -DCXXFLAGS="$(CXXFLAGS)" -DCPPFLAGS="$(CPPFLAGS)" -DLDFLAGS="$(LDFLAGS)" \ -DBUILD="$(BUILD)" -DUNICODE="$(UNICODE)" -DSHARED="$(SHARED)" \ ! -DWX_DIR="$(WX_DIR)" -DWX_SHARED="$(WX_SHARED)" \ ! -DWX_VERSION="$(WX_VERSION)" -DWX_MONOLITHIC="$(WX_MONOLITHIC)" \ -DUSE_APPS="$(USE_APPS)" -DUSE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" \ -DLUA_DIR="$(LUA_DIR)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)" \ --- 171,176 ---- -DCXXFLAGS="$(CXXFLAGS)" -DCPPFLAGS="$(CPPFLAGS)" -DLDFLAGS="$(LDFLAGS)" \ -DBUILD="$(BUILD)" -DUNICODE="$(UNICODE)" -DSHARED="$(SHARED)" \ ! -DWX_SHARED="$(WX_SHARED)" -DWX_VERSION="$(WX_VERSION)" \ ! -DWX_MONOLITHIC="$(WX_MONOLITHIC)" -DWX_DIR="$(WX_DIR)" \ -DUSE_APPS="$(USE_APPS)" -DUSE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" \ -DLUA_DIR="$(LUA_DIR)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)" \ *************** *** 184,255 **** ### Conditionally set variables: ### ! !if "$(SHARED)" == "0" ! SHARED_SUFFIX = !endif ! !if "$(SHARED)" == "1" ! SHARED_SUFFIX = dll !endif !if "$(SHARED)" == "0" ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\bcc$(WXLIBPOSTFIX)_lib !endif !if "$(SHARED)" == "1" ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\bcc$(WXLIBPOSTFIX)_dll !endif !if "$(USE_APPS)" == "1" __apps___depname = apps !endif - !if "$(BUILD)" == "debug" && "$(UNICODE)" == "0" - WXLIBPOSTFIX = d - !endif - !if "$(BUILD)" == "debug" && "$(UNICODE)" == "1" - WXLIBPOSTFIX = ud - !endif - !if "$(BUILD)" == "release" && "$(UNICODE)" == "1" - WXLIBPOSTFIX = u - !endif ! all: bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ! bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX): ! -if not exist bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) mkdir bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ### Targets: ### ! all: ..\..\lib\bcc_dll ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ..\..\lib\bcc_lib modules $(__apps___depname) clean: ! -if exist bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj ! -if exist bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res ! -if exist bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.csm del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.csm ! @echo cd ..\..\modules\build\msw >bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! call bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! @del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! @echo cd ..\..\apps\build\msw >bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! call bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! @del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! ! ..\..\lib\bcc_dll: ! if not exist ..\..\lib\bcc_dll mkdir ..\..\lib\bcc_dll ! ! ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES): ! if not exist ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) mkdir ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ! ..\..\lib\bcc_lib: ! if not exist ..\..\lib\bcc_lib mkdir ..\..\lib\bcc_lib modules: ! @echo cd ..\..\modules\build\msw >bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) >>bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! call bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat ! @del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\modules.bat !if "$(USE_APPS)" == "1" apps: ! @echo cd ..\..\apps\build\msw >bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) >>bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! call bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat ! @del bccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\apps.bat !endif --- 184,258 ---- ### Conditionally set variables: ### ! !if "$(BUILD)" == "debug" && "$(UNICODE)" == "1" ! WXLIBPOSTFIX = ud !endif ! !if "$(BUILD)" == "debug" && "$(UNICODE)" == "0" ! WXLIBPOSTFIX = d ! !endif ! !if "$(BUILD)" == "release" && "$(UNICODE)" == "1" ! WXLIBPOSTFIX = u ! !endif ! !if "$(WX_SHARED)" == "0" ! WXLIBPATH = \lib\bcc_lib ! !endif ! !if "$(WX_SHARED)" == "1" ! WXLIBPATH = \lib\bcc_dll !endif !if "$(SHARED)" == "0" ! _BUILDDIR_SHARED_SUFFIX = !endif !if "$(SHARED)" == "1" ! _BUILDDIR_SHARED_SUFFIX = _dll !endif !if "$(USE_APPS)" == "1" __apps___depname = apps !endif ! all: bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX): ! -if not exist bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) mkdir bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ### Targets: ### ! all: test_for_selected_wxbuild modules $(__apps___depname) clean: ! -if exist bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj ! -if exist bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res ! -if exist bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.csm del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.csm ! @echo cd modules\build\msw >bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! call bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! @del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! @echo cd apps\build\msw >bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! call bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! @del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! test_for_selected_wxbuild: ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo The selected wxWidgets build is not available! ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo Please use the options prefixed with WX_ to select another wxWidgets build. ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! exit 1 modules: ! @echo cd modules\build\msw >bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) >>bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! call bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat ! @del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\modules.bat !if "$(USE_APPS)" == "1" apps: ! @echo cd apps\build\msw >bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! @echo $(MAKE) -f makefile.bcc $(MAKEARGS) >>bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! call bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat ! @del bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\apps.bat !endif *************** *** 258,262 **** @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ../..\docs doxygen doxygen.cfg --- 261,265 ---- @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ..\..\docs doxygen doxygen.cfg Index: makefile.wat =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/makefile.wat,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** makefile.wat 13 Feb 2007 18:43:11 -0000 1.42 --- makefile.wat 23 Apr 2007 22:44:29 -0000 1.43 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= *************** *** 42,49 **** SHARED = 0 ! # The directory where wxWidgets library is installed ! WX_DIR = $(%WXWIN) ! ! # Use DLL build of wx library to use? [0,1] # 1 - DLL WX_SHARED = 0 --- 42,47 ---- SHARED = 0 ! # Use DLL build of wx library? [0,1] ! # 0 - Static # 1 - DLL WX_SHARED = 0 *************** *** 57,60 **** --- 55,61 ---- WX_MONOLITHIC = 0 + # The directory where wxWidgets library is installed + WX_DIR = $(%WXWIN) + # Should the wxLua applications be compiled ? [0,1] USE_APPS = 1 *************** *** 122,152 **** ### Conditionally set variables: ### - SHARED_SUFFIX = - !ifeq SHARED 0 - SHARED_SUFFIX = - !endif - !ifeq SHARED 1 - SHARED_SUFFIX = dll - !endif - __WXLUA_BINOUTPUT_FOLDER_FILENAMES = - !ifeq SHARED 0 - __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\wat$(WXLIBPOSTFIX)_lib - !endif - !ifeq SHARED 1 - __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\wat$(WXLIBPOSTFIX)_dll - !endif - __apps___depname = - !ifeq USE_APPS 1 - __apps___depname = apps - !endif WXLIBPOSTFIX = !ifeq BUILD debug ! !ifeq UNICODE 0 ! WXLIBPOSTFIX = d !endif !endif !ifeq BUILD debug ! !ifeq UNICODE 1 ! WXLIBPOSTFIX = ud !endif !endif --- 123,135 ---- ### Conditionally set variables: ### WXLIBPOSTFIX = !ifeq BUILD debug ! !ifeq UNICODE 1 ! WXLIBPOSTFIX = ud !endif !endif !ifeq BUILD debug ! !ifeq UNICODE 0 ! WXLIBPOSTFIX = d !endif !endif *************** *** 156,159 **** --- 139,160 ---- !endif !endif + WXLIBPATH = + !ifeq WX_SHARED 0 + WXLIBPATH = \lib\wat_lib + !endif + !ifeq WX_SHARED 1 + WXLIBPATH = \lib\wat_dll + !endif + _BUILDDIR_SHARED_SUFFIX = + !ifeq SHARED 0 + _BUILDDIR_SHARED_SUFFIX = + !endif + !ifeq SHARED 1 + _BUILDDIR_SHARED_SUFFIX = _dll + !endif + __apps___depname = + !ifeq USE_APPS 1 + __apps___depname = apps + !endif ### Variables: ### *************** *** 161,167 **** MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" & CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" & ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_DIR="$(WX_DIR)" & ! WX_SHARED="$(WX_SHARED)" WX_VERSION="$(WX_VERSION)" & ! WX_MONOLITHIC="$(WX_MONOLITHIC)" USE_APPS="$(USE_APPS)" & USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" & RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" & --- 162,168 ---- MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" & CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" & ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_SHARED="$(WX_SHARED)" & ! WX_VERSION="$(WX_VERSION)" WX_MONOLITHIC="$(WX_MONOLITHIC)" & ! WX_DIR="$(WX_DIR)" USE_APPS="$(USE_APPS)" & USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" & RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" & *************** *** 173,208 **** ! all : watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ! watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) : ! -if not exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) mkdir watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ### Targets: ### ! all : .SYMBOLIC ..\..\lib\wat_dll ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ..\..\lib\wat_lib modules $(__apps___depname) clean : .SYMBOLIC ! -if exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj del watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.obj ! -if exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res del watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.res ! -if exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.lbc del watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.lbc ! -if exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.ilk del watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.ilk ! -if exist watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.pch del watmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.pch ! cd ..\..\modules\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean cd $(WATCOM_CWD) ! cd ..\..\apps\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean cd $(WATCOM_CWD) ! ..\..\lib\wat_dll : ! if not exist ..\..\lib\wat_dll mkdir ..\..\lib\wat_dll ! ! ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) : ! if not exist ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) mkdir ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ! ! ..\..\lib\wat_lib : ! if not exist ..\..\lib\wat_lib mkdir ..\..\lib\wat_lib modules : .SYMBOLIC ! cd ..\..\modules\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) cd $(WATCOM_CWD) --- 174,212 ---- ! all : watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) : ! -if not exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) mkdir watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ### Targets: ### ! all : .SYMBOLIC test_for_selected_wxbuild modules $(__apps___depname) clean : .SYMBOLIC ! -if exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj del watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.obj ! -if exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res del watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.res ! -if exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.lbc del watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.lbc ! -if exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.ilk del watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.ilk ! -if exist watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.pch del watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.pch ! cd modules\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean cd $(WATCOM_CWD) ! cd apps\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean cd $(WATCOM_CWD) ! test_for_selected_wxbuild : ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo The selected wxWidgets build is not available! ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo Please use the options prefixed with WX_ to select another wxWidgets build. ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! exit 1 modules : .SYMBOLIC ! cd modules\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) cd $(WATCOM_CWD) *************** *** 210,214 **** !ifeq USE_APPS 1 apps : .SYMBOLIC ! cd ..\..\apps\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) cd $(WATCOM_CWD) --- 214,218 ---- !ifeq USE_APPS 1 apps : .SYMBOLIC ! cd apps\build\msw wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) cd $(WATCOM_CWD) *************** *** 219,223 **** @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ../..\docs doxygen doxygen.cfg --- 223,227 ---- @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ..\..\docs doxygen doxygen.cfg Index: makefile.gcc =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/makefile.gcc,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** makefile.gcc 13 Feb 2007 18:43:11 -0000 1.41 --- makefile.gcc 23 Apr 2007 22:44:29 -0000 1.42 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= *************** *** 38,45 **** SHARED := 0 ! # The directory where wxWidgets library is installed ! WX_DIR := $(WXWIN) ! ! # Use DLL build of wx library to use? [0,1] WX_SHARED := 0 --- 38,42 ---- SHARED := 0 ! # Use DLL build of wx library? [0,1] WX_SHARED := 0 *************** *** 50,53 **** --- 47,53 ---- WX_MONOLITHIC := 0 + # The directory where wxWidgets library is installed + WX_DIR := $(WXWIN) + # Should the wxLua applications be compiled ? [0,1] USE_APPS := 1 *************** *** 102,108 **** MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" \ ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_DIR="$(WX_DIR)" \ ! WX_SHARED="$(WX_SHARED)" WX_VERSION="$(WX_VERSION)" \ ! WX_MONOLITHIC="$(WX_MONOLITHIC)" USE_APPS="$(USE_APPS)" \ USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" \ RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" \ --- 102,108 ---- MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" BUILD="$(BUILD)" \ ! UNICODE="$(UNICODE)" SHARED="$(SHARED)" WX_SHARED="$(WX_SHARED)" \ ! WX_VERSION="$(WX_VERSION)" WX_MONOLITHIC="$(WX_MONOLITHIC)" \ ! WX_DIR="$(WX_DIR)" USE_APPS="$(USE_APPS)" \ USE_SYSTEM_LUA="$(USE_SYSTEM_LUA)" LUA_DIR="$(LUA_DIR)" \ RUNTIME_LIBS="$(RUNTIME_LIBS)" THREADING="$(THREADING)" \ *************** *** 115,132 **** ### Conditionally set variables: ### ! ifeq ($(SHARED),0) ! SHARED_SUFFIX = ! endif ! ifeq ($(SHARED),1) ! SHARED_SUFFIX = dll ! endif ! ifeq ($(SHARED),0) ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\gcc$(WXLIBPOSTFIX)_lib ! endif ! ifeq ($(SHARED),1) ! __WXLUA_BINOUTPUT_FOLDER_FILENAMES = bin\gcc$(WXLIBPOSTFIX)_dll endif - ifeq ($(USE_APPS),1) - __apps___depname = apps endif ifeq ($(BUILD),debug) --- 115,122 ---- ### Conditionally set variables: ### ! ifeq ($(BUILD),debug) ! ifeq ($(UNICODE),1) ! WXLIBPOSTFIX = ud endif endif ifeq ($(BUILD),debug) *************** *** 135,143 **** endif endif - ifeq ($(BUILD),debug) - ifeq ($(UNICODE),1) - WXLIBPOSTFIX = ud - endif - endif ifeq ($(BUILD),release) ifeq ($(UNICODE),1) --- 125,128 ---- *************** *** 145,179 **** endif endif ! all: gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ! gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX): ! -if not exist gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) mkdir gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX) ### Targets: ### ! all: ..\..\lib\gcc_dll ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ..\..\lib\gcc_lib modules $(__apps___depname) clean: ! -if exist gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.o del gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.o ! -if exist gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.d del gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)\*.d ! $(MAKE) -C ..\..\modules\build\msw -f makefile.gcc $(MAKEARGS) clean ! $(MAKE) -C ..\..\apps\build\msw -f makefile.gcc $(MAKEARGS) clean ! ! ..\..\lib\gcc_dll: ! if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll ! ! ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES): ! if not exist ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) mkdir ..\..\$(__WXLUA_BINOUTPUT_FOLDER_FILENAMES) ! ..\..\lib\gcc_lib: ! if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib modules: ! $(MAKE) -C ..\..\modules\build\msw -f makefile.gcc $(MAKEARGS) ifeq ($(USE_APPS),1) apps: ! $(MAKE) -C ..\..\apps\build\msw -f makefile.gcc $(MAKEARGS) endif --- 130,182 ---- endif endif + ifeq ($(WX_SHARED),0) + WXLIBPATH = \lib\gcc_lib + endif + ifeq ($(WX_SHARED),1) + WXLIBPATH = \lib\gcc_dll + endif + ifeq ($(SHARED),0) + _BUILDDIR_SHARED_SUFFIX = + endif + ifeq ($(SHARED),1) + _BUILDDIR_SHARED_SUFFIX = _dll + endif + ifeq ($(USE_APPS),1) + __apps___depname = apps + endif ! all: gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ! gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX): ! -if not exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) mkdir gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) ### Targets: ### ! all: test_for_selected_wxbuild modules $(__apps___depname) clean: ! -if exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.o del gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.o ! -if exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.d del gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.d ! $(MAKE) -C modules\build\msw -f makefile.gcc $(MAKEARGS) clean ! $(MAKE) -C apps\build\msw -f makefile.gcc $(MAKEARGS) clean ! test_for_selected_wxbuild: ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo The selected wxWidgets build is not available! ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo Please use the options prefixed with WX_ to select another wxWidgets build. ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! echo ---------------------------------------------------------------------------- ! @if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \ ! exit 1 modules: ! $(MAKE) -C modules\build\msw -f makefile.gcc $(MAKEARGS) ifeq ($(USE_APPS),1) apps: ! $(MAKE) -C apps\build\msw -f makefile.gcc $(MAKEARGS) endif *************** *** 182,186 **** @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ../..\docs doxygen doxygen.cfg --- 185,189 ---- @echo Creating wxLua documentation using doxygen... @echo ============================================= ! cd ..\..\docs doxygen doxygen.cfg *************** *** 197,199 **** # Dependencies tracking: ! -include gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)/*.d --- 200,202 ---- # Dependencies tracking: ! -include gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)/*.d |
From: Francesco M. <fr...@us...> - 2007-04-23 22:44:35
|
Update of /cvsroot/wxlua/wxLua/modules/build/msw In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32574/modules/build/msw Modified Files: makefile.bcc makefile.gcc makefile.vc makefile.wat Log Message: updated bakefile build system to use wxWidgets standard presets Index: makefile.vc =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/makefile.vc,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** makefile.vc 13 Feb 2007 18:43:12 -0000 1.61 --- makefile.vc 23 Apr 2007 22:44:30 -0000 1.62 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! [...2298 lines suppressed...] $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dummy.obj: ..\..\wxluasocket\src\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) /Ycwx/wxprec.h $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldtarg.obj: ..\..\wxluasocket\src\wxldtarg.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldserv.obj: ..\..\wxluasocket\src\wxldserv.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dservice.obj: ..\..\wxluasocket\src\dservice.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxluasocket.obj: ..\..\wxluasocket\src\wxluasocket.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\mod_luamodule_luamodule.obj: ..\..\luamodule\src\luamodule.cpp $(CXX) /c /nologo /TP /Fo$@ $(MOD_LUAMODULE_CXXFLAGS) $** Index: makefile.bcc =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/makefile.bcc,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** makefile.bcc 13 Feb 2007 18:43:11 -0000 1.62 --- makefile.bcc 23 Apr 2007 22:44:30 -0000 1.63 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! [...2163 lines suppressed...] $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dummy.obj: ..\..\wxluasocket\src\dummy.cpp $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) -H $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldtarg.obj: ..\..\wxluasocket\src\wxldtarg.cpp $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldserv.obj: ..\..\wxluasocket\src\wxldserv.cpp $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dservice.obj: ..\..\wxluasocket\src\dservice.cpp $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxluasocket.obj: ..\..\wxluasocket\src\wxluasocket.cpp $(CXX) -q -c -P -o$@ $(WXLUASOCKET_DLL_CXXFLAGS) $** ! bccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\mod_luamodule_luamodule.obj: ..\..\luamodule\src\luamodule.cpp $(CXX) -q -c -P -o$@ $(MOD_LUAMODULE_CXXFLAGS) $** Index: makefile.wat =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/makefile.wat,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** makefile.wat 13 Feb 2007 18:43:12 -0000 1.61 --- makefile.wat 23 Apr 2007 22:44:30 -0000 1.62 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! [...2295 lines suppressed...] $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dummy.obj : .AUTODEPEND ..\..\wxluasocket\src\dummy.cpp $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldtarg.obj : .AUTODEPEND ..\..\wxluasocket\src\wxldtarg.cpp $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxldserv.obj : .AUTODEPEND ..\..\wxluasocket\src\wxldserv.cpp $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dservice.obj : .AUTODEPEND ..\..\wxluasocket\src\dservice.cpp $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxluasocket.obj : .AUTODEPEND ..\..\wxluasocket\src\wxluasocket.cpp $(CXX) -bt=nt -zq -fo=$^@ $(WXLUASOCKET_DLL_CXXFLAGS) $< ! watmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\mod_luamodule_luamodule.obj : .AUTODEPEND ..\..\luamodule\src\luamodule.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MOD_LUAMODULE_CXXFLAGS) $< Index: makefile.gcc =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/makefile.gcc,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** makefile.gcc 13 Feb 2007 18:43:12 -0000 1.61 --- makefile.gcc 23 Apr 2007 22:44:30 -0000 1.62 *************** *** 1,5 **** # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://bakefile.sourceforge.net) # Do not modify, all changes will be overwritten! # ========================================================================= --- 1,5 ---- # ========================================================================= # This makefile was generated by ! # Bakefile 0.2.2 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! [...2099 lines suppressed...] $(CXX) -c -o $@ $(WXLUASOCKET_DLL_CXXFLAGS) $(CPPDEPS) $< ! gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_dservice.o: ../../wxluasocket/src/dservice.cpp $(CXX) -c -o $@ $(WXLUASOCKET_DLL_CXXFLAGS) $(CPPDEPS) $< ! gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxluasocket_dll_wxluasocket.o: ../../wxluasocket/src/wxluasocket.cpp $(CXX) -c -o $@ $(WXLUASOCKET_DLL_CXXFLAGS) $(CPPDEPS) $< ! gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\mod_luamodule_luamodule.o: ../../luamodule/src/luamodule.cpp $(CXX) -c -o $@ $(MOD_LUAMODULE_CXXFLAGS) $(CPPDEPS) $< *************** *** 1322,1324 **** # Dependencies tracking: ! -include gccmsw_$(WXLIBPOSTFIX)$(SHARED_SUFFIX)/*.d --- 1396,1398 ---- # Dependencies tracking: ! -include gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)/*.d |
From: Francesco M. <fr...@us...> - 2007-04-23 22:44:33
|
Update of /cvsroot/wxlua/wxLua/modules/build/bakefiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32574/modules/build/bakefiles Modified Files: common.bkl modules.bkl Log Message: updated bakefile build system to use wxWidgets standard presets Index: common.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/common.bkl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** common.bkl 16 Dec 2006 12:09:05 -0000 1.9 --- common.bkl 23 Apr 2007 22:44:30 -0000 1.10 *************** *** 25,32 **** <set var="WXLUA_MODULEDIR">../..</set> - <set var="WXLUA_LIBOUTPUT_PATH">$(WXLUA_BASEDIR)/$(WXLUA_LIBOUTPUT_FOLDER)</set> - <set var="WXLUA_DLLOUTPUT_PATH">$(WXLUA_BASEDIR)/$(WXLUA_DLLOUTPUT_FOLDER)</set> - <set var="WXLUA_BINOUTPUT_PATH">$(WXLUA_BASEDIR)/bin</set> - <set-srcdir>../..</set-srcdir> </if> --- 25,28 ---- *************** *** 37,45 **** --> <set var="WXLUA_BASEDIR">$(top_srcdir)</set> - - <!-- top_builddir already ends with '/' --> - <set var="WXLUA_LIBOUTPUT_PATH">$(top_builddir)/$(WXLUA_LIBOUTPUT_FOLDER)</set> - <set var="WXLUA_DLLOUTPUT_PATH">$(top_builddir)/$(WXLUA_DLLOUTPUT_FOLDER)</set> - <set var="WXLUA_BINOUTPUT_PATH">$(top_builddir)/bin</set> </if> --- 33,36 ---- *************** *** 74,78 **** <!-- modules-specific options --> ! <include file="options.bkl"/> --- 65,69 ---- <!-- modules-specific options --> ! <include file="options.bkl" once="1"/> *************** *** 84,88 **** <define-rule name="wxlua_lib" extends="lib"> <template> ! <dirname>$(WXLUA_LIBOUTPUT_PATH)</dirname> <set var="__modname"/> --- 75,80 ---- <define-rule name="wxlua_lib" extends="lib"> <template> ! <!-- do not prefix "lib" with $(WXLUA_BASEDIR): we want to allow out-of-tree builds!--> ! <wxlua-dirname>../lib</wxlua-dirname> <set var="__modname"/> *************** *** 98,102 **** wxlua_msw[u][d]_[modulename]-[wxversion without dots].dll (or .lib) --> ! <wxlike-libname prefix='lua'>$(__modnamelow)</wxlike-libname> <sources>$(mk.evalExpr('$(' + value + '_SRC)'))</sources> <headers>$(mk.evalExpr('$(' + value + '_HDR)'))</headers> --- 90,94 ---- wxlua_msw[u][d]_[modulename]-[wxversion without dots].dll (or .lib) --> ! <wxlike-libname prefix='wxlua'>$(__modnamelow)</wxlike-libname> <sources>$(mk.evalExpr('$(' + value + '_SRC)'))</sources> <headers>$(mk.evalExpr('$(' + value + '_HDR)'))</headers> *************** *** 126,130 **** <define-rule name="wxlua_dll" extends="dll"> <template> ! <dirname>$(WXLUA_DLLOUTPUT_PATH)</dirname> <!-- The DLL version --> --- 118,123 ---- <define-rule name="wxlua_dll" extends="dll"> <template> ! <!-- do not prefix "lib" with $(WXLUA_BASEDIR): we want to allow out-of-tree builds!--> ! <wxlua-dirname>../lib</wxlua-dirname> <!-- The DLL version --> *************** *** 150,155 **** <set var="__modnamelow">$(__modname.lower())</set> ! <wxlike-libname prefix='lua'>$(__modnamelow)</wxlike-libname> ! <wxlike-dllname prefix='lua'>$(__modnamelow)</wxlike-dllname> <sources>$(mk.evalExpr('$(' + value + '_SRC)'))</sources> <headers>$(mk.evalExpr('$(' + value + '_HDR)'))</headers> --- 143,147 ---- <set var="__modnamelow">$(__modname.lower())</set> ! <wxlike-dllname prefix='wxlua'>$(__modnamelow)</wxlike-dllname> <sources>$(mk.evalExpr('$(' + value + '_SRC)'))</sources> <headers>$(mk.evalExpr('$(' + value + '_HDR)'))</headers> Index: modules.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/modules.bkl,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** modules.bkl 20 Dec 2006 13:15:11 -0000 1.42 --- modules.bkl 23 Apr 2007 22:44:30 -0000 1.43 *************** *** 15,19 **** <!-- Contains stuff shared between this bakefile and the wxLua/modules/wxbind/build/wxbindcustom.bkl one --> ! <include file="common.bkl"/> <!-- Here it's important to use template_append and not just template ! --> --- 15,19 ---- <!-- Contains stuff shared between this bakefile and the wxLua/modules/wxbind/build/wxbindcustom.bkl one --> ! <include file="common.bkl" once="1"/> <!-- Here it's important to use template_append and not just template ! --> *************** *** 55,61 **** against a DSO/DLL named "lua5.1[.dll]" so that our "wx[.dll]" can be used just like any other Lua module. --> ! <lib id="lua_lib" cond="SHARED=='0' and USE_SYSTEM_LUA=='0'"> ! <dirname>$(WXLUA_LIBOUTPUT_PATH)</dirname> <libname>lua5.1</libname> --- 55,70 ---- against a DSO/DLL named "lua5.1[.dll]" so that our "wx[.dll]" can be used just like any other Lua module. + + NOTE #2: we add template "wxlike" only to be sure that this lua library + will be built using the same DEBUG/RELEASE settings as for all + other libraries (wxlike will set <debug-info> basing on WX_DEBUG=0/1 + which has been replaced by our BUILD=debug/release option). --> ! <lib id="lua_lib" ! template="wxlike" ! cond="SHARED=='0' and USE_SYSTEM_LUA=='0'"> ! ! <!-- do not prefix "lib" with $(WXLUA_BASEDIR): we want to allow out-of-tree builds!--> ! <wxlua-dirname>../lib</wxlua-dirname> <libname>lua5.1</libname> *************** *** 72,77 **** <ldflags>$(LUA_PLATFORM_SPECIFIC_LDFLAGS)</ldflags> </lib> ! <dll id="lua_dll" cond="SHARED=='1' and USE_SYSTEM_LUA=='0'"> ! <dirname>$(WXLUA_DLLOUTPUT_PATH)</dirname> <libname>lua5.1</libname> <dllname>lua5.1</dllname> --- 81,90 ---- <ldflags>$(LUA_PLATFORM_SPECIFIC_LDFLAGS)</ldflags> </lib> ! <dll id="lua_dll" ! template="wxlike" ! cond="SHARED=='1' and USE_SYSTEM_LUA=='0'"> ! ! <!-- do not prefix "lib" with $(WXLUA_BASEDIR): we want to allow out-of-tree builds!--> ! <wxlua-dirname>../lib</wxlua-dirname> <libname>lua5.1</libname> <dllname>lua5.1</dllname> *************** *** 153,157 **** <!-- the luamodule: for lots of reasons it can be built only when SHARED==1 --> <module id="mod_luamodule" template="wxlua" cond="SHARED=='1' and USE_LUAMODULE=='1'"> ! <dirname>$(WXLUA_DLLOUTPUT_PATH)</dirname> <!-- $libdir/lua/5.1 looks to be the standard folder for lua modules... --> --- 166,171 ---- <!-- the luamodule: for lots of reasons it can be built only when SHARED==1 --> <module id="mod_luamodule" template="wxlua" cond="SHARED=='1' and USE_LUAMODULE=='1'"> ! <!-- do not prefix "lib" with $(WXLUA_BASEDIR): we want to allow out-of-tree builds!--> ! <wxlua-dirname>../lib</wxlua-dirname> <!-- $libdir/lua/5.1 looks to be the standard folder for lua modules... --> |
From: John L. <jr...@us...> - 2007-04-19 02:05:12
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7933/samples Modified Files: scribble.wx.lua Log Message: Add a custom widget to select colours in the toolbar Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** scribble.wx.lua 28 Feb 2007 04:28:34 -0000 1.16 --- scribble.wx.lua 19 Apr 2007 02:05:01 -0000 1.17 *************** *** 39,43 **** screenWidth, screenHeight = wx.wxDisplaySize() ! bitmap = wx.wxEmptyBitmap(screenWidth, screenHeight) -- --------------------------------------------------------------------------- --- 39,43 ---- screenWidth, screenHeight = wx.wxDisplaySize() ! bitmap = wx.wxEmptyBitmap(screenWidth, screenHeight) -- --------------------------------------------------------------------------- *************** *** 114,129 **** function DrawLastPoint(drawDC) ! if #pointsList < 1 then return end ! local listValue = pointsList[#pointsList] ! if #listValue < 2 then return end ! ! local pen = TableToPen(listValue.pen) ! drawDC:SetPen(pen) ! pen:Delete() ! ! local pt1 = listValue[#listValue-1] ! local pt2 = listValue[#listValue] ! drawDC:DrawLine(pt1.x, pt1.y, pt2.x, pt2.y) end --- 114,130 ---- function DrawLastPoint(drawDC) ! if #pointsList >= 1 then ! local listValue = pointsList[#pointsList] ! local count = #listValue ! if count > 1 then ! local pen = TableToPen(listValue.pen) ! drawDC:SetPen(pen) ! pen:Delete() ! local pt1 = listValue[count-1] ! local pt2 = listValue[count] ! drawDC:DrawLine(pt1.x, pt1.y, pt2.x, pt2.y) ! end ! end end *************** *** 142,152 **** local dc = wx.wxPaintDC(panel) - if redrawRequired and bitmap and bitmap:Ok() then - DrawBitmap(bitmap) - end - - redrawRequired = false -- reset since we at least tried to redraw it - if bitmap and bitmap:Ok() then dc:DrawBitmap(bitmap, 0, 0, false) end --- 143,152 ---- local dc = wx.wxPaintDC(panel) if bitmap and bitmap:Ok() then + if redrawRequired then + DrawBitmap(bitmap) + redrawRequired = false + end + dc:DrawBitmap(bitmap, 0, 0, false) end *************** *** 336,341 **** local editMenu = wx.wxMenu() ! editMenu:Append(ID_PENCOLOUR, "Set &Color\tCtrl+R", "Set the color of the pen to draw with") ! editMenu:Append(ID_PENWIDTH, "Set &Width\tCtrl+T", "Set width of the pen to draw with") -- Styles really only work for long lines, when you change direction the styles -- blur into each other and just look like a solid line. --- 336,341 ---- local editMenu = wx.wxMenu() ! editMenu:Append(ID_PENCOLOUR, "Set pen &Color\tCtrl+R", "Set the color of the pen to draw with") ! editMenu:Append(ID_PENWIDTH, "Set pen &Width\tCtrl+T", "Set width of the pen to draw with") -- Styles really only work for long lines, when you change direction the styles -- blur into each other and just look like a solid line. *************** *** 365,376 **** toolBar:AddToolSimple(wx.wxID_UNDO, "Undo", wx.wxArtProvider_GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last line drawn") toolBar:AddSeparator() ! local bmp = CreateToolBarColourBitmap(toolBmpSize) ! toolBar:AddToolSimple(ID_PENCOLOUR, "Color", bmp, "Set pen color") ! bmp:Delete() penWidthSpinCtrl = wx.wxSpinCtrl(toolBar, ID_PENWIDTH_SPINCTRL, 3, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSP_ARROW_KEYS, 1, 100, 3) penWidthSpinCtrl:SetToolTip("Set pen width in pixels") toolBar:AddControl(penWidthSpinCtrl) toolBar:Realize() --- 365,433 ---- toolBar:AddToolSimple(wx.wxID_UNDO, "Undo", wx.wxArtProvider_GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last line drawn") toolBar:AddSeparator() ! penWidthSpinCtrl = wx.wxSpinCtrl(toolBar, ID_PENWIDTH_SPINCTRL, 3, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSP_ARROW_KEYS, 1, 100, 3) + local w, h = penWidthSpinCtrl:GetSize() + penWidthSpinCtrl:SetSize(3*h, -1) penWidthSpinCtrl:SetToolTip("Set pen width in pixels") toolBar:AddControl(penWidthSpinCtrl) + toolBar:AddSeparator() + + local bmp = CreateToolBarColourBitmap(toolBmpSize) + toolBar:AddToolSimple(ID_PENCOLOUR, "Color", bmp, "Choose pen color") + bmp:Delete() + -- Create a custom control to choose some common colours. + local colourWin_height = math.floor(h/2)*2 -- round to be divisible by two + local colourWin = wx.wxControl(toolBar, wx.wxID_ANY, + wx.wxDefaultPosition, wx.wxSize(4*colourWin_height, colourWin_height), + wx.wxBORDER_NONE) + local colourWinColours = { + "black", "grey", "brown", "red", "orange", "green", "blue", "violet", + "white", "light grey", "tan", "pink", "yellow", "turquoise", "sky blue", "maroon" + } + local colourWinBmp = wx.wxEmptyBitmap(4*colourWin_height, colourWin_height) + do + local memDC = wx.wxMemoryDC() + memDC:SelectObject(colourWinBmp) + memDC:SetPen(wx.wxBLACK_PEN) + local w, h = colourWin:GetClientSize() + local w2 = math.floor(w/8) + local h2 = math.floor(h/2) + + for j = 1, 2 do + for i = 1, 8 do + local colour = wx.wxNamedColour(colourWinColours[i + 8*(j-1)]) + local brush = wx.wxBrush(colour, wx.wxSOLID) + memDC:SetBrush(brush) + memDC:DrawRectangle(w2*(i-1), h2*(j-1), w2, h2) + brush:Delete() + colour:Delete() + end + end + memDC:SelectObject(wx.wxNullBitmap) + memDC:Delete() + end + + colourWin:Connect(wx.wxEVT_ERASE_BACKGROUND, + function(event) + local dc = wx.wxClientDC(colourWin) + dc:DrawBitmap(colourWinBmp, 0, 0, false) -- this is our background + dc:Delete() + end) + colourWin:Connect(wx.wxEVT_LEFT_DOWN, + function(event) + local x, y = event:GetPositionXY() + local w, h = colourWin:GetClientSize() + local i = math.floor(8*x/w)+1 + 8*math.floor(2*y/h) + if colourWinColours[i] then + local c = wx.wxNamedColour(colourWinColours[i]) + currentPen:SetColour(c) + c:Delete() + end + end) + toolBar:AddControl(colourWin) + + -- once all the tools are added, layout all the tools toolBar:Realize() *************** *** 478,490 **** -- ----------------------------------------------------------------------- ! -- End menu events frame:Connect(ID_PENCOLOUR, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local oldColour = currentPen:GetColour() ! local c = wx.wxGetColourFromUser(frame, currentPen:GetColour(), "wxLua Scribble") oldColour:Delete() ! if c:Ok() then currentPen:SetColour(c) end --- 535,547 ---- -- ----------------------------------------------------------------------- ! -- Edit menu events frame:Connect(ID_PENCOLOUR, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) local oldColour = currentPen:GetColour() ! local c = wx.wxGetColourFromUser(frame, oldColour, "wxLua Scribble") oldColour:Delete() ! if c:Ok() then -- returns invalid colour if canceled currentPen:SetColour(c) end *************** *** 496,500 **** local ret = wx.wxGetNumberFromUser("Select pen width in pixels", "Width", "wxLua Scribble", currentPen:GetWidth(), 1, 100, frame) ! if ret > 0 then currentPen:SetWidth(ret) end --- 553,557 ---- local ret = wx.wxGetNumberFromUser("Select pen width in pixels", "Width", "wxLua Scribble", currentPen:GetWidth(), 1, 100, frame) ! if ret > 0 then -- returns -1 if canceled currentPen:SetWidth(ret) end *************** *** 564,568 **** bitmap:Delete() bitmap = nil ! -- ensure the event is passed on so that it is handled event:Skip() end --- 621,625 ---- bitmap:Delete() bitmap = nil ! -- ensure the event is skipped to allow the frame to close event:Skip() end |
From: John L. <jr...@us...> - 2007-04-17 18:10:13
|
Update of /cvsroot/wxlua/wxLua/build/msw In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18006/msw Modified Files: wxLua.dsw Log Message: Remove dependencies between the libs to fix LNK4006 warning for MSVC 6 Index: wxLua.dsw =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/wxLua.dsw,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxLua.dsw 19 Dec 2006 22:24:11 -0000 1.17 --- wxLua.dsw 17 Apr 2007 18:10:08 -0000 1.18 *************** *** 156,162 **** Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name mod_lua - End Project Dependency }}} --- 156,159 ---- *************** *** 171,180 **** Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name mod_lua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxlua - End Project Dependency }}} --- 168,171 ---- *************** *** 189,201 **** Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name mod_lua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxlua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxbind - End Project Dependency }}} --- 180,183 ---- *************** *** 210,219 **** Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name mod_lua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxlua - End Project Dependency }}} --- 192,195 ---- *************** *** 228,240 **** Package=<4> {{{ - Begin Project Dependency - Project_Dep_Name mod_lua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxlua - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_wxluadebug - End Project Dependency }}} --- 204,207 ---- |
From: John L. <jr...@us...> - 2007-04-16 15:06:03
|
Update of /cvsroot/wxlua/wxLua/build/bakefiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17055/bakefiles Modified Files: wxluabase.bkl Log Message: Add the media lib to wx-alllibs-req-bywxlua tag Index: wxluabase.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/bakefiles/wxluabase.bkl,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxluabase.bkl 13 Feb 2007 18:43:11 -0000 1.35 --- wxluabase.bkl 16 Apr 2007 15:05:58 -0000 1.36 *************** *** 211,215 **** <wx-lib>xrc</wx-lib> <wx-lib>html</wx-lib> ! <!-- <wx-lib>media</wx-lib> --> <wx-lib>adv</wx-lib> <wx-lib>net</wx-lib> --- 211,215 ---- <wx-lib>xrc</wx-lib> <wx-lib>html</wx-lib> ! <wx-lib>media</wx-lib> <wx-lib>adv</wx-lib> <wx-lib>net</wx-lib> |
From: John L. <jr...@us...> - 2007-03-23 04:27:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxlstate.h Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxlbind.h 16 Mar 2007 21:23:47 -0000 1.38 --- wxlbind.h 23 Mar 2007 04:27:23 -0000 1.39 *************** *** 30,38 **** // memory deallocation function, lua's __gc ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_garbageCollect(lua_State *L); // lua 'set table' tag method handler, lua's __newindex ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_setTableFunc(lua_State *L); // lua 'get table' tag method handler, lua's __index ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getTableFunc(lua_State *L); // ---------------------------------------------------------------------------- --- 30,38 ---- // memory deallocation function, lua's __gc ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_garbageCollect(lua_State *L); // lua 'set table' tag method handler, lua's __newindex ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_setTableFunc(lua_State *L); // lua 'get table' tag method handler, lua's __index ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_getTableFunc(lua_State *L); // ---------------------------------------------------------------------------- *************** *** 138,144 **** // Garbage collect and free memory associated with the wxLuaFunction class // lua's __gc metatable function. ! int LUACALL wxLua_lua_gc_wxLuaFunction(lua_State *L); // call a wxLuaFunction, lua's __call metatable function. ! int LUACALL wxLua_lua_call_wxLuaFunction(lua_State *L); // ---------------------------------------------------------------------------- --- 138,144 ---- // Garbage collect and free memory associated with the wxLuaFunction class // lua's __gc metatable function. ! int LUACALL wxlua_gc_wxLuaFunction(lua_State *L); // call a wxLuaFunction, lua's __call metatable function. ! int LUACALL wxlua_call_wxLuaFunction(lua_State *L); // ---------------------------------------------------------------------------- Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** wxlstate.h 23 Mar 2007 00:09:35 -0000 1.64 --- wxlstate.h 23 Mar 2007 04:27:23 -0000 1.65 *************** *** 113,158 **** // Create a reference to the object at stack index in the // wxLuaReferences registry table, returns the table index. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tinsert(lua_State* L, int stack_idx); // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tremove(lua_State* L, int wxlref_index); // Push onto the top of the stack the object at the index in the // wxLuaReferences registry table, if the index is LUA_REFNIL or the // value is nil return false and don't leave anything on the stack. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int wxlref_index); // Push the errorMsg on the stack and call lua_error ! WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); // Push the object u onto the top of the stack as a userdata of type tag // and set the metatable to the object at tget(tag) ! WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); // Get the tag of the object at the stack index using the metatable's "tag" key. // returns TLUA_NOTAG if no tag ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int stack_idx); // Get the userdata at the stack index, if null_ptr then set the userdata pointer // in lua to NULL so that lua won't gc it. ! WXDLLIMPEXP_WXLUA void* LUACALL wxLua_lua_ttouserdata(lua_State* L, int stack_idx, bool null_ptr = false); // Allocate a new table (metatable) tinsert it into the wxLuaReferences registry table // and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewtag(lua_State* L); // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences // registry table and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to tget(tag) ! WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); // Set a metamethod for the metatable referenced by tag with the supplied name and function. // if pClass is non-null set the upvalue of the function to the supplied class ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, ! lua_CFunction func, void* pClass = NULL); // Push the "wxLuaReferences" string onto the stack. This is the name of a // table in the LUA_REGISTRYINDEX that is indexed on the "tags" and each item // is a metatable for classes or a reference to an object we want to keep a handle to. ! #define wxLua_lua_push_wxLuaReferences(L) lua_pushlstring(L, "wxLuaReferences", 15) // Push the "wxLuaClasses" string onto the stack. This is the name of a // table in the LUA_REGISTRYINDEX that is t[WXLUACLASS.name] = WXLUACLASS // where the WXLUACLASS is a lightuserdata. ! #define wxLua_lua_push_wxLuaClasses(L) lua_pushlstring(L, "wxLuaClasses", 12) --- 113,158 ---- // Create a reference to the object at stack index in the // wxLuaReferences registry table, returns the table index. ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_tinsert(lua_State* L, int stack_idx); // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tremove(lua_State* L, int wxlref_index); // Push onto the top of the stack the object at the index in the // wxLuaReferences registry table, if the index is LUA_REFNIL or the // value is nil return false and don't leave anything on the stack. ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tget(lua_State* L, int wxlref_index); // Push the errorMsg on the stack and call lua_error ! WXDLLIMPEXP_WXLUA void LUACALL wxlua_terror(lua_State* L, const char* errorMsg); // Push the object u onto the top of the stack as a userdata of type tag // and set the metatable to the object at tget(tag) ! WXDLLIMPEXP_WXLUA void LUACALL wxlua_tpushusertag(lua_State* L, const void* u, int tag); // Get the tag of the object at the stack index using the metatable's "tag" key. // returns TLUA_NOTAG if no tag ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_ttag(lua_State* L, int stack_idx); // Get the userdata at the stack index, if null_ptr then set the userdata pointer // in lua to NULL so that lua won't gc it. ! WXDLLIMPEXP_WXLUA void* LUACALL wxlua_ttouserdata(lua_State* L, int stack_idx, bool null_ptr = false); // Allocate a new table (metatable) tinsert it into the wxLuaReferences registry table // and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_tnewtag(lua_State* L); // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences // registry table and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to tget(tag) ! WXDLLIMPEXP_WXLUA void LUACALL wxlua_tsettag(lua_State* L, int tag); // Set a metamethod for the metatable referenced by tag with the supplied name and function. // if pClass is non-null set the upvalue of the function to the supplied class ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tsettagmethod(lua_State* L, int tag, const char* method, ! lua_CFunction func, void* pClass = NULL); // Push the "wxLuaReferences" string onto the stack. This is the name of a // table in the LUA_REGISTRYINDEX that is indexed on the "tags" and each item // is a metatable for classes or a reference to an object we want to keep a handle to. ! #define wxlua_pushstring_wxLuaReferences(L) lua_pushlstring(L, "wxLuaReferences", 15) // Push the "wxLuaClasses" string onto the stack. This is the name of a // table in the LUA_REGISTRYINDEX that is t[WXLUACLASS.name] = WXLUACLASS // where the WXLUACLASS is a lightuserdata. ! #define wxlua_pushstring_wxLuaClasses(L) lua_pushlstring(L, "wxLuaClasses", 12) *************** *** 162,176 **** // Note: wxLua has a stricter sense of type than lua and we don't want to // always allow coersion between types since oftentimes there's an error. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isstringtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isbooleantype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isenumerationtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isnumbertype(lua_State* L, int stack_idx); ! // After verifying using wxLua_lua_isXXXtype return the value, else call ! // wxLua_lua_terror with a message that's appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) ! WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA long LUACALL wxLua_lua_getenumerationtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA double LUACALL wxLua_lua_getnumbertype(lua_State* L, int stack_idx); // Helper functions to get/set tables of strings and ints --- 162,176 ---- // Note: wxLua has a stricter sense of type than lua and we don't want to // always allow coersion between types since oftentimes there's an error. ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_isstringtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_isbooleantype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_isenumerationtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_isnumbertype(lua_State* L, int stack_idx); ! // After verifying using wxlua_isXXXtype return the value, else call ! // wxlua_terror with a message that's appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) ! WXDLLIMPEXP_WXLUA const char* LUACALL wxlua_getstringtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA bool LUACALL wxlua_getbooleantype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA long LUACALL wxlua_getenumerationtype(lua_State* L, int stack_idx); ! WXDLLIMPEXP_WXLUA double LUACALL wxlua_getnumbertype(lua_State* L, int stack_idx); // Helper functions to get/set tables of strings and ints *************** *** 178,208 **** // This assumes that each numeric entry in the table is a string or number // object or can be converted to a string or number using the ! // wxLua_lua_isstring/numbertype definitions of what is a string or number. // Convert the table at stack index to a "new" array of wxStrings. // Returns a pointer to the array of wxStrings (you need to delete them) // and returns the number of strings in the array in count. ! WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxStringarray(lua_State* L, int stack_idx, int& count); // Adds the table of number indexed strings at stack index to the wxArrayString // Return the number of strings added to the array in count. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& strArray); // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings (you need to delete them) // returns the number of character strings in the array in count. ! WXDLLIMPEXP_WXLUA const char** LUACALL wxLua_lua_getchararray(lua_State* L, int stack_idx, int& count); // Convert the table at stack index to a "new" array of int* numbers. // Return a pointer to the array of ints (you need to delete them) // returns the number of ints in the array in count. ! WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int stack_idx, int& count); // Adds the table at stack index to the wxArrayInt // Return the number of ints added to the array in count. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayInt(lua_State* L, int stack_idx, wxArrayInt& intArray); // Creates a lua table and pushes the strings into it, returns the number of items added // The table is left on the stack ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxArrayStringtable(lua_State* L, const wxArrayString& strArray); // Creates a lua table and pushes the ints into it, returns the number of items added // The table is left on the stack ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxArrayInttable(lua_State* L, const wxArrayInt& intArray); //---------------------------------------------------------------------------- --- 178,208 ---- // This assumes that each numeric entry in the table is a string or number // object or can be converted to a string or number using the ! // wxlua_isstring/numbertype definitions of what is a string or number. // Convert the table at stack index to a "new" array of wxStrings. // Returns a pointer to the array of wxStrings (you need to delete them) // and returns the number of strings in the array in count. ! WXDLLIMPEXP_WXLUA wxString* LUACALL wxlua_getwxStringarray(lua_State* L, int stack_idx, int& count); // Adds the table of number indexed strings at stack index to the wxArrayString // Return the number of strings added to the array in count. ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& strArray); // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings (you need to delete them) // returns the number of character strings in the array in count. ! WXDLLIMPEXP_WXLUA const char** LUACALL wxlua_getchararray(lua_State* L, int stack_idx, int& count); // Convert the table at stack index to a "new" array of int* numbers. // Return a pointer to the array of ints (you need to delete them) // returns the number of ints in the array in count. ! WXDLLIMPEXP_WXLUA int* LUACALL wxlua_getintarray(lua_State* L, int stack_idx, int& count); // Adds the table at stack index to the wxArrayInt // Return the number of ints added to the array in count. ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_getwxArrayInt(lua_State* L, int stack_idx, wxArrayInt& intArray); // Creates a lua table and pushes the strings into it, returns the number of items added // The table is left on the stack ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_pushwxArrayStringtable(lua_State* L, const wxArrayString& strArray); // Creates a lua table and pushes the ints into it, returns the number of items added // The table is left on the stack ! WXDLLIMPEXP_WXLUA int LUACALL wxlua_pushwxArrayInttable(lua_State* L, const wxArrayInt& intArray); //---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-03-23 04:27:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** wxlstate.cpp 23 Mar 2007 00:09:36 -0000 1.93 --- wxlstate.cpp 23 Mar 2007 04:27:23 -0000 1.94 *************** *** 71,75 **** // ---------------------------------------------------------------------------- ! int LUACALL wxLua_lua_printFunction( lua_State *L ) { wxLuaState wxlState(L); // doesn't have to be ok --- 71,75 ---- // ---------------------------------------------------------------------------- ! int LUACALL wxlua_printFunction( lua_State *L ) { [...1324 lines suppressed...] --- 2366,2370 ---- { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! return wxlua_getintarray(M_WXLSTATEDATA->m_lua_State, stack_idx, count); } *************** *** 2372,2376 **** { wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); ! return wxLua_lua_getwxArrayInt(M_WXLSTATEDATA->m_lua_State, stack_idx, intArray); } --- 2372,2376 ---- { wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); ! return wxlua_getwxArrayInt(M_WXLSTATEDATA->m_lua_State, stack_idx, intArray); } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** wxlbind.cpp 23 Mar 2007 00:09:36 -0000 1.58 --- wxlbind.cpp 23 Mar 2007 04:27:23 -0000 1.59 *************** *** 56,60 **** // A function object needs to be deleted because the object is being // garbage collected. ! int LUACALL wxLua_lua_gc_wxLuaFunction(lua_State *L) { wxLuaState wxlState(L); --- 56,60 ---- // A function object needs to be deleted because the object is being // garbage collected. ! int LUACALL wxlua_gc_wxLuaFunction(lua_State *L) { wxLuaState wxlState(L); *************** *** 72,76 **** // Handler for the 'function' tag method. ! int LUACALL wxLua_lua_call_wxLuaFunction(lua_State *L) { wxLuaState wxlState(L); --- 72,76 ---- // Handler for the 'function' tag method. ! int LUACALL wxlua_call_wxLuaFunction(lua_State *L) { wxLuaState wxlState(L); *************** *** 232,249 **** // ---------------------------------------------------------------------------- ! // wxLua_lua_tableErrorHandler // ---------------------------------------------------------------------------- ! static int LUACALL wxLua_lua_tableErrorHandler(lua_State *L) { ! wxLua_lua_terror(L, "Cannot modify read-only wxLua table"); return 0; } // ---------------------------------------------------------------------------- ! // wxLua_lua_garbageCollect - if the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxLua_lua_garbageCollect(lua_State *L) { wxLuaState wxlState(L); --- 232,249 ---- // ---------------------------------------------------------------------------- ! // wxlua_tableErrorHandler // ---------------------------------------------------------------------------- ! static int LUACALL wxlua_tableErrorHandler(lua_State *L) { ! wxlua_terror(L, "Cannot modify read-only wxLua table"); return 0; } // ---------------------------------------------------------------------------- ! // wxlua_garbageCollect - if the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxlua_garbageCollect(lua_State *L) { wxLuaState wxlState(L); *************** *** 261,265 **** key = (long)wxlState.ttouserdata(1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxLua_lua_garbageCollect")); //tracked = --- 261,265 ---- key = (long)wxlState.ttouserdata(1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxlua_garbageCollect")); //tracked = *************** *** 270,274 **** if (it != pDerivedList.end()) { ! //wxPrintf(wxT("wxLua_lua_garbageCollect - Derived GC '%s'\n"), lua2wx(pClass->name).c_str()); wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; --- 270,274 ---- if (it != pDerivedList.end()) { ! //wxPrintf(wxT("wxlua_garbageCollect - Derived GC '%s'\n"), lua2wx(pClass->name).c_str()); wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; *************** *** 278,286 **** pDerivedList.erase(it); } ! //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); } ! //else wxPrintf(wxT("wxLua_lua_garbageCollect - NULL WXLUACLASS!\n")); ! //wxPrintf(wxT("wxLua_lua_garbageCollect - '%s' tag %d lua %d key %ld tracked %d return value %d\n"), // lua2wx(pClass ? pClass->name : "").c_str(), pClass ? *pClass->class_tag : 0, (int)L, key, (int)tracked, retVal); --- 278,286 ---- pDerivedList.erase(it); } ! //else wxPrintf(wxT("wxlua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); } ! //else wxPrintf(wxT("wxlua_garbageCollect - NULL WXLUACLASS!\n")); ! //wxPrintf(wxT("wxlua_garbageCollect - '%s' tag %d lua %d key %ld tracked %d return value %d\n"), // lua2wx(pClass ? pClass->name : "").c_str(), pClass ? *pClass->class_tag : 0, (int)L, key, (int)tracked, retVal); *************** *** 289,293 **** // ---------------------------------------------------------------------------- ! // wxLua_lua_getTableFunc // // Called by LUA to find the method that corresponds to a given method name. --- 289,293 ---- // ---------------------------------------------------------------------------- ! // wxlua_getTableFunc // // Called by LUA to find the method that corresponds to a given method name. *************** *** 301,305 **** #define CALL_BASECLASS_FUNC_LEN 5 ! int LUACALL wxLua_lua_getTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 301,305 ---- #define CALL_BASECLASS_FUNC_LEN 5 ! int LUACALL wxlua_getTableFunc(lua_State *L) { wxLuaState wxlState(L); *************** *** 371,375 **** //if (lua2wx(funcName).Find(wxT("OnBeginDocument")) != -1) ! // wxPrintf(wxT("wxLua_lua_getTableFunc func '%s' pClass %d '%s', userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d call base %d\n"), // lua2wx(funcName).c_str(), (long)pClass, pClass ? lua2wx(pClass->name).c_str() : wxT(""), init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData(), (int)wxlState.GetCallBaseClassFunction()); --- 371,375 ---- //if (lua2wx(funcName).Find(wxT("OnBeginDocument")) != -1) ! // wxPrintf(wxT("wxlua_getTableFunc func '%s' pClass %d '%s', userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d call base %d\n"), // lua2wx(funcName).c_str(), (long)pClass, pClass ? lua2wx(pClass->name).c_str() : wxT(""), init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData(), (int)wxlState.GetCallBaseClassFunction()); *************** *** 381,385 **** // ---------------------------------------------------------------------------- ! // wxLua_lua_setTableFunc // // Called by LUA to find the method that corresponds to a given method name. --- 381,385 ---- // ---------------------------------------------------------------------------- ! // wxlua_setTableFunc // // Called by LUA to find the method that corresponds to a given method name. *************** *** 388,392 **** // ---------------------------------------------------------------------------- ! int LUACALL wxLua_lua_setTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 388,392 ---- // ---------------------------------------------------------------------------- ! int LUACALL wxlua_setTableFunc(lua_State *L) { wxLuaState wxlState(L); *************** *** 396,400 **** const char *cpIndex = lua_tostring(L, 2); ! //wxPrintf(wxT("wxLua_lua_setTableFunc '%s'\n"), lua2wx(cpIndex).c_str()); if ((pClass != NULL) && lua_isuserdata(L, 1) && --- 396,400 ---- const char *cpIndex = lua_tostring(L, 2); ! //wxPrintf(wxT("wxlua_setTableFunc '%s'\n"), lua2wx(cpIndex).c_str()); if ((pClass != NULL) && lua_isuserdata(L, 1) && *************** *** 545,549 **** // prevent changes from lua scripts ! //wxlState.tsettagmethod(m_wxLuaTable, "__newindex", wxLua_lua_tableErrorHandler); // FIXME allow this? } else --- 545,549 ---- // prevent changes from lua scripts ! //wxlState.tsettagmethod(m_wxLuaTable, "__newindex", wxlua_tableErrorHandler); // FIXME allow this? } else *************** *** 584,590 **** static const luaL_reg s_funcTable[] = { ! {"__gc", wxLua_lua_garbageCollect }, ! {"__index", wxLua_lua_getTableFunc }, ! {"__newindex", wxLua_lua_setTableFunc } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); --- 584,590 ---- static const luaL_reg s_funcTable[] = { ! {"__gc", wxlua_garbageCollect }, ! {"__index", wxlua_getTableFunc }, ! {"__newindex", wxlua_setTableFunc } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); *************** *** 615,619 **** // store a lookup table for the class tags to WXLUACLASS structs ! wxLua_lua_tget(L, *pClass->class_tag); lua_pushstring(L, "WXLUACLASS"); lua_pushlightuserdata(L, (void *)pClass); --- 615,619 ---- // store a lookup table for the class tags to WXLUACLASS structs ! wxlua_tget(L, *pClass->class_tag); lua_pushstring(L, "WXLUACLASS"); lua_pushlightuserdata(L, (void *)pClass); *************** *** 622,626 **** // store a lookup table for the class names to WXLUACLASS structs ! wxLua_lua_push_wxLuaClasses(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the classes table) --- 622,626 ---- // store a lookup table for the class names to WXLUACLASS structs ! wxlua_pushstring_wxLuaClasses(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the classes table) |
From: John L. <jr...@us...> - 2007-03-23 04:27:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** wxldebug.cpp 23 Mar 2007 00:09:36 -0000 1.28 --- wxldebug.cpp 23 Mar 2007 04:27:24 -0000 1.29 *************** *** 377,381 **** lua_State* L = wxlState.GetLuaState(); ! int nTag = wxLua_lua_ttag(L, index); int nItems = luaL_getn(L, index); const void *pItem = lua_topointer(L, index); --- 377,381 ---- lua_State* L = wxlState.GetLuaState(); ! int nTag = wxlua_ttag(L, index); int nItems = luaL_getn(L, index); const void *pItem = lua_topointer(L, index); |
From: John L. <jr...@us...> - 2007-03-23 04:27:26
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/modules/wxbind/src Modified Files: gdi.cpp wxlprint.cpp Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxlprint.cpp 7 Feb 2007 04:56:24 -0000 1.14 --- wxlprint.cpp 23 Mar 2007 04:27:23 -0000 1.15 *************** *** 116,120 **** // // wxLuaPrintout::OnBeginDocument 1 call base 0 ! // wxLua_lua_getTableFunc func 'base_OnBeginDocument' pClass -1220355700 'wxLuaPrintout', userdata 1, lightuserdata 0, ttag 207, class_tag 207 lua_State 139252808 wxLuaStateRefData 139155808 call base 1 // wxLua_wxPrintout_OnBeginDocument 1 (this is the wxLua binding function for wxPrintout::OnBeginDocument) // wxLuaPrintout::OnBeginDocument 1 call base 1 --- 116,120 ---- // // wxLuaPrintout::OnBeginDocument 1 call base 0 ! // wxlua_getTableFunc func 'base_OnBeginDocument' pClass -1220355700 'wxLuaPrintout', userdata 1, lightuserdata 0, ttag 207, class_tag 207 lua_State 139252808 wxLuaStateRefData 139155808 call base 1 // wxLua_wxPrintout_OnBeginDocument 1 (this is the wxLua binding function for wxPrintout::OnBeginDocument) // wxLuaPrintout::OnBeginDocument 1 call base 1 Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** gdi.cpp 19 Mar 2007 03:47:18 -0000 1.56 --- gdi.cpp 23 Mar 2007 04:27:22 -0000 1.57 *************** *** 7420,7424 **** int count = 0; ! const char **sizeArray = wxLua_lua_getchararray(L, 1, count); if (sizeArray != NULL) { --- 7420,7424 ---- int count = 0; ! const char **sizeArray = wxlua_getchararray(L, 1, count); if (sizeArray != NULL) { |
From: John L. <jr...@us...> - 2007-03-23 04:27:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** wxbind.h 17 Mar 2007 19:08:13 -0000 1.63 --- wxbind.h 23 Mar 2007 04:27:22 -0000 1.64 *************** *** 454,460 **** #endif // wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)) ! #if wxLUA_USE_wxList #include "wx/list.h" ! #endif // wxLUA_USE_wxList #if wxLUA_USE_wxListBox && wxUSE_LISTBOX --- 454,460 ---- #endif // wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)) ! #if wxLUA_USE_wxList && !wxUSE_STL #include "wx/list.h" ! #endif // wxLUA_USE_wxList && !wxUSE_STL #if wxLUA_USE_wxListBox && wxUSE_LISTBOX *************** *** 1755,1759 **** #endif // wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)) ! #if wxLUA_USE_wxList extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxList; extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxList_methods[]; --- 1755,1759 ---- #endif // wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)) ! #if wxLUA_USE_wxList && !wxUSE_STL extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxList; extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxList_methods[]; *************** *** 1762,1766 **** extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxNode_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxNode_methodCount; ! #endif // wxLUA_USE_wxList #if wxLUA_USE_wxListBox && wxUSE_LISTBOX --- 1762,1766 ---- extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxNode_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxNode_methodCount; ! #endif // wxLUA_USE_wxList && !wxUSE_STL #if wxLUA_USE_wxListBox && wxUSE_LISTBOX *************** *** 2238,2246 **** #endif // wxLUA_USE_wxValidator && wxUSE_VALIDATORS ! #if wxLUA_USE_wxWindowList extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxWindowList; extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxWindowList_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxWindowList_methodCount; ! #endif // wxLUA_USE_wxWindowList #if wxLUA_USE_wxXMLResource && wxUSE_XML --- 2238,2246 ---- #endif // wxLUA_USE_wxValidator && wxUSE_VALIDATORS ! #if wxLUA_USE_wxWindowList && !wxUSE_STL extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxWindowList; extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxWindowList_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxWindowList_methodCount; ! #endif // wxLUA_USE_wxWindowList && !wxUSE_STL #if wxLUA_USE_wxXMLResource && wxUSE_XML |
From: John L. <jr...@us...> - 2007-03-23 04:27:25
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24349/wxLua/bindings/wxwidgets Modified Files: override.hpp Log Message: Renamed all 'C' functions from wxLua_lua_XXX to just wxlua_XXX to shorten them and match lua's lua_XXX function convention. Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** override.hpp 15 Mar 2007 00:01:12 -0000 1.64 --- override.hpp 23 Mar 2007 04:27:22 -0000 1.65 *************** *** 1941,1945 **** wxString returns; // const wxString& prefix ! wxString prefix = lua2wx(wxLua_lua_getstringtype(L, 1)); // call wxGetTempFileName returns = wxGetTempFileName(prefix, NULL); --- 1941,1945 ---- wxString returns; // const wxString& prefix ! wxString prefix = lua2wx(wxlua_getstringtype(L, 1)); // call wxGetTempFileName returns = wxGetTempFileName(prefix, NULL); *************** *** 2525,2529 **** int count = 0; ! const char **sizeArray = wxLua_lua_getchararray(L, 1, count); if (sizeArray != NULL) { --- 2525,2529 ---- int count = 0; ! const char **sizeArray = wxlua_getchararray(L, 1, count); if (sizeArray != NULL) { |
From: John L. <jr...@us...> - 2007-03-23 00:09:56
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18290/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: change tget to not push nil on the stack if it fails since we'd never use it store the WXLUACLASS in our wxLuaReferences LUA_REGISTRY table to allow lookup by tag store the WXLUACLASS in our wxLuaClasses LUA_REGISTRY table to allow lookup by name use lua_createtable for pushing wxArrayInt/String to preallocate them don't call lua_objlen on the tables for getting wxArrayInt/String since objlen traverses it so why do it twice. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** wxlstate.h 21 Mar 2007 23:43:12 -0000 1.63 --- wxlstate.h 23 Mar 2007 00:09:35 -0000 1.64 *************** *** 116,122 **** // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference); // Push onto the top of the stack the object at the index in the ! // wxLuaReferences registry table, returns success. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int wxlref_index); // Push the errorMsg on the stack and call lua_error --- 116,123 ---- // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tremove(lua_State* L, int wxlref_index); // Push onto the top of the stack the object at the index in the ! // wxLuaReferences registry table, if the index is LUA_REFNIL or the ! // value is nil return false and don't leave anything on the stack. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int wxlref_index); // Push the errorMsg on the stack and call lua_error *************** *** 125,129 **** // and set the metatable to the object at tget(tag) WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); ! // Get the tag of the object at the stack index, returns TLUA_NOTAG if no tag WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int stack_idx); // Get the userdata at the stack index, if null_ptr then set the userdata pointer --- 126,131 ---- // and set the metatable to the object at tget(tag) WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); ! // Get the tag of the object at the stack index using the metatable's "tag" key. ! // returns TLUA_NOTAG if no tag WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int stack_idx); // Get the userdata at the stack index, if null_ptr then set the userdata pointer *************** *** 141,158 **** // Set a metamethod for the metatable referenced by tag with the supplied name and function. // if pClass is non-null set the upvalue of the function to the supplied class ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); ! // Push the "wxLuaReferences" string onto the stack ! WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_push_wxLuaReferences(lua_State* L); ! // Helper functions to get numbers, booleans and strings safer ! // Validate that the object at the stack index specified is a string, bool, // enum, or double number object or that the object can be converted to it. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isbooleantype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isenumerationtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isnumbertype(lua_State* L, int stack_idx); ! // After verifying using wxLua_lua_isXXXtype return the value, else calls ! // WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int stack_idx); --- 143,172 ---- // Set a metamethod for the metatable referenced by tag with the supplied name and function. // if pClass is non-null set the upvalue of the function to the supplied class ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, ! lua_CFunction func, void* pClass = NULL); ! // Push the "wxLuaReferences" string onto the stack. This is the name of a ! // table in the LUA_REGISTRYINDEX that is indexed on the "tags" and each item ! // is a metatable for classes or a reference to an object we want to keep a handle to. ! #define wxLua_lua_push_wxLuaReferences(L) lua_pushlstring(L, "wxLuaReferences", 15) ! // Push the "wxLuaClasses" string onto the stack. This is the name of a ! // table in the LUA_REGISTRYINDEX that is t[WXLUACLASS.name] = WXLUACLASS ! // where the WXLUACLASS is a lightuserdata. ! #define wxLua_lua_push_wxLuaClasses(L) lua_pushlstring(L, "wxLuaClasses", 12) ! ! ! // Helper functions to get numbers, booleans and strings safer. ! // These validate that the object at the stack index specified is a string, bool, // enum, or double number object or that the object can be converted to it. + // Note: wxLua has a stricter sense of type than lua and we don't want to + // always allow coersion between types since oftentimes there's an error. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isbooleantype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isenumerationtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isnumbertype(lua_State* L, int stack_idx); ! // After verifying using wxLua_lua_isXXXtype return the value, else call ! // wxLua_lua_terror with a message that's appropriate for stack_idx to be a ! // parameter to a function call. (These are used in the bindings) WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int stack_idx); *************** *** 163,173 **** // Validate that the object at the stack index specified is a table object // This assumes that each numeric entry in the table is a string or number ! // object or can be converted to a string or number. // Convert the table at stack index to a "new" array of wxStrings. ! // Return a pointer to the array of wxStrings (you need to delete them) // and returns the number of strings in the array in count. WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxStringarray(lua_State* L, int stack_idx, int& count); ! // Adds the table at stack index to the wxArrayString // Return the number of strings added to the array in count. WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& strArray); --- 177,188 ---- // Validate that the object at the stack index specified is a table object // This assumes that each numeric entry in the table is a string or number ! // object or can be converted to a string or number using the ! // wxLua_lua_isstring/numbertype definitions of what is a string or number. // Convert the table at stack index to a "new" array of wxStrings. ! // Returns a pointer to the array of wxStrings (you need to delete them) // and returns the number of strings in the array in count. WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxStringarray(lua_State* L, int stack_idx, int& count); ! // Adds the table of number indexed strings at stack index to the wxArrayString // Return the number of strings added to the array in count. WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& strArray); *************** *** 181,185 **** WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int stack_idx, int& count); // Adds the table at stack index to the wxArrayInt ! // Return the number of strings added to the array in count. WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayInt(lua_State* L, int stack_idx, wxArrayInt& intArray); --- 196,200 ---- WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int stack_idx, int& count); // Adds the table at stack index to the wxArrayInt ! // Return the number of ints added to the array in count. WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxArrayInt(lua_State* L, int stack_idx, wxArrayInt& intArray); *************** *** 545,549 **** bool tremove(int wxlref_index); // Push onto the top of the stack the object at the index in the ! // wxLuaReferences registry table, returns success. bool tget(int wxlref_index); // Push the errorMsg on the stack and call lua_error --- 560,565 ---- bool tremove(int wxlref_index); // Push onto the top of the stack the object at the index in the ! // wxLuaReferences registry table, if the index is LUA_REFNIL or the ! // value is nil return false and don't leave anything on the stack. bool tget(int wxlref_index); // Push the errorMsg on the stack and call lua_error |
From: John L. <jr...@us...> - 2007-03-23 00:09:56
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18290/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: change tget to not push nil on the stack if it fails since we'd never use it store the WXLUACLASS in our wxLuaReferences LUA_REGISTRY table to allow lookup by tag store the WXLUACLASS in our wxLuaClasses LUA_REGISTRY table to allow lookup by name use lua_createtable for pushing wxArrayInt/String to preallocate them don't call lua_objlen on the tables for getting wxArrayInt/String since objlen traverses it so why do it twice. Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wxldebug.cpp 19 Mar 2007 22:07:27 -0000 1.27 --- wxldebug.cpp 23 Mar 2007 00:09:36 -0000 1.28 *************** *** 241,245 **** else { ! if (wxlState.tget(tableRef) != 0) { int nTop = lua_gettop(L); --- 241,245 ---- else { ! if (wxlState.tget(tableRef)) { int nTop = lua_gettop(L); |
From: John L. <jr...@us...> - 2007-03-23 00:09:56
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18290/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldtarg.cpp Log Message: change tget to not push nil on the stack if it fails since we'd never use it store the WXLUACLASS in our wxLuaReferences LUA_REGISTRY table to allow lookup by tag store the WXLUACLASS in our wxLuaClasses LUA_REGISTRY table to allow lookup by name use lua_createtable for pushing wxArrayInt/String to preallocate them don't call lua_objlen on the tables for getting wxArrayInt/String since objlen traverses it so why do it twice. Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxldtarg.cpp 12 Dec 2006 01:23:40 -0000 1.32 --- wxldtarg.cpp 23 Mar 2007 00:09:36 -0000 1.33 *************** *** 570,574 **** } ! if ((nReference != LUA_NOREF) && (m_wxlState.tget(nReference) != 0)) { m_wxlState.tremove(nReference); --- 570,574 ---- } ! if (m_wxlState.tget(nReference)) { m_wxlState.tremove(nReference); Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** dservice.cpp 19 Mar 2007 03:47:21 -0000 1.30 --- dservice.cpp 23 Mar 2007 00:09:36 -0000 1.31 *************** *** 1261,1265 **** } ! if ((nReference != LUA_NOREF) && (m_wxlState.tget(nReference) != 0)) { m_wxlState.tremove(nReference); --- 1261,1265 ---- } ! if (m_wxlState.tget(nReference)) { m_wxlState.tremove(nReference); |
From: John L. <jr...@us...> - 2007-03-23 00:09:56
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18290/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.cpp Log Message: change tget to not push nil on the stack if it fails since we'd never use it store the WXLUACLASS in our wxLuaReferences LUA_REGISTRY table to allow lookup by tag store the WXLUACLASS in our wxLuaClasses LUA_REGISTRY table to allow lookup by name use lua_createtable for pushing wxArrayInt/String to preallocate them don't call lua_objlen on the tables for getting wxArrayInt/String since objlen traverses it so why do it twice. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** wxlstate.cpp 21 Mar 2007 23:43:12 -0000 1.92 --- wxlstate.cpp 23 Mar 2007 00:09:36 -0000 1.93 *************** *** 289,296 **** } ! lua_pushvalue(L, stack_idx); // get value to store int nTop = lua_gettop(L); // this is where the value is ! wxLua_lua_push_wxLuaReferences(L); // push name of wxLua's reference registry table lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) --- 289,296 ---- } ! lua_pushvalue(L, stack_idx); // push a copy of value to store to top int nTop = lua_gettop(L); // this is where the value is ! wxLua_lua_push_wxLuaReferences(L); // push name of table to get as key lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) *************** *** 300,304 **** // in our refs table ! lua_pop(L, 3); // pop value return table_idx; --- 300,304 ---- // in our refs table ! lua_pop(L, 3); // pop value, table, value return table_idx; *************** *** 307,319 **** bool wxLua_lua_tremove(lua_State* L, int wxlref_index) { ! if (wxlref_index == LUA_REFNIL) return true; ! wxLua_lua_push_wxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) luaL_unref(L, -1, wxlref_index); // remove key and value in refs table // note: this key will be used for the next tinsert ! lua_pop(L, -1); // pop the refs table return true; } --- 307,319 ---- bool wxLua_lua_tremove(lua_State* L, int wxlref_index) { ! if (wxlref_index == LUA_REFNIL) // nothing to remove return true; ! wxLua_lua_push_wxLuaReferences(L); // push name of table to get as key lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) luaL_unref(L, -1, wxlref_index); // remove key and value in refs table // note: this key will be used for the next tinsert ! lua_pop(L, 1); // pop the refs table return true; } *************** *** 321,357 **** bool LUACALL wxLua_lua_tget(lua_State *L, int wxlref_index) { ! if (wxlref_index == LUA_REFNIL) ! { ! lua_pushnil(L); ! return true; ! } ! wxLua_lua_push_wxLuaReferences(L); // push name of wxLua's reference registry table lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) ! /* ! // Note: We used to check that wxlref_index <= length of the table and ! // if it wasn't pushnil. I don't think this is a good idea since ! // the table may have holes in it temporarily. -JL ! bool ret = false; ! lua_pushliteral(L, "n"); // push the key where we store table length ! lua_rawget(L, -2); // pop key, push table value ! int len = (int)lua_tonumber(L, -1); // get result value the length ! lua_pop(L, 1); // pop result ! // ensure ref index in range of table ! if ((wxlref_index > 0) && (wxlref_index <= len)) { ! lua_rawgeti(L, -1, wxlref_index); // push result ! ret = true; } - else - lua_pushnil(L); // push result - */ - - lua_rawgeti(L, -1, wxlref_index); // get table value at wxlref_index - lua_remove(L, -2); // remove wxLua's registry table ! return !lua_isnil(L, -1); // return if table has a valid value at index } --- 321,340 ---- bool LUACALL wxLua_lua_tget(lua_State *L, int wxlref_index) { ! if (wxlref_index == LUA_REFNIL) // nothing to get ! return false; ! wxLua_lua_push_wxLuaReferences(L); // push name of table to get as key lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) ! lua_rawgeti(L, -1, wxlref_index); // get table value at wxlref_index ! lua_remove(L, -2); // remove wxLua's registry table ! if (lua_isnil(L, -1)) // not a valid table key { ! lua_pop(L, 1); ! return false; } ! return true; // return if table has a valid value and it's on the stack } *************** *** 380,385 **** { *ptr = u; ! // try to get the object and set the metatable to the object ! if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) { if (lua_setmetatable(L, -2) == 0) --- 363,368 ---- { *ptr = u; ! // try to get the object's references table and set the metatable to the object ! if (wxLua_lua_tget(L, tag)) { if (lua_setmetatable(L, -2) == 0) *************** *** 393,405 **** int LUACALL wxLua_lua_ttag(lua_State *L, int stack_idx) { ! //wxPrintf(wxT("wxLua_lua_ttag %d"), index); int tag = TLUA_NOTAG; ! if (lua_getmetatable(L, stack_idx) != 0) { //wxPrintf(wxT(" has metatable")); ! lua_pushliteral(L, "tag"); lua_rawget(L, -2); ! if (lua_isnumber(L, -1)) { tag = (int)lua_tonumber(L, -1); --- 376,388 ---- int LUACALL wxLua_lua_ttag(lua_State *L, int stack_idx) { ! //wxPrintf(wxT("wxLua_lua_ttag %d"), stack_idx); int tag = TLUA_NOTAG; ! if (lua_getmetatable(L, stack_idx) != 0) // see tnewtag { //wxPrintf(wxT(" has metatable")); ! lua_pushliteral(L, "tag"); // get t["tag"] lua_rawget(L, -2); ! if (lua_isnumber(L, -1)) // FIXME this is really an error is this ever happens { tag = (int)lua_tonumber(L, -1); *************** *** 430,434 **** { lua_newtable(L); // create a table for our new tag ! lua_pushvalue(L, -1); // push a copy of our new table onto the top of the stack int tag = wxLua_lua_tinsert(L, -1); // insert the table into the wxLuaReferences registry table --- 413,417 ---- { lua_newtable(L); // create a table for our new tag ! lua_pushvalue(L, -1); // push a copy of new table to top of the stack int tag = wxLua_lua_tinsert(L, -1); // insert the table into the wxLuaReferences registry table *************** *** 436,439 **** --- 419,423 ---- lua_pushnumber(L, tag); lua_rawset(L, -3); + lua_pop(L, 1); // pop our new table return tag; *************** *** 442,445 **** --- 426,431 ---- int wxLua_lua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values) { + //if (!weak_keys && !weak_values) return wxLua_lua_tnewtag(L); + lua_newtable(L); // main table lua_newtable(L); // metatable *************** *** 457,461 **** if (weak_values) lua_pushliteral(L, "v"); ! else lua_pushnil(L); } --- 443,447 ---- if (weak_values) lua_pushliteral(L, "v"); ! else // yeah, we really shouldn't reach here lua_pushnil(L); } *************** *** 464,473 **** lua_rawset(L, -3); // set mode of main table lua_setmetatable(L, -2); // via the metatable ! lua_pushvalue(L, -1); ! int tag = wxLua_lua_tinsert(L, -1); ! lua_pushliteral(L, "tag"); lua_pushnumber(L, tag); lua_rawset(L, -3); ! lua_pop(L, 1); return tag; } --- 450,462 ---- lua_rawset(L, -3); // set mode of main table lua_setmetatable(L, -2); // via the metatable ! ! lua_pushvalue(L, -1); // push a copy of main table to top of stack ! int tag = wxLua_lua_tinsert(L, -1); // insert the table into the wxLuaReferences registry table ! ! lua_pushliteral(L, "tag"); // add t["tag"] = tag to new table lua_pushnumber(L, tag); lua_rawset(L, -3); ! ! lua_pop(L, 1); // pop our new table return tag; } *************** *** 475,479 **** void LUACALL wxLua_lua_tsettag(lua_State *L, int tag) { ! if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) { if (!lua_setmetatable(L, -2)) --- 464,468 ---- void LUACALL wxLua_lua_tsettag(lua_State *L, int tag) { ! if (wxLua_lua_tget(L, tag)) { if (!lua_setmetatable(L, -2)) *************** *** 482,494 **** } ! bool LUACALL wxLua_lua_tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass /* = NULL*/) { ! if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) { if (pClass != NULL) { ! lua_pushstring(L, method); ! lua_pushlightuserdata(L, pClass); ! lua_pushcclosure(L, func, 1); } else --- 471,484 ---- } ! bool LUACALL wxLua_lua_tsettagmethod(lua_State *L, int tag, const char *method, ! lua_CFunction func, void *pClass /* = NULL*/) { ! if (wxLua_lua_tget(L, tag)) { if (pClass != NULL) { ! lua_pushstring(L, method); // push method name ! lua_pushlightuserdata(L, pClass); // push the userdata ! lua_pushcclosure(L, func, 1); // push func with pClass as upvalue } else *************** *** 497,502 **** lua_pushcclosure(L, func, 0); } ! lua_rawset(L, -3); ! lua_pop(L, 1); return true; } --- 487,492 ---- lua_pushcclosure(L, func, 0); } ! lua_rawset(L, -3); // t["method"] = func ! lua_pop(L, 1); // pop the table from tget we got from the wxLuaReferences registry table return true; } *************** *** 505,513 **** } - void LUACALL wxLua_lua_push_wxLuaReferences(lua_State *L) - { - lua_pushlstring(L, "wxLuaReferences", 15); // exclude trailing \0 - } - bool LUACALL wxLua_lua_isstringtype(lua_State* L, int stack_idx) { --- 495,498 ---- *************** *** 646,664 **** int LUACALL wxLua_lua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& wxarrString) { ! int idx, count = 0; if (lua_istable(L, stack_idx)) { ! int nItems = luaL_getn(L, stack_idx); ! wxarrString.Alloc(nItems); ! ! for (idx = 1; idx <= nItems; ++idx) { ! lua_rawgeti(L, stack_idx, idx); ! if (!wxLua_lua_isstringtype(L, -1)) { wxString msg(wxString::Format(_("wxLua: Expected a table of strings for parameter %d, but table index %d is '%s'."), ! stack_idx, idx, lua2wx(lua_typename(L, lua_type(L, -1))).c_str())); wxLua_lua_terror(L, wx2lua(msg)); return count; --- 631,651 ---- int LUACALL wxLua_lua_getwxArrayString(lua_State* L, int stack_idx, wxArrayString& wxarrString) { ! int count = 0; if (lua_istable(L, stack_idx)) { ! while(1) { ! lua_rawgeti(L, stack_idx, count+1); ! if (lua_isnil(L, -1)) ! { ! lua_pop(L, 1); ! break; ! } ! else if (!wxLua_lua_isstringtype(L, -1)) { wxString msg(wxString::Format(_("wxLua: Expected a table of strings for parameter %d, but table index %d is '%s'."), ! stack_idx, count+1, lua2wx(lua_typename(L, lua_type(L, -1))).c_str())); wxLua_lua_terror(L, wx2lua(msg)); return count; *************** *** 667,671 **** const char *pString = lua_tostring(L, -1); wxarrString.Add(lua2wx(pString)); ! count++; lua_pop(L, 1); --- 654,658 ---- const char *pString = lua_tostring(L, -1); wxarrString.Add(lua2wx(pString)); ! ++count; lua_pop(L, 1); *************** *** 690,694 **** if (lua_istable(L, stack_idx)) { ! int nItems = luaL_getn(L, stack_idx); if (nItems > 0) pItems = new const char *[nItems]; --- 677,681 ---- if (lua_istable(L, stack_idx)) { ! int nItems = lua_objlen(L, stack_idx); if (nItems > 0) pItems = new const char *[nItems]; *************** *** 725,743 **** int LUACALL wxLua_lua_getwxArrayInt(lua_State *L, int stack_idx, wxArrayInt &wxarrInt) { ! int idx, count = 0; if (lua_istable(L, stack_idx)) { ! int nItems = luaL_getn(L, stack_idx); ! wxarrInt.Alloc(nItems); ! ! for (idx = 1; idx <= nItems; ++idx) { ! lua_rawgeti(L, stack_idx, idx); ! if (!wxLua_lua_isnumbertype(L, -1)) { wxString msg(wxString::Format(_("wxLua: Expected a table of integers for parameter %d, but table index %d is '%s'."), ! stack_idx, idx, lua2wx(lua_typename(L, lua_type(L, -1))).c_str())); wxLua_lua_terror(L, wx2lua(msg)); return count; --- 712,732 ---- int LUACALL wxLua_lua_getwxArrayInt(lua_State *L, int stack_idx, wxArrayInt &wxarrInt) { ! int count = 0; if (lua_istable(L, stack_idx)) { ! while(1) { ! lua_rawgeti(L, stack_idx, count+1); ! if (lua_isnil(L, -1)) ! { ! lua_pop(L, 1); ! break; ! } ! else if (!wxLua_lua_isnumbertype(L, -1)) { wxString msg(wxString::Format(_("wxLua: Expected a table of integers for parameter %d, but table index %d is '%s'."), ! stack_idx, count+1, lua2wx(lua_typename(L, lua_type(L, -1))).c_str())); wxLua_lua_terror(L, wx2lua(msg)); return count; *************** *** 763,769 **** int LUACALL wxLua_lua_pushwxArrayStringtable(lua_State *L, const wxArrayString &strArray) { - lua_newtable(L); - size_t idx, count = strArray.GetCount(); for (idx = 0; idx < count; ++idx) { --- 752,758 ---- int LUACALL wxLua_lua_pushwxArrayStringtable(lua_State *L, const wxArrayString &strArray) { size_t idx, count = strArray.GetCount(); + lua_createtable(L, count, 0); + for (idx = 0; idx < count; ++idx) { *************** *** 776,782 **** int LUACALL wxLua_lua_pushwxArrayInttable(lua_State *L, const wxArrayInt &intArray) { - lua_newtable(L); - size_t idx, count = intArray.GetCount(); for (idx = 0; idx < count; ++idx) { --- 765,771 ---- int LUACALL wxLua_lua_pushwxArrayInttable(lua_State *L, const wxArrayInt &intArray) { size_t idx, count = intArray.GetCount(); + lua_createtable(L, count, 0); + for (idx = 0; idx < count; ++idx) { *************** *** 1726,1729 **** --- 1715,1723 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; + // create the wxLuaClasses table in the registry + wxLua_lua_push_wxLuaClasses(L); + lua_newtable(L); + lua_rawset(L, LUA_REGISTRYINDEX); + // create the wxLuaReferences table in registry wxLua_lua_push_wxLuaReferences(L); *************** *** 1798,1801 **** --- 1792,1813 ---- { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); + + lua_State* L = M_WXLSTATEDATA->m_lua_State; + + if (wxLua_lua_tget(L, iClassTag) && lua_istable(L, -1)) + { + lua_pushstring(L, "WXLUACLASS"); // t[iClassTag] = { __gc = WXLUACLASS (or nil if not a class tag) + lua_rawget(L, -2); + const WXLUACLASS* wxlClass = (WXLUACLASS *)lua_touserdata(L, -1); // actually lightuserdata + + lua_pop(L, 2); // pop wxLuaReferences table and lightuserdata (or nil if none) + + return wxlClass; + } + else + return NULL; + + + /* WXLUACLASS classItem; classItem.class_tag = &iClassTag; *************** *** 1818,1821 **** --- 1830,1834 ---- return NULL; + */ } *************** *** 1824,1844 **** wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) ! { ! wxLuaBinding* binding = node->GetData(); ! WXLUACLASS *pLuaClass = (WXLUACLASS *)binding->GetLuaClassList(); ! size_t i, class_count = binding->GetLuaClassCount(); ! for (i = 0; i < class_count; i++) ! { ! if (strcmp(pLuaClass->name, className) == 0) ! return pLuaClass; ! pLuaClass++; ! } ! } ! return NULL; } --- 1837,1852 ---- wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_push_wxLuaClasses(L); ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the classes table) ! lua_pushstring(L, className); // t["className"] = WXLUACLASS (or nil if not a class tag) ! lua_rawget(L, -2); ! const WXLUACLASS* wxlClass = (WXLUACLASS *)lua_touserdata(L, -1); // actually lightuserdata ! lua_pop(L, 2); // pop wxLuaClasses table and lightuserdata ! ! return wxlClass; } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** wxlbind.cpp 21 Mar 2007 05:19:56 -0000 1.57 --- wxlbind.cpp 23 Mar 2007 00:09:36 -0000 1.58 *************** *** 156,160 **** } ! return (m_iReference != LUA_NOREF) && (m_wxlState->tget(m_iReference) != 0); } --- 156,164 ---- } ! if (m_wxlState->tget(m_iReference)) ! return true; ! ! lua_pushnil(L); // oops, put something on the stack ! return false; } *************** *** 610,613 **** --- 614,633 ---- iTag = *pClass->class_tag; + // store a lookup table for the class tags to WXLUACLASS structs + wxLua_lua_tget(L, *pClass->class_tag); + lua_pushstring(L, "WXLUACLASS"); + lua_pushlightuserdata(L, (void *)pClass); + lua_rawset(L, -3); // t[name] = tag + lua_remove(L, -1); // remove wxLua's registry wxLuaClasses table + + // store a lookup table for the class names to WXLUACLASS structs + wxLua_lua_push_wxLuaClasses(L); + lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the classes table) + + lua_pushstring(L, pClass->name); + lua_pushlightuserdata(L, (void *)pClass); + lua_rawset(L, -3); // t[name] = tag + lua_remove(L, -1); // remove wxLua's registry wxLuaClasses table + // set the metatable functions for the classes for (size_t i_func = 0; i_func < s_funcCount; ++i_func) Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wxlcallb.cpp 19 Mar 2007 03:47:21 -0000 1.27 --- wxlcallb.cpp 23 Mar 2007 00:09:36 -0000 1.28 *************** *** 164,168 **** // and set the metatable of the proxy ! if ((iTag != TLUA_NOTAG) && m_wxlState.tget(iTag)) { if (lua_setmetatable(L, -2) == 0) --- 164,168 ---- // and set the metatable of the proxy ! if (m_wxlState.tget(iTag)) { if (lua_setmetatable(L, -2) == 0) |
From: John L. <jr...@us...> - 2007-03-21 23:43:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16781/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Use luaL_ref and luaL_unref in tinsert and tremove so we can remove the m_unusedReferences array in the wxLuaStateData. All tXXX functions are now C functions and don't depend on the wxLuaState. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** wxlstate.cpp 19 Mar 2007 03:47:21 -0000 1.91 --- wxlstate.cpp 21 Mar 2007 23:43:12 -0000 1.92 *************** *** 267,272 **** // ---------------------------------------------------------------------------- ! // txxx functions to make lua calls easier // ---------------------------------------------------------------------------- bool LUACALL wxLua_lua_tget(lua_State *L, int wxlref_index) { --- 267,322 ---- // ---------------------------------------------------------------------------- ! // txxx functions to make wxLua registry table calls easier // ---------------------------------------------------------------------------- + + // Note about luaL_ref and luaL_unref. + // ref creates integer numbers from 1 to ... + // unref uses t[0] to hold the last unused reference and when you call unref + // again the next unused ref points back to the first and t[0] points to the + // last unrefed key. + // eg. create 5 refs, get refs 1,2,3,4,5, then call unref on 3 then 4 then + // call ref 3 times and the new references will be 4, 3, 6 + + int wxLua_lua_tinsert(lua_State* L, int stack_idx) + { + if (lua_isnone(L, stack_idx)) // nothing on stack to insert + return LUA_REFNIL; + + if (lua_isnil(L, stack_idx)) // don't bother inserting nil + { + lua_pop(L, 1); + return LUA_REFNIL; + } + + lua_pushvalue(L, stack_idx); // get value to store + int nTop = lua_gettop(L); // this is where the value is + + wxLua_lua_push_wxLuaReferences(L); // push name of wxLua's reference registry table + lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) + + lua_pushvalue(L, nTop); // push value to store + + int table_idx = luaL_ref(L, -2); // create unique integer reference + // in our refs table + + lua_pop(L, 3); // pop value + + return table_idx; + } + + bool wxLua_lua_tremove(lua_State* L, int wxlref_index) + { + if (wxlref_index == LUA_REFNIL) + return true; + + wxLua_lua_push_wxLuaReferences(L); + lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) + + luaL_unref(L, -1, wxlref_index); // remove key and value in refs table + // note: this key will be used for the next tinsert + lua_pop(L, -1); // pop the refs table + return true; + } + bool LUACALL wxLua_lua_tget(lua_State *L, int wxlref_index) { *************** *** 277,293 **** } ! int table_count; ! bool ret = false; // false indicates index out of range ! ! wxLua_lua_push_wxLuaReferences(L); ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) ! lua_pushliteral(L, "n"); // push 'n' as key ! lua_rawget(L, -2); // pop key, push result ! table_count = (int)lua_tonumber(L, -1); // get result value lua_pop(L, 1); // pop result // ensure ref index in range of table ! if ((wxlref_index > 0) && (wxlref_index <= table_count)) { lua_rawgeti(L, -1, wxlref_index); // push result --- 327,345 ---- } ! wxLua_lua_push_wxLuaReferences(L); // push name of wxLua's reference registry table ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table) ! /* ! // Note: We used to check that wxlref_index <= length of the table and ! // if it wasn't pushnil. I don't think this is a good idea since ! // the table may have holes in it temporarily. -JL ! bool ret = false; ! lua_pushliteral(L, "n"); // push the key where we store table length ! lua_rawget(L, -2); // pop key, push table value ! int len = (int)lua_tonumber(L, -1); // get result value the length lua_pop(L, 1); // pop result // ensure ref index in range of table ! if ((wxlref_index > 0) && (wxlref_index <= len)) { lua_rawgeti(L, -1, wxlref_index); // push result *************** *** 296,334 **** else lua_pushnil(L); // push result ! lua_remove(L, -2); // balance stack ! ! return ret; ! } ! ! int LUACALL wxLua_lua_tgetn(lua_State *L) ! { ! wxLua_lua_push_wxLuaReferences(L); ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) ! ! lua_pushliteral(L, "n"); ! lua_rawget(L, -2); ! int n = 0; ! if (lua_isnumber(L, -1)) ! { ! n = (int)lua_tonumber(L, -1); ! } ! else ! { ! // must count elements ! n = 0; ! for (;;) ! { ! lua_rawgeti(L, -2, ++n); ! bool is_nil = lua_isnil(L, -1); ! lua_pop(L, 1); ! if (is_nil) ! break; ! } ! --n; ! } ! lua_pop(L, 2); ! return n; } --- 348,357 ---- else lua_pushnil(L); // push result + */ ! lua_rawgeti(L, -1, wxlref_index); // get table value at wxlref_index ! lua_remove(L, -2); // remove wxLua's registry table ! return !lua_isnil(L, -1); // return if table has a valid value at index } *************** *** 404,407 **** --- 427,476 ---- } + int wxLua_lua_tnewtag(lua_State* L) + { + lua_newtable(L); // create a table for our new tag + lua_pushvalue(L, -1); // push a copy of our new table onto the top of the stack + int tag = wxLua_lua_tinsert(L, -1); // insert the table into the wxLuaReferences registry table + + lua_pushliteral(L, "tag"); // add t["tag"] = tag to new table + lua_pushnumber(L, tag); + lua_rawset(L, -3); + lua_pop(L, 1); // pop our new table + return tag; + } + + int wxLua_lua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values) + { + lua_newtable(L); // main table + lua_newtable(L); // metatable + + // for metatable.__weak = k for weak keys, v for weak values + if (weak_keys) + { + if (weak_values) + lua_pushliteral(L, "kv"); + else + lua_pushliteral(L, "k"); + } + else + { + if (weak_values) + lua_pushliteral(L, "v"); + else + lua_pushnil(L); + } + + lua_pushliteral(L, "__mode"); + lua_rawset(L, -3); // set mode of main table + lua_setmetatable(L, -2); // via the metatable + lua_pushvalue(L, -1); + int tag = wxLua_lua_tinsert(L, -1); + lua_pushliteral(L, "tag"); + lua_pushnumber(L, tag); + lua_rawset(L, -3); + lua_pop(L, 1); + return tag; + } + void LUACALL wxLua_lua_tsettag(lua_State *L, int tag) { *************** *** 2027,2084 **** { wxCHECK_MSG(Ok(), LUA_REFNIL, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! ! if (lua_isnone(L, stack_idx)) ! return LUA_REFNIL; ! ! if (lua_isnil(L, stack_idx)) ! { ! lua_pop(L, 1); ! return LUA_REFNIL; ! } ! ! int table_idx = 0; ! ! lua_pushvalue(L, stack_idx); // get value to store ! int nTop = lua_gettop(L); ! ! wxLua_lua_push_wxLuaReferences(L); ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result ! ! if (M_WXLSTATEDATA->m_wxlStateData->m_unusedReferenceIndexes.GetCount() > 0) ! { ! // Use an available, but previously used and removed index from the ! // wxLuaReferences registry table so the index doesn't grow too large. ! // see tremove. ! table_idx = M_WXLSTATEDATA->m_wxlStateData->m_unusedReferenceIndexes.Item(0); ! M_WXLSTATEDATA->m_wxlStateData->m_unusedReferenceIndexes.RemoveAt(0); ! ! lua_pushvalue(L, nTop); // push value to store ! lua_rawseti(L, -2, table_idx); // store value, pop value ! } ! else ! { ! lua_pushliteral(L, "n"); // push 'n' as key ! lua_rawget(L, -2); // pop key, push result ! if (lua_isnil(L, -1)) // table not used before? ! table_idx = 0; ! else ! table_idx = (int)lua_tonumber(L, -1); // get result value ! ! lua_pop(L, 1); // pop result ! ! table_idx++; // next unallocated index ! ! lua_pushvalue(L, nTop); // push value to store ! lua_rawseti(L, -2, table_idx); // store value, pop value ! ! lua_pushliteral(L, "n"); // push key ! lua_pushnumber(L, table_idx); // push value ! lua_rawset(L, -3); // pop key, value ! } ! ! lua_pop(L, 3); // restore stack ! ! return table_idx; } --- 2096,2100 ---- { wxCHECK_MSG(Ok(), LUA_REFNIL, wxT("Invalid wxLuaState")); ! return wxLua_lua_tinsert(M_WXLSTATEDATA->m_lua_State, stack_idx); } *************** *** 2086,2117 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! ! if (wxlref_index == LUA_REFNIL) ! return true; ! ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! ! int table_count; ! bool ret = false; // false indicates index out of range ! ! wxLua_lua_push_wxLuaReferences(L); ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) ! ! lua_pushliteral(L, "n"); // push 'n' as key ! lua_rawget(L, -2); // pop key, push result ! table_count = (int)lua_tonumber(L, -1); // get result value ! lua_pop(L, 1); // pop result ! ! // ensure ref index in range of table ! if ((wxlref_index > 0) && (wxlref_index <= table_count)) ! { ! lua_pushnil(L); // push nil as value ! lua_rawseti(L, -2, wxlref_index); // set table, pop value ! // add the now available index to use for the next tinsert ! M_WXLSTATEDATA->m_wxlStateData->m_unusedReferenceIndexes.Add(wxlref_index); ! ret = true; ! } ! lua_pop(L, 1); // clean up stack ! return ret; } --- 2102,2106 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return wxLua_lua_tremove(M_WXLSTATEDATA->m_lua_State, wxlref_index); } *************** *** 2119,2131 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_tget(L, wxlref_index); ! } ! ! int wxLuaState::tgetn() ! { ! wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_tgetn(L); } --- 2108,2112 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return wxLua_lua_tget(M_WXLSTATEDATA->m_lua_State, wxlref_index); } *************** *** 2133,2138 **** { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_terror(L, errorMsg); } --- 2114,2118 ---- { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! wxLua_lua_terror(M_WXLSTATEDATA->m_lua_State, errorMsg); } *************** *** 2140,2145 **** { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_tpushusertag(L, u, tag); } --- 2120,2124 ---- { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! wxLua_lua_tpushusertag(M_WXLSTATEDATA->m_lua_State, u, tag); } *************** *** 2147,2152 **** { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_ttag(L, stack_idx); } --- 2126,2130 ---- { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! return wxLua_lua_ttag(M_WXLSTATEDATA->m_lua_State, stack_idx); } *************** *** 2154,2159 **** { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_ttouserdata(L, stack_idx, reset); } --- 2132,2136 ---- { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! return wxLua_lua_ttouserdata(M_WXLSTATEDATA->m_lua_State, stack_idx, reset); } *************** *** 2161,2174 **** { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! ! lua_newtable(L); ! lua_pushvalue(L, -1); ! int tag = tinsert(-1); ! lua_pushliteral(L, "tag"); ! lua_pushnumber(L, tag); ! lua_rawset(L, -3); ! lua_pop(L, 1); ! return tag; } --- 2138,2142 ---- { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! return wxLua_lua_tnewtag(M_WXLSTATEDATA->m_lua_State); } *************** *** 2176,2210 **** { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! ! lua_newtable(L); // main table ! lua_newtable(L); // metatable ! ! // for metatable.__weak = k for weak keys, v for weak values ! if (weak_keys) ! { ! if (weak_values) ! lua_pushliteral(L, "kv"); ! else ! lua_pushliteral(L, "k"); ! } ! else ! { ! if (weak_values) ! lua_pushliteral(L, "v"); ! else ! lua_pushnil(L); ! } ! ! lua_pushliteral(L, "__mode"); ! lua_rawset(L, -3); // set mode of main table ! lua_setmetatable(L, -2); // via the metatable ! lua_pushvalue(L, -1); ! int tag = tinsert(-1); ! lua_pushliteral(L, "tag"); ! lua_pushnumber(L, tag); ! lua_rawset(L, -3); ! lua_pop(L, 1); ! return tag; } --- 2144,2148 ---- { wxCHECK_MSG(Ok(), TLUA_NOTAG, wxT("Invalid wxLuaState")); ! return wxLua_lua_tnewweaktag(M_WXLSTATEDATA->m_lua_State, weak_keys, weak_values); } *************** *** 2212,2217 **** { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_tsettag(L, tag); } --- 2150,2154 ---- { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); ! wxLua_lua_tsettag(M_WXLSTATEDATA->m_lua_State, tag); } *************** *** 2219,2224 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_tsettagmethod(L, tag, method, func, pClass); } --- 2156,2160 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return wxLua_lua_tsettagmethod(M_WXLSTATEDATA->m_lua_State, tag, method, func, pClass); } |
From: John L. <jr...@us...> - 2007-03-21 23:43:15
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16781/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Use luaL_ref and luaL_unref in tinsert and tremove so we can remove the m_unusedReferences array in the wxLuaStateData. All tXXX functions are now C functions and don't depend on the wxLuaState. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** wxlstate.h 19 Mar 2007 03:47:21 -0000 1.62 --- wxlstate.h 21 Mar 2007 23:43:12 -0000 1.63 *************** *** 113,125 **** // Create a reference to the object at stack index in the // wxLuaReferences registry table, returns the table index. ! //WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tinsert(lua_State* L, int stack_idx); // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! //WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference); // Push onto the top of the stack the object at the index in the // wxLuaReferences registry table, returns success. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int wxlref_index); - // Get the number of items in the wxLuaReferences registry table - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tgetn(lua_State* L); // Push the errorMsg on the stack and call lua_error WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); --- 113,123 ---- // Create a reference to the object at stack index in the // wxLuaReferences registry table, returns the table index. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tinsert(lua_State* L, int stack_idx); // Remove a reference to the object at the index in the // wxLuaReferences registry table, returns success. ! WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference); // Push onto the top of the stack the object at the index in the // wxLuaReferences registry table, returns success. WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int wxlref_index); // Push the errorMsg on the stack and call lua_error WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); *************** *** 134,142 **** // Allocate a new table (metatable) tinsert it into the wxLuaReferences registry table // and return its index into the ref table. ! //WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewtag(lua_State* L); // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences // registry table and return its index into the ref table. ! //WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to tget(tag) WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); --- 132,140 ---- // Allocate a new table (metatable) tinsert it into the wxLuaReferences registry table // and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewtag(lua_State* L); // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences // registry table and return its index into the ref table. ! WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to tget(tag) WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); *************** *** 226,231 **** // but for an embedded program they must be deleted before // shutting down the interpreter, else they dangle - wxArrayInt m_unusedReferenceIndexes; // array of unused (available) table indicies in the - // wxLuaReferences registry table bool m_is_running; // is the lua_State running a script --- 224,227 ---- *************** *** 551,556 **** // wxLuaReferences registry table, returns success. bool tget(int wxlref_index); - // Get the number of items in the wxLuaReferences registry table - int tgetn(); // Push the errorMsg on the stack and call lua_error void terror(const char *errorMsg) const; --- 547,550 ---- |
From: John L. <jr...@us...> - 2007-03-21 05:20:00
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23802/modules/wxlua/src Modified Files: wxlbind.cpp Log Message: Put proof of concept code for pushing the class constructors as tables with __call metatable or cfunctions with a __index metatable to allow static functions and enums that are class members to be a little nicer in the bindings. Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** wxlbind.cpp 19 Mar 2007 21:56:11 -0000 1.56 --- wxlbind.cpp 21 Mar 2007 05:19:56 -0000 1.57 *************** *** 541,545 **** // prevent changes from lua scripts ! wxlState.tsettagmethod(m_wxLuaTable, "__newindex", wxLua_lua_tableErrorHandler); // FIXME allow this? } else --- 541,545 ---- // prevent changes from lua scripts ! //wxlState.tsettagmethod(m_wxLuaTable, "__newindex", wxLua_lua_tableErrorHandler); // FIXME allow this? } else *************** *** 623,629 **** --- 623,692 ---- if ((pMethod->type == LuaConstructor) || (pMethod->type == LuaGlobal)) { + #if 0 // C++ class constructors are tables and use the __call metatable to make them "functions" + // push name of nested table and create the table + lua_pushstring(L, pMethod->name); + lua_newtable(L); + + // add the items to the table as t[first pushed] = second pushed + lua_pushstring(L, "key"); + lua_pushstring(L, "value"); + lua_rawset(L, -3); // same as lua_setfield(L, -2, "key") + + lua_pushstring(L, "new"); + lua_pushcfunction(L, pMethod->func); + lua_rawset(L, -3); + + + // Create the metatable for this table + //luaL_newmetatable(L, pMethod->func); // we don't need to register it + lua_newtable(L); + + lua_pushstring(L, "__call"); + lua_pushcfunction(L, pMethod->func); + lua_rawset(L, -3); + + //lua_pushstring(L, "__metatable"); + //lua_pushstring(L, "Metatable is not accessible"); + //lua_rawset(L, -3); + + lua_setmetatable(L, -2); + + // add table to the binding table t[pMethod->name] = { this table } + lua_rawset(L, -3); // same as lua_settable(L, tableOffset); + + #elif 0 // C++ constructors are cfunctions, use metatable for access to items. + lua_pushstring(L, pMethod->name); + lua_pushcfunction(L, pMethod->func); + + // Create the metatable for this cfunction + //luaL_newmetatable(L, pMethod->func); // we don't need to register it + lua_newtable(L); + + // create the t[__index] = { table } + lua_pushstring(L, "__index"); + lua_newtable(L); + + // add the items to the table as t[first pushed] = second pushed + lua_pushstring(L, "key"); + lua_pushstring(L, "value"); + lua_rawset(L, -3); // same as lua_setfield(L, -2, "key") + + //set the table + lua_rawset(L, -3); + + //lua_pushstring(L, "__metatable"); + //lua_pushstring(L, "Metatable is not accessible"); + //lua_rawset(L, -3); + + lua_setmetatable(L, -2); + + lua_rawset(L, tableOffset); + + #else // C++ class constructors are cfunctions only + lua_pushstring(L, pMethod->name); lua_pushcfunction(L, pMethod->func); lua_rawset(L, tableOffset); + #endif } } |
From: John L. <jr...@us...> - 2007-03-19 22:07:43
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28550/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: initialize wxString vars with constructor not = Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxldebug.cpp 19 Mar 2007 21:56:11 -0000 1.26 --- wxldebug.cpp 19 Mar 2007 22:07:27 -0000 1.27 *************** *** 157,161 **** { wxString name; ! wxString source = lua2wx(luaDebug.source); if (currentLine == -1) --- 157,161 ---- { wxString name; ! wxString source(lua2wx(luaDebug.source)); if (currentLine == -1) *************** *** 192,196 **** { int idx = 1; ! wxString name = lua2wx(lua_getlocal(L, &luaDebug, idx)); while (!name.IsEmpty()) { --- 192,196 ---- { int idx = 1; ! wxString name(lua2wx(lua_getlocal(L, &luaDebug, idx))); while (!name.IsEmpty()) { *************** *** 199,203 **** wxString type; wxString value; ! wxString source = lua2wx(luaDebug.source); GetTypeValue(wxlState, -1, type, value); --- 199,203 ---- wxString type; wxString value; ! wxString source(lua2wx(luaDebug.source)); GetTypeValue(wxlState, -1, type, value); *************** *** 213,218 **** lua_pop(L, 1); // remove variable value ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(name, type, value, source, nRef, 0); ! Add(item); count++; --- 213,217 ---- lua_pop(L, 1); // remove variable value ! Add(new wxLuaDebugDataItem(name, type, value, source, nRef, 0)); count++; *************** *** 269,274 **** lua_pop(L, 1); ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(name, type, value, source, nRef, nIndex); ! Add(item); count++; } --- 268,272 ---- lua_pop(L, 1); ! Add(new wxLuaDebugDataItem(name, type, value, source, nRef, nIndex)); count++; } *************** *** 299,308 **** case LUA_TBOOLEAN: ! type = wxT("Boolean"); value = MakeBoolean(lua_toboolean(L, index)); break; case LUA_TNUMBER: ! type = wxT("Number"); value = MakeNumber(lua_tonumber(L, index)); break; --- 297,306 ---- case LUA_TBOOLEAN: ! type = wxT("Boolean"); value = MakeBoolean(lua_toboolean(L, index)); break; case LUA_TNUMBER: ! type = wxT("Number"); value = MakeNumber(lua_tonumber(L, index)); break; |
From: John L. <jr...@us...> - 2007-03-19 21:56:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25513/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp Log Message: comment why we remove items from the stack before calling our C functions make wxLuaCheckStack::DumpStack a little nicer by printing types and values Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** wxlbind.cpp 19 Mar 2007 03:47:21 -0000 1.55 --- wxlbind.cpp 19 Mar 2007 21:56:11 -0000 1.56 *************** *** 50,55 **** // remove this line to restore calling methods using the dot notation // otherwise the colon notation *must* be used. ! lua_remove(L, 1); ! return (*m_pMethod->func)(L); } --- 50,54 ---- // remove this line to restore calling methods using the dot notation // otherwise the colon notation *must* be used. ! lua_remove(L, 1); // remove the wxLuaFunction userdata from the stack return (*m_pMethod->func)(L); } *************** *** 349,353 **** if (pMethod->type == LuaGetProp) { ! lua_remove(L, 2); result = (*pMethod->func)(L); fFound = true; --- 348,352 ---- if (pMethod->type == LuaGetProp) { ! lua_remove(L, 2); // remove the name of the function result = (*pMethod->func)(L); fFound = true; |
From: John L. <jr...@us...> - 2007-03-19 21:56:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25513/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: comment why we remove items from the stack before calling our C functions make wxLuaCheckStack::DumpStack a little nicer by printing types and values Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxldebug.cpp 12 Dec 2006 01:23:40 -0000 1.25 --- wxldebug.cpp 19 Mar 2007 21:56:11 -0000 1.26 *************** *** 527,528 **** --- 527,547 ---- wxLog::FlushActive(); } + + void wxLuaCheckStack::DumpStack(lua_State* L) + { + int i, count = lua_gettop(L); + wxPrintf(wxT("wxLuaCheckStack::DumpStack(%ld) items %d\n"), (long)L, count); + + wxLuaState wxlState(L); + + for (i = 1; i <= count; i++) + { + //int type = lua_type(L, i); + //wxPrintf(wxT("Stack item %d of %d : type %d '%s'\n"), i, argCount, type, lua2wx(lua_typename(L, type)).c_str()); + + wxString type, value; + int i_type = wxLuaDebugData::GetTypeValue(wxlState, i, type, value); + wxPrintf(wxT("item %d: i_type %d '%s' = '%s'\n"), i, i_type, type.c_str(), value.c_str()); + + } + } |
From: John L. <jr...@us...> - 2007-03-19 21:56:15
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25513/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: comment why we remove items from the stack before calling our C functions make wxLuaCheckStack::DumpStack a little nicer by printing types and values Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxldebug.h 21 Jan 2007 23:13:08 -0000 1.31 --- wxldebug.h 19 Mar 2007 21:56:11 -0000 1.32 *************** *** 152,155 **** --- 152,156 ---- static void DumpTable(lua_State* L, const wxString &tableName); static void DumpTable(lua_State* L, int index, const wxString& tablename, wxLuaStringToLongHashMap& dumpList, int indent); + static void DumpStack(lua_State* L); private: |
From: John L. <jr...@us...> - 2007-03-19 04:39:48
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10862/wxLua/modules/wxbind/src Modified Files: defsutil.cpp dialogs.cpp wx_bind.cpp xml.cpp Log Message: fixes in the bindings for MSW missing functions rem out wxXMLResourceHandler since it didn't have any methods Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** xml.cpp 15 Mar 2007 23:24:57 -0000 1.26 --- xml.cpp 17 Mar 2007 19:08:14 -0000 1.27 *************** *** 955,976 **** #if wxLUA_USE_wxXMLResource && wxUSE_XML // --------------------------------------------------------------------------- - // Bind class wxXmlResourceHandler - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxXmlResourceHandler' - int s_wxluatag_wxXmlResourceHandler = -1; - - - - // Map Lua Class Methods to C Binding Functions - WXLUAMETHOD wxXmlResourceHandler_methods[] = { - }; - - int wxXmlResourceHandler_methodCount = sizeof(wxXmlResourceHandler_methods)/sizeof(wxXmlResourceHandler_methods[0]); - #endif // wxLUA_USE_wxXMLResource && wxUSE_XML - - - #if wxLUA_USE_wxXMLResource && wxUSE_XML - // --------------------------------------------------------------------------- // Bind class wxXmlResource // --------------------------------------------------------------------------- --- 955,958 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** wx_bind.cpp 15 Mar 2007 23:24:56 -0000 1.89 --- wx_bind.cpp 17 Mar 2007 19:08:14 -0000 1.90 *************** *** 7348,7352 **** #if wxLUA_USE_wxBusyCursor { "wxBusyCursor", wxBusyCursor_methods, wxBusyCursor_methodCount, NULL, &s_wxluatag_wxBusyCursor, NULL, NULL }, - { "wxBusyCursorSuspender", wxBusyCursorSuspender_methods, wxBusyCursorSuspender_methodCount, NULL, &s_wxluatag_wxBusyCursorSuspender, NULL, NULL }, #endif // wxLUA_USE_wxBusyCursor --- 7348,7351 ---- *************** *** 8395,8399 **** { "wxXmlProperty", wxXmlProperty_methods, wxXmlProperty_methodCount, NULL, &s_wxluatag_wxXmlProperty, NULL, NULL }, { "wxXmlResource", wxXmlResource_methods, wxXmlResource_methodCount, NULL, &s_wxluatag_wxXmlResource, "wxObject", NULL }, - { "wxXmlResourceHandler", wxXmlResourceHandler_methods, wxXmlResourceHandler_methodCount, NULL, &s_wxluatag_wxXmlResourceHandler, "wxObject", NULL }, #endif // wxLUA_USE_wxXMLResource && wxUSE_XML --- 8394,8397 ---- *************** *** 8578,8582 **** #if wxLUA_USE_wxBusyCursor wxLUA_IMPLEMENT_ENCAPSULATION(wxBusyCursor, wxBusyCursor) - wxLUA_IMPLEMENT_ENCAPSULATION(wxBusyCursorSuspender, wxBusyCursorSuspender) #endif // wxLUA_USE_wxBusyCursor --- 8576,8579 ---- Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** dialogs.cpp 15 Mar 2007 23:24:52 -0000 1.33 --- dialogs.cpp 17 Mar 2007 19:08:13 -0000 1.34 *************** *** 1393,1435 **** int s_wxluatag_wxFileDialog = -1; - #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxFileDialog_Create[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_String, 0 }; - // %wxchkver_2_8 bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") - static int LUACALL wxLua_wxFileDialog_Create(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // get number of arguments - int argCount = lua_gettop(L); - // const wxString name = "wxFileDialog" - const wxString name = (argCount >= 10 ? wxlState.GetwxStringType(10) : wxString(wxT("wxFileDialog"))); - // const wxSize sz = wxDefaultSize - const wxSize * sz = (argCount >= 9 ? (const wxSize *)wxlState.GetUserDataType(9, s_wxluatag_wxSize) : &wxDefaultSize); - // const wxPoint pos = wxDefaultPosition - const wxPoint * pos = (argCount >= 8 ? (const wxPoint *)wxlState.GetUserDataType(8, s_wxluatag_wxPoint) : &wxDefaultPosition); - // long style = wxFD_DEFAULT_STYLE - long style = (argCount >= 7 ? (long)wxlState.GetNumberType(7) : wxFD_DEFAULT_STYLE); - // const wxString wildCard = wxFileSelectorDefaultWildcardStr - const wxString wildCard = (argCount >= 6 ? wxlState.GetwxStringType(6) : wxString(wxFileSelectorDefaultWildcardStr)); - // const wxString defaultFile = "" - const wxString defaultFile = (argCount >= 5 ? wxlState.GetwxStringType(5) : wxString(wxEmptyString)); - // const wxString defaultDir = "" - const wxString defaultDir = (argCount >= 4 ? wxlState.GetwxStringType(4) : wxString(wxEmptyString)); - // const wxString message = wxFileSelectorPromptStr - const wxString message = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxFileSelectorPromptStr)); - // wxWindow parent - wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); - // get this - wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); - // call Create - returns = self->Create(parent, message, defaultDir, defaultFile, wildCard, style, *pos, *sz, name); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG // wxString GetDirectory() const --- 1393,1396 ---- *************** *** 1780,1810 **** #endif // (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG) - #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG - // %constructor wxFileDialogDefault() - static int LUACALL wxLua_wxFileDialogDefault_constructor(lua_State *L) - { - wxLuaState wxlState(L); - wxFileDialog *returns; - // call constructor - returns = new wxFileDialog(); - // add to tracked window list - if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) - wxlState.AddTrackedWindow((wxWindow*)returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxFileDialog, returns); - - return 1; - } - - #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG - // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxFileDialog_methods[] = { - #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - { LuaMethod, "Create", wxLua_wxFileDialog_Create, 9, 1, s_wxluatagArray_wxLua_wxFileDialog_Create }, - #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - { LuaSetProp, "Directory", wxLua_wxFileDialog_SetDirectory, 1, 1, s_wxluaargArray_None }, { LuaGetProp, "Directory", wxLua_wxFileDialog_GetDirectory, 0, 0, s_wxluaargArray_None }, --- 1741,1748 ---- *************** *** 1862,1867 **** { LuaConstructor, "wxFileDialog", wxLua_wxFileDialog_constructor, 9, 1, s_wxluatagArray_wxLua_wxFileDialog_constructor }, #endif // (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG) - { LuaConstructor, "wxFileDialogDefault", wxLua_wxFileDialogDefault_constructor, 0, 0, s_wxluaargArray_None }, - }; --- 1800,1803 ---- Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** defsutil.cpp 15 Mar 2007 23:24:52 -0000 1.28 --- defsutil.cpp 17 Mar 2007 19:08:13 -0000 1.29 *************** *** 772,827 **** - #if wxLUA_USE_wxBusyCursor - // --------------------------------------------------------------------------- - // Bind class wxBusyCursorSuspender - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxBusyCursorSuspender' - int s_wxluatag_wxBusyCursorSuspender = -1; - - #if wxLUA_USE_wxBusyCursor - static int LUACALL wxLua_wxBusyCursorSuspender_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursorSuspender * self = (wxBusyCursorSuspender *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursorSuspender); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - - // wxBusyCursorSuspender() - static int LUACALL wxLua_wxBusyCursorSuspender_constructor(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursorSuspender *returns; - // call constructor - returns = new wxBusyCursorSuspender(); - // add to tracked memory list - wxlState.AddTrackedObject((long)returns, new wxObject_wxBusyCursorSuspender((wxBusyCursorSuspender *)returns)); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxBusyCursorSuspender, returns); - - return 1; - } - - #endif // wxLUA_USE_wxBusyCursor - - - - // Map Lua Class Methods to C Binding Functions - WXLUAMETHOD wxBusyCursorSuspender_methods[] = { - { LuaMethod, "Delete", wxLua_wxBusyCursorSuspender_Delete, 0, 0, s_wxluaargArray_None }, - { LuaConstructor, "wxBusyCursorSuspender", wxLua_wxBusyCursorSuspender_constructor, 0, 0, s_wxluaargArray_None }, - - }; - - int wxBusyCursorSuspender_methodCount = sizeof(wxBusyCursorSuspender_methods)/sizeof(wxBusyCursorSuspender_methods[0]); - #endif // wxLUA_USE_wxBusyCursor - - #if wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO // --------------------------------------------------------------------------- --- 772,775 ---- |
From: John L. <jr...@us...> - 2007-03-19 03:47:51
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6284/wxLua/bindings/wxwidgets Modified Files: data.i windows.i wx_datatypes.lua Log Message: use wxList::compatibility_iterator not wxNode* for wxUSE_STL == 1 and 0 Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** windows.i 14 Mar 2007 05:08:09 -0000 1.32 --- windows.i 19 Mar 2007 03:47:18 -0000 1.33 *************** *** 300,304 **** // wxWindowList ! %if wxLUA_USE_wxWindowList %class %noclassinfo wxWindowList, wxList --- 300,304 ---- // wxWindowList ! %if wxLUA_USE_wxWindowList & !wxUSE_STL %class %noclassinfo wxWindowList, wxList *************** *** 315,319 **** %endclass ! %endif //wxLUA_USE_wxWindowList //----------------------------------------------------------------------------- --- 315,319 ---- %endclass ! %endif //wxLUA_USE_wxWindowList & !wxUSE_STL //----------------------------------------------------------------------------- Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** wx_datatypes.lua 17 Mar 2007 19:08:09 -0000 1.59 --- wx_datatypes.lua 19 Mar 2007 03:47:18 -0000 1.60 *************** *** 1868,1872 **** }, wxKeyType = { ! Condition = "wxLUA_USE_wxList", DefType = "enum", IsNumber = true, --- 1868,1872 ---- }, wxKeyType = { ! Condition = "wxLUA_USE_wxList && !wxUSE_STL", DefType = "enum", IsNumber = true, *************** *** 1925,1929 **** wxList = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxList", DefType = "class", IsNumber = false, --- 1925,1929 ---- wxList = { BaseClass = "wxObject", ! Condition = "wxLUA_USE_wxList && !wxUSE_STL", DefType = "class", IsNumber = false, *************** *** 2314,2318 **** }, wxNode = { ! Condition = "wxLUA_USE_wxList", DefType = "class", IsNumber = false, --- 2314,2318 ---- }, wxNode = { ! Condition = "wxLUA_USE_wxList && !wxUSE_STL", DefType = "class", IsNumber = false, *************** *** 3550,3554 **** wxWindowList = { BaseClass = "wxList", ! Condition = "wxLUA_USE_wxWindowList", DefType = "class", IsNumber = false, --- 3550,3554 ---- wxWindowList = { BaseClass = "wxList", ! Condition = "wxLUA_USE_wxWindowList && !wxUSE_STL", DefType = "class", IsNumber = false, Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** data.i 13 Mar 2007 23:01:53 -0000 1.25 --- data.i 19 Mar 2007 03:47:18 -0000 1.26 *************** *** 184,188 **** // wxList ! %if wxLUA_USE_wxList %include "wx/list.h" --- 184,188 ---- // wxList ! %if wxLUA_USE_wxList & !wxUSE_STL %include "wx/list.h" *************** *** 240,244 **** %endclass ! %endif //wxLUA_USE_wxList //----------------------------------------------------------------------------- --- 240,244 ---- %endclass ! %endif //wxLUA_USE_wxList & !wxUSE_STL //----------------------------------------------------------------------------- |