[Commits] [wesnoth/wesnoth] 160a46: Use strcmp instead of strcoll

GitHub noreply at github.com
Tue Oct 18 01:58:15 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 160a4611d6ad5f2853e1a7590a6241eceb0cdfbd
      https://github.com/wesnoth/wesnoth/commit/160a4611d6ad5f2853e1a7590a6241eceb0cdfbd
  Author: GregoryLundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M projectfiles/VC12/liblua.vcxproj
    M projectfiles/VC12/liblua.vcxproj.filters
    M src/CMakeLists.txt
    M src/lua/SConscript
    M src/lua/lvm.cpp
    A src/wesnoth_lua_config.h
    A src/wesnoth_lua_config.md

  Log Message:
  -----------
  Use strcmp instead of strcoll

This works for Visual Studio, CMake and SCons.
Still need to get it working on: CodeBlocks and Xcode


  Commit: f88c3b22b86647c0ac472db9c3dd6fd46857f9a4
      https://github.com/wesnoth/wesnoth/commit/f88c3b22b86647c0ac472db9c3dd6fd46857f9a4
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/ldo.cpp
    M src/wesnoth_lua_config.h

  Log Message:
  -----------
  Refactor lua_jailbreak_exception

Revert the changes to the stock Lua source code and move them into the Wesnoth-specific header.


  Commit: b8244b0694fc2d64c0a3c6e6dc6f63dacfa18a72
      https://github.com/wesnoth/wesnoth/commit/b8244b0694fc2d64c0a3c6e6dc6f63dacfa18a72
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lauxlib.h
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_map_location_ops.cpp
    M src/scripting/lua_unit.cpp

  Log Message:
  -----------
  Correct the calls instead

Do not change the released Lua source code. Lua is written as standard C, but we compile it as C++ so we can use exceptions. Change the call sites to avoid the warnings about using a C cast instead of static_cast<int>().

NB: The changes to Wesnoth C++ code will be required to upgrade to Lua 5.3, anyway.

This reverts:

commit cee3ab208401a439e15004b79b4fa5c5bf9a9e5a
Author: Mark de Wever <koraq at xs4all.nl>
Date:   Sun Feb 5 19:55:32 2012 +0000

    Fix compiler warnings.


  Commit: f00357d7db184dcb4c699349ede0989104224215
      https://github.com/wesnoth/wesnoth/commit/f00357d7db184dcb4c699349ede0989104224215
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lapi.cpp

  Log Message:
  -----------
  Revert change

Rather than change the source, if the proplem still exists, use a compiler flag to suppress the messages.

This reverts the commit

commit 12a7a5a1e0fee21e0c88042c6b3c7be1c73f30e3
Author: Mark de Wever <koraq at xs4all.nl>
Date:   Sun Oct 6 17:35:11 2013 +0200

    Remove unused const variables.

    The issue was detected by the upcomming Clang 3.4.


  Commit: 8e7b28cde24190a514fbcdb84ed73175b0c7fbc7
      https://github.com/wesnoth/wesnoth/commit/8e7b28cde24190a514fbcdb84ed73175b0c7fbc7
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/luaconf.h
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/lua_kernel_base.cpp
    M src/wesnoth_lua_config.h

  Log Message:
  -----------
  Move local changes to proper place

luaconf.h provides a place for us to make changes, avoiding the need to change the original definitions. Move everything down there. This encompases the following changes:

1) Disable compatibility with old versions of Lua in the C++. Compatability is maintained only for the Lua runtime. Only one correction was needed: in application_lua_kernel.cpp

2) Change how the backpointer is defined, for forward compatability with Lua 5.3. This effected only one line: in lua_kernel_base.cpp. Using the Lua 5.3 macro caused a GCC warning, suppressed it for that line.

3) Certain Windows-only features are no longer available in the Lua runtime. These features are all in the Lua io module, which we don't allow access to, so this is a non-change for the runtime.

