Skip to content

Commit 6750ba5

Browse files
committed
Removed USE_LUA definition as it is redundant now
1 parent 84fae24 commit 6750ba5

File tree

9 files changed

+3
-50
lines changed

9 files changed

+3
-50
lines changed

dialogs/plugins/PluginWizard.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,11 +708,9 @@ int nItem = -1;
708708
if (m_strLanguage.CompareNoCase ("tclscript") == 0)
709709
nItem = 4;
710710
#endif
711-
#ifdef USE_LUA
712711
else
713712
if (m_strLanguage.CompareNoCase ("lua") == 0)
714713
nItem = 5;
715-
#endif
716714
#ifdef USE_PHP
717715
else
718716
if (m_strLanguage.CompareNoCase ("phpscript") == 0)
@@ -745,9 +743,7 @@ int nItem = m_ctlLanguage.GetCurSel ();
745743
#ifdef USE_TCL
746744
case SCRIPT_TCL: m_strLanguage = "TclScript"; break;
747745
#endif
748-
#ifdef USE_LUA
749746
case SCRIPT_LUA: m_strLanguage = "Lua"; break;
750-
#endif
751747
#ifdef USE_PHP
752748
case SCRIPT_PHP: m_strLanguage = "PhpScript"; break;
753749
#endif

dialogs/world_prefs/prefspropertypages.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6555,11 +6555,9 @@ int nItem = m_ctlLanguage.GetCurSel ();
65556555
strPrompt = "Tcl source files (*.tcl)|*.tcl";
65566556
break;
65576557
#endif
6558-
#ifdef USE_LUA
65596558
case SCRIPT_LUA: strSubscript = "lua";
65606559
strPrompt = "Lua source files (*.lua)|*.lua";
65616560
break;
6562-
#endif
65636561
#ifdef USE_PHP
65646562
case SCRIPT_PHP: strSubscript = "phpscript";
65656563
strPrompt = "PHP source files (*.php)|*.php";

scripting/lua_methods.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include "..\sendvw.h"
1010
#include "..\dialogs\DebugLuaDlg.h"
1111

12-
#ifdef USE_LUA
13-
1412
const char mushclient_typename[] = "mushclient.world";
1513

