Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/masterserver2/src/external/ceguilua/ceguilua-0.6.2/ceguilua/changes_orxonox.diff @ 8474

Last change on this file since 8474 was 7163, checked in by dafrick, 14 years ago

Merged presentation3 branch into trunk.

  • Property svn:eol-style set to native
File size: 3.7 KB
  • CEGUILua.cpp

     
    2727 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    2828 *   OTHER DEALINGS IN THE SOFTWARE.
    2929 ***************************************************************************/
    30 #ifdef HAVE_CONFIG_H
    31 #   include "config.h"
    32 #endif
    33 
    3430#include "CEGUI.h"
    3531#include "CEGUIConfig.h"
    3632#include "CEGUIPropertyHelper.h"
     
    4541#include "lauxlib.h"
    4642}
    4743
    48 #include "tolua++.h"
     44#include "tolua/tolua++.h"
    4945
    5046// prototype for bindings initialisation function
    5147int tolua_CEGUI_open(lua_State* tolua_S);
     
    5955        Constructor (creates Lua state)
    6056*************************************************************************/
    6157LuaScriptModule::LuaScriptModule() :
    62     d_errFuncIndex(LUA_NOREF)
     58    d_errFuncIndex(LUA_NOREF),
     59    d_activeErrFuncIndex(LUA_NOREF)
    6360{
    64     #if CEGUI_LUA_VER >= 51
     61    #if LUA_VERSION_NUM >= 501
    6562        static const luaL_Reg lualibs[] = {
    6663            {"", luaopen_base},
    6764            {LUA_LOADLIBNAME, luaopen_package},
     
    7572        #endif
    7673            {0, 0}
    7774        };
    78     #endif /* CEGUI_LUA_VER >= 51 */
     75    #endif /* LUA_VERSION_NUM >= 501 */
    7976
    8077    // create a lua state
    8178    d_ownsState = true;
    8279    d_state = lua_open();
    8380
    8481    // init all standard libraries
    85     #if CEGUI_LUA_VER >= 51
     82    #if LUA_VERSION_NUM >= 501
    8683            const luaL_Reg *lib = lualibs;
    8784            for (; lib->func; lib++)
    8885            {
     
    9087                lua_pushstring(d_state, lib->name);
    9188                lua_call(d_state, 1, 0);
    9289            }
    93     #else /* CEGUI_LUA_VER >= 51 */
     90    #else /* LUA_VERSION_NUM >= 501 */
    9491        luaopen_base(d_state);
    9592        luaopen_io(d_state);
    9693        luaopen_string(d_state);
     
    9996        #if defined(DEBUG) || defined (_DEBUG)
    10097            luaopen_debug(d_state);
    10198        #endif
    102     #endif /* CEGUI_LUA_VER >= 51 */
     99    #endif /* LUA_VERSION_NUM >= 501 */
    103100
    104101    setModuleIdentifierString();
    105102}
     
    108105/*************************************************************************
    109106        Constructor (uses given Lua state)
    110107*************************************************************************/
    111 LuaScriptModule::LuaScriptModule(lua_State* state)
     108LuaScriptModule::LuaScriptModule(lua_State* state) :
     109    d_errFuncIndex(LUA_NOREF),
     110    d_activeErrFuncIndex(LUA_NOREF)
    112111{
    113112        // just use the given state
    114113        d_ownsState = false;
  • CEGUILua.h

     
    3434/*************************************************************************
    3535        Import / Export control macros
    3636*************************************************************************/
    37 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
     37#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUILUA_STATIC)
    3838#   ifdef CEGUILUA_EXPORTS
    3939#       define CEGUILUA_API __declspec(dllexport)
    4040#   else
    41 #       define CEGUILUA_API __declspec(dllimport)
     41#       if defined( __MINGW32__ )
     42#           define CEGUILUA_API
     43#       else
     44#           define CEGUILUA_API __declspec(dllimport)
     45#       endif
    4246#   endif
    4347#else
    4448#   define CEGUILUA_API
  • CEGUILuaFunctor.cpp

     
    4040#include "lauxlib.h"
    4141}
    4242
    43 #include "tolua++.h"
     43#include "tolua/tolua++.h"
    4444
    4545// Start of CEGUI namespace section
    4646namespace CEGUI
     
    199199    bool ret = lua_isboolean(L, -1) ? lua_toboolean(L, -1 ) : true;
    200200    lua_pop(L, 1);
    201201
     202    // remove error handler from stack
     203    if (err_idx != 0)
     204        lua_remove(L, err_idx);
     205
    202206        if(helper)
    203207        {
    204208                delete helper;
Note: See TracBrowser for help on using the repository browser.