4) Lua will behave as if it is a standard C environment. This, again, mainly effects the Windows environment and features we don't allow access to in the runtime.


  Commit: 841d17af31008a03c7ce68b4aa9df303920967c4
      https://github.com/wesnoth/wesnoth/commit/841d17af31008a03c7ce68b4aa9df303920967c4
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lapi.cpp
    M src/lua/lapi.h
    M src/lua/lauxlib.cpp
    M src/lua/lauxlib.h
    M src/lua/lbaselib.cpp
    M src/lua/lbitlib.cpp
    M src/lua/lcode.cpp
    M src/lua/lcode.h
    M src/lua/lcorolib.cpp
    M src/lua/lctype.cpp
    M src/lua/lctype.h
    M src/lua/ldblib.cpp
    M src/lua/ldebug.cpp
    M src/lua/ldebug.h
    M src/lua/ldo.cpp
    M src/lua/ldo.h
    M src/lua/ldump.cpp
    M src/lua/lfunc.cpp
    M src/lua/lfunc.h
    M src/lua/lgc.cpp
    M src/lua/lgc.h
    M src/lua/linit.cpp
    M src/lua/liolib.cpp
    M src/lua/llex.cpp
    M src/lua/llex.h
    M src/lua/llimits.h
    M src/lua/lmathlib.cpp
    M src/lua/lmem.cpp
    M src/lua/lmem.h
    M src/lua/loadlib.cpp
    M src/lua/lobject.cpp
    M src/lua/lobject.h
    M src/lua/lopcodes.cpp
    M src/lua/lopcodes.h
    M src/lua/loslib.cpp
    M src/lua/lparser.cpp
    M src/lua/lparser.h
    A src/lua/lprefix.h
    M src/lua/lstate.cpp
    M src/lua/lstate.h
    M src/lua/lstring.cpp
    M src/lua/lstring.h
    M src/lua/lstrlib.cpp
    M src/lua/ltable.cpp
    M src/lua/ltable.h
    M src/lua/ltablib.cpp
    M src/lua/ltm.cpp
    M src/lua/ltm.h
    R src/lua/lua.cpp
    M src/lua/lua.h
    R src/lua/luac.cpp
    M src/lua/luaconf.h
    M src/lua/lualib.h
    M src/lua/lundump.cpp
    M src/lua/lundump.h
    A src/lua/lutf8lib.cpp
    M src/lua/lvm.cpp
    M src/lua/lvm.h
    M src/lua/lzio.cpp
    M src/lua/lzio.h

  Log Message:
  -----------
  Replace Lua 5.2.3 with Lua 5.3.3


  Commit: 475c31b10e3fa97273058db22e21c4514efeab38
      https://github.com/wesnoth/wesnoth/commit/475c31b10e3fa97273058db22e21c4514efeab38
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/wesnoth_lua_config.h

  Log Message:
  -----------
  Enable Lua 5.1 and 5.2 compatability


  Commit: 90d48e3725717a0823d4ed1fa6b6499bdaf3c016
      https://github.com/wesnoth/wesnoth/commit/90d48e3725717a0823d4ed1fa6b6499bdaf3c016
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lobject.cpp
    M src/lua/lstrlib.cpp

  Log Message:
  -----------
  -Wpermissive reports two errors

Reported upstream.


  Commit: 63be2a0d2eac5406e0310b60b0a382ebc1f0f756
      https://github.com/wesnoth/wesnoth/commit/63be2a0d2eac5406e0310b60b0a382ebc1f0f756
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lparser.cpp

  Log Message:
  -----------
  Apply Lua.org patch

Expression list with four or more expressions in a 'for' loop can crash the interpreter.

reported by Marco Schöpl on 17 Jun 2016. existed since 5.2.

Example:
    -- the next loop will probably crash the interpreter
    repeat until load "for _ in _,_,_,_ do local function _() end"


  Commit: ca883fe7bfae2ef10798672d5bf9398a4032c036
      https://github.com/wesnoth/wesnoth/commit/ca883fe7bfae2ef10798672d5bf9398a4032c036
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/loslib.cpp

  Log Message:
  -----------
  Apply Lua.org patch

Checking a format for os.date may read pass the format string.

reported by Nagaev Boris on 10 Jul 2016. existed since 5.3.3.