1614
/*------------------------------------------------------------------------
@@ -1018,7 +1016,7 @@ static int L_CallPlugin (lua_State *L)
10181016

10191017
}
10201018

1021-
// new in 4.55 - Lua to Lua calls can handle multiple arguments and a return value
1019+
// new in 4.55 - Lua to Lua calls can handle multiple arguments and multiple return values
10221020

10231021
// don't need to check *our* scripting language, we must be Lua, duh, or we wouldn't be here.
10241022

@@ -1129,7 +1127,7 @@ static int L_CallPlugin (lua_State *L)
11291127
if (CallLuaWithTraceBack (pL, n - 2, LUA_MULTRET)) // true on error
11301128
{
11311129

1132-
// here for executioin error in plugin function ...
1130+
// here for execution error in plugin function ...
11331131

11341132
CString strType = TFormat ("Plugin %s", (LPCTSTR) pPlugin->m_strName);
11351133
CString strReason = TFormat ("Executing plugin %s sub %s",
@@ -1244,7 +1242,7 @@ static int L_CallPlugin (lua_State *L)
12441242
// old fashioned way ...
12451243
lua_pushnumber (L, pDoc->CallPlugin (
12461244
sPluginID, // PluginID
1247-
sRoutine, // Routine
1245+
sRoutine, // Routine
12481246
my_optstring (L, 3, "") // Argument - optional
12491247
));
12501248
return 1; // number of result fields
@@ -7739,4 +7737,3 @@ int DisableDLLs (lua_State * L)
77397737
return 0;
77407738
} // end of DisableDLLs
77417739

7742-
#endif // LUA

scripting/lua_scripting.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include "..\pcre\config.h"
99
#include "..\pcre\pcre_internal.h"
1010

11-
#ifdef USE_LUA
12-
1311
set<string> LuaFunctionsSet;
1412
set<string> LuaTablesSet;
1513

@@ -957,4 +955,3 @@ int win_io_pclose (lua_State *L) {
957955

958956
#endif // POPEN_STUFF_WHICH_DOESNT_WORK
959957

960-
#endif // USE_LUA

scripting/lua_utils.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "..\dmetaph.h"
1212
#include <direct.h>
1313

14-
#ifdef USE_LUA
15-
1614
extern char working_dir [_MAX_PATH];
1715

1816
// recursive node outputter
@@ -1398,4 +1396,3 @@ static const struct luaL_reg xmllib [] =
13981396

13991397
const struct luaL_reg *ptr_xmllib = xmllib;
14001398

1401-
#endif // LUA

scripting/scriptengine.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ bool CScriptEngine::Execute (DISPID & dispid, // dispatch ID, will be set to DI
2121
)
2222
{
2323

24-
#ifdef USE_LUA
2524

2625
// If Lua, we may have been called with no arguments, so just do that
2726
if (L)
@@ -48,8 +47,6 @@ bool CScriptEngine::Execute (DISPID & dispid, // dispatch ID, will be set to DI
4847
return status;
4948
} // have Lua
5049

51-
#endif // USE_LUA
52-
5350
// don't do it if no routine address
5451
if (dispid == DISPID_UNKNOWN)
5552
return false;
@@ -258,17 +255,13 @@ STDMETHODIMP CActiveScriptSite::OnScriptError(IActiveScriptError *pscripterror)
258255
bool CScriptEngine::CreateScriptEngine (void)
259256
{
260257

261-
#ifdef USE_LUA
262-
263258
// Lua does not use scripting engine
264259
if (m_strLanguage.CompareNoCase ("Lua") == 0)
265260
{
266261
OpenLua ();
267262
return false;
268263
} // end of Lua
269264

270-
#endif // USE_LUA
271-
272265
// not under Wine
273266
if (bWine)
274267
return true;
@@ -406,14 +399,10 @@ bool CScriptEngine::Parse (const CString & strCode, const CString & strWhat)
406399
else
407400
bImmediate = true;
408401

409-
#ifdef USE_LUA
410-
411402
// Do Lua differently
412403
if (L)
413404
return ParseLua (strCode, strWhat);
414405

415-
#endif // USE_LUA
416-
417406
if (!m_IActiveScriptParse || !m_IActiveScript)
418407
return true; // no script engine
419408

@@ -475,14 +464,10 @@ SCRIPTSTATE ss;
475464
DISPID CScriptEngine::GetDispid (const CString & strName)
476465
{
477466

478-
#ifdef USE_LUA
479-
480467
// Do Lua differently
481468
if (L)
482469
return GetLuaDispid (strName);
483470

484-
#endif // USE_LUA
485-
486471
if (!m_pDispatch)
487472
return DISPID_UNKNOWN; // no script engine
488473

@@ -586,17 +571,13 @@ CString str;
586571
void CScriptEngine::DisableScripting (void)
587572
{
588573

589-
#ifdef USE_LUA
590-
591574
// Do Lua differently
592575
if (L)
593576
{
594577
CloseLua ();
595578
return;
596579
}
597580

598-
#endif // USE_LUA
599-
600581
// release engine
601582

602583
if (m_IActiveScript)

scripting/scripting.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#ifdef USE_LUA
4-
53
extern "C"
64
{
75
#include "lua.h"
@@ -21,8 +19,6 @@ void LuaError (lua_State *L,
2119
LPCTSTR strReason = "",
2220
CMUSHclientDoc * pDoc = NULL);
2321

24-
#endif // USE_LUA
25-
2622
class CScriptEngine : public CObject
2723
{
2824

@@ -36,9 +32,7 @@ class CScriptEngine : public CObject
3632
m_IActiveScriptParse = NULL;
3733
m_site = NULL;
3834
m_pDispatch = NULL;
39-
#ifdef USE_LUA
4035
L = NULL;
41-
#endif // USE_LUA
4236
}; // end of constructor
4337

4438
~CScriptEngine () // destructor
@@ -65,8 +59,6 @@ class CScriptEngine : public CObject
6559
bool ShowError (const HRESULT result, const CString strMsg);
6660
void DisableScripting (void);
6761

68-
#ifdef USE_LUA
69-
7062
void OpenLua ();
7163
void OpenLuaDelayed ();
7264
void CloseLua ();
@@ -103,8 +95,6 @@ class CScriptEngine : public CObject
10395
const bool IsLua () const { return L != NULL; }
10496
lua_State * L; // Lua state
10597

106-
#endif // USE_LUA
107-
10898
private:
10999

110100
IActiveScript * m_IActiveScript; // VBscript interface

stdafx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#define USE_PYTHON // Nick's "use Python" extension ;)
2525
#define USE_TCL // Nick's "use TCL" extension ;)
26-
#define USE_LUA // Nick's "use LUA" extension ;)
2726
#define USE_PHP // Nick's "use PHP" extension ;)
2827
#define USE_RUBY // Nick's "use Ruby" extension ;)
2928

xml/xml_load_world.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,9 +2340,7 @@ void CMUSHclientDoc::Load_Plugin_XML (CXMLelement & parent)
23402340
#ifdef USE_TCL
23412341
&& m_CurrentPlugin->m_strLanguage != "tclscript"
23422342
#endif
2343-
#ifdef USE_LUA
23442343
&& m_CurrentPlugin->m_strLanguage != "lua"
2345-
#endif
23462344
#ifdef USE_PHP
23472345
&& m_CurrentPlugin->m_strLanguage != "phpscript"
23482346
#endif

0 commit comments

Comments
 (0)