Example:
    This bug does not seem to happen with regular compilers. It needs an "interceptor" 'memcmp' function that continues reading memory after a difference is found.


  Commit: 82661505d12e592e5bfb5f5168ea9320772bb665
      https://github.com/wesnoth/wesnoth/commit/82661505d12e592e5bfb5f5168ea9320772bb665
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/lcode.cpp

  Log Message:
  -----------
  Apply Lua.org patch

Lua can generate wrong code in functions with too many constants.

reported by Marco Schöpl on 17 Jul 2016. existed since 5.3.3.

Example:
    See http://lua-users.org/lists/lua-l/2016-07/msg00303.html.


  Commit: 0c13f7ea20169318aa844a13f6ec36d0f65e551e
      https://github.com/wesnoth/wesnoth/commit/0c13f7ea20169318aa844a13f6ec36d0f65e551e
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M projectfiles/VC12/liblua.vcxproj
    M projectfiles/VC12/liblua.vcxproj.filters
    M src/CMakeLists.txt
    M src/lua/SConscript

  Log Message:
  -----------
  Update project files

Update for Visual Studio, CMake and SCons.


  Commit: fb82f6a2596c5256967dcd95e989c2021ad654f3
      https://github.com/wesnoth/wesnoth/commit/fb82f6a2596c5256967dcd95e989c2021ad654f3
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Add Lua utf8 library

Safe for scripting. Let the users have it.


  Commit: 3f22ff8adf260a47707628adea434d753e0c9220
      https://github.com/wesnoth/wesnoth/commit/3f22ff8adf260a47707628adea434d753e0c9220
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M changelog

  Log Message:
  -----------
  changelog


  Commit: 757ffc9e448fd63d3dd5e8f50cdc329d9b6d867b
      https://github.com/wesnoth/wesnoth/commit/757ffc9e448fd63d3dd5e8f50cdc329d9b6d867b
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    R src/lua/README

  Log Message:
  -----------
  README is ancient


  Commit: f97436b96e8765ca080726b0151c4f79292032ff
      https://github.com/wesnoth/wesnoth/commit/f97436b96e8765ca080726b0151c4f79292032ff
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/lua/COPYRIGHT

  Log Message:
  -----------
  Update COPYRIGHT


  Commit: ecdfb81d78b55d1d447691106531c164a896de26
      https://github.com/wesnoth/wesnoth/commit/ecdfb81d78b55d1d447691106531c164a896de26
  Author: GregoryLundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/ai/lua/lua_object.hpp

  Log Message:
  -----------
  Use static cast

The lua_toint macro was deprecated for Lua 5.3.3; originally, Wesnoth changed the macro to use a static_cast<int>.

After upgrading to the lua_tointeger function, add the static_cast<int> at each call site to suppress warnings about possible loss of precision due to defining LUA_INTEGER as long long.


  Commit: 8839a5ee8e12572fa4adceb5aa5e54150f61a818
      https://github.com/wesnoth/wesnoth/commit/8839a5ee8e12572fa4adceb5aa5e54150f61a818
  Author: GregoryLundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Only on gcc

Use #if guard to prevent gcc pragma being seen elsewhere.


  Commit: a90ef4a1cb896ab2695934dfdaadd52b0c5700bc
      https://github.com/wesnoth/wesnoth/commit/a90ef4a1cb896ab2695934dfdaadd52b0c5700bc
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    R src/tests/test_lua.cpp

  Log Message:
  -----------
  Fix Travis

test/test_lua no longer applies

All it did was check rounding coming from Lua matched the expected values.

You can no long obtain an integer value from a Lua NUMBER (float), unless that float value has no fractional part and is in the range of valid integers. To obtain a rounded value, instead, use luaL_checknumber to obtain the float value and round it as needed (with a cast, floor or ceil, usually) in your program.


  Commit: fc6774289e783c43d8189a21a0d197d2da47b982
      https://github.com/wesnoth/wesnoth/commit/fc6774289e783c43d8189a21a0d197d2da47b982
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M data/ai/lua/ai_helper.lua
    M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
    M data/lua/wml/random_placement.lua

  Log Message:
  -----------
  Upgrade deprecated Lua

loadstring was removed, load does the same thing.
atan2 was remvoed, atan works instead


  Commit: ccc7d730f7d0f4ba8fcfceab9e0e0ca7600f5b18
      https://github.com/wesnoth/wesnoth/commit/ccc7d730f7d0f4ba8fcfceab9e0e0ca7600f5b18
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2016-10-17 (Mon, 17 Oct 2016)

  Changed paths:
    M src/wesnoth_lua_config.md

  Log Message:
  -----------
  Wrote Markdown instructions

Documented the basic process used to install Lua 5.3.3


  Commit: e8a499fcec0701687426cfb6bfca7a33536e968f
      https://github.com/wesnoth/wesnoth/commit/e8a499fcec0701687426cfb6bfca7a33536e968f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2016-10-18 (Tue, 18 Oct 2016)

  Changed paths:
    M changelog
    M data/ai/lua/ai_helper.lua
    M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
    M data/lua/wml/random_placement.lua
    M projectfiles/VC12/liblua.vcxproj
    M projectfiles/VC12/liblua.vcxproj.filters
    M src/CMakeLists.txt
    M src/SConscript
    M src/ai/lua/lua_object.hpp
    M src/lua/COPYRIGHT
    R src/lua/README
    M src/lua/SConscript
    M src/lua/lapi.cpp
    M src/lua/lapi.h
    M src/lua/lauxlib.cpp
    M src/lua/lauxlib.h
    M src/lua/lbaselib.cpp
    M src/lua/lbitlib.cpp
    M src/lua/lcode.cpp
    M src/lua/lcode.h
    M src/lua/lcorolib.cpp
    M src/lua/lctype.cpp
    M src/lua/lctype.h
    M src/lua/ldblib.cpp
    M src/lua/ldebug.cpp
    M src/lua/ldebug.h
    M src/lua/ldo.cpp
    M src/lua/ldo.h
    M src/lua/ldump.cpp
    M src/lua/lfunc.cpp
    M src/lua/lfunc.h
    M src/lua/lgc.cpp
    M src/lua/lgc.h
    M src/lua/linit.cpp
    M src/lua/liolib.cpp
    M src/lua/llex.cpp
    M src/lua/llex.h
    M src/lua/llimits.h
    M src/lua/lmathlib.cpp
    M src/lua/lmem.cpp
    M src/lua/lmem.h
    M src/lua/loadlib.cpp
    M src/lua/lobject.cpp
    M src/lua/lobject.h
    M src/lua/lopcodes.cpp
    M src/lua/lopcodes.h
    M src/lua/loslib.cpp
    M src/lua/lparser.cpp
    M src/lua/lparser.h
    A src/lua/lprefix.h
    M src/lua/lstate.cpp
    M src/lua/lstate.h
    M src/lua/lstring.cpp
    M src/lua/lstring.h
    M src/lua/lstrlib.cpp
    M src/lua/ltable.cpp
    M src/lua/ltable.h
    M src/lua/ltablib.cpp
    M src/lua/ltm.cpp
    M src/lua/ltm.h
    R src/lua/lua.cpp
    M src/lua/lua.h
    R src/lua/luac.cpp
    M src/lua/luaconf.h
    M src/lua/lualib.h
    M src/lua/lundump.cpp
    M src/lua/lundump.h
    A src/lua/lutf8lib.cpp
    M src/lua/lvm.cpp
    M src/lua/lvm.h
    M src/lua/lzio.cpp
    M src/lua/lzio.h
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_kernel_base.cpp
    M src/scripting/lua_map_location_ops.cpp
    M src/scripting/lua_unit.cpp
    R src/tests/test_lua.cpp
    A src/wesnoth_lua_config.h
    A src/wesnoth_lua_config.md

  Log Message:
  -----------
  Merge pull request #822 from GregoryLundberg/GL_Upgrade_Lua

Upgrade to Lua 5.3.3+


Compare: https://github.com/wesnoth/wesnoth/compare/1bed30c8c3ca...e8a499fcec07


More information about the Commits mailing list