Skip to content

Commit bf76842

Browse files
committed
[[ Script ]] Tweaks to stdscript modules and files to make them compile and not conflict.
1 parent 6bc3a48 commit bf76842

File tree

13 files changed

+28
-11
lines changed

13 files changed

+28
-11
lines changed

libscript/libscript.xcodeproj/project.pbxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
4D79B6931A273BBB00DD750C /* module-bitwise.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B65B1A273BA000DD750C /* module-bitwise.cpp */; };
3636
4D79B6941A273BBB00DD750C /* module-byte.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B65C1A273BA000DD750C /* module-byte.cpp */; };
3737
4D79B6951A273BBB00DD750C /* module-char.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B65D1A273BA000DD750C /* module-char.cpp */; };
38-
4D79B6961A273BBB00DD750C /* module-encoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B65E1A273BA000DD750C /* module-encoding.cpp */; };
3938
4D79B6981A273BBB00DD750C /* module-list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B6601A273BA000DD750C /* module-list.cpp */; };
4039
4D79B6991A273BBB00DD750C /* module-logic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B6611A273BA000DD750C /* module-logic.cpp */; };
4140
4D79B69A1A273BBB00DD750C /* module-map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D79B6621A273BA000DD750C /* module-map.cpp */; };
@@ -556,7 +555,6 @@
556555
4D79B6931A273BBB00DD750C /* module-bitwise.cpp in Sources */,
557556
4D79B6941A273BBB00DD750C /* module-byte.cpp in Sources */,
558557
4D79B6951A273BBB00DD750C /* module-char.cpp in Sources */,
559-
4D79B6961A273BBB00DD750C /* module-encoding.cpp in Sources */,
560558
4D79B6981A273BBB00DD750C /* module-list.cpp in Sources */,
561559
4D79B6991A273BBB00DD750C /* module-logic.cpp in Sources */,
562560
4D79B69A1A273BBB00DD750C /* module-map.cpp in Sources */,

libscript/src/byte.mlc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This module specifies the syntax definitions and bindings for operations on binary data in modular LiveCode.
33
*/
44

5-
module com.livecode.binary
5+
module com.livecode.byte
66

77
foreign handler EvalNumberOfBytesIn(in Target as data, out Count as index) as undefined binds to "<builtin>"
88

libscript/src/item.mlc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module com.livecode.itemchunk
1+
module com.livecode.item
22

33
foreign handler FetchItemOf(in Index as index, in Target as string, out Value as string) as undefined binds to "<builtin>"
44
foreign handler StoreItemOf(in Value as string, in Index as index, inout Target as string) as undefined binds to "<builtin>"

libscript/src/line.mlc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module com.livecode.linechunk
1+
module com.livecode.line
22

33
foreign handler FetchLineOf(in Index as index, in Target as string, out Value as string) as undefined binds to "<builtin>"
44
foreign handler StoreLineOf(in Value as string, in Index as index, inout Target as string) as undefined binds to "<builtin>"

libscript/src/module-bitwise.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ extern "C" void MCBitwiseEvalBitwiseShift(integer_t p_operand, integer_t p_shift
4747

4848
////////////////////////////////////////////////////////////////////////////////////////////////////
4949

50+
#ifdef _TEST
5051
void MCBitwiseRunTests()
5152
{
5253

5354
}
55+
#endif
56+

libscript/src/module-byte.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ extern "C" void MCByteStoreBeforeByteOf(MCDataRef p_value, index_t p_index, MCDa
166166

167167
////////////////////////////////////////////////////////////////////////////////////////////////////
168168

169+
#ifdef _TEST
169170
extern void log(const char *module, const char *test, bool result);
170171
#define log_result(test, result) log("BYTE MODULE", test, result)
171172
void MCByteRunTests()
@@ -273,3 +274,5 @@ void MCByteRunTests()
273274

274275
log_result("first offset of bytes before no occurrences", t_offset == 0);
275276
}
277+
#endif
278+

libscript/src/module-char.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ void MCCharEvalEndsWith(MCHandlerContext& ctxt, MCStringRef p_source, MCStringRe
150150

151151
////////////////////////////////////////////////////////////////////////////////////////////////////
152152

153+
#ifdef _TEST
153154
extern void log(const char *module, const char *test, bool result);
154155
#define log_result(test, result) log("CHAR MODULE", test, result)
155156
void MCCharRunTests()
156157
{
157158
// Need handler context object to test
158-
}
159+
}
160+
#endif

libscript/src/module-encoding.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ void MCEncodingEvalURLDecoded(MCStringRef p_target, MCStringRef& r_output)
166166

167167
////////////////////////////////////////////////////////////////////////////////////////////////////
168168

169+
#ifdef _TEST
169170
extern void log(const char *module, const char *test, bool result);
170171
#define log_result(test, result) log("ENCODING MODULE", test, result)
171172
void MCEncodingRunTests()
@@ -247,4 +248,5 @@ void MCEncodingExecDecompress(MCDataRef& x_target)
247248

248249
log_result("url decode %3F", MCStringIsEqualTo(*t_decoded2, t_test_c, kMCStringOptionCompareCaseless));
249250

250-
}
251+
}
252+
#endif

libscript/src/module-list.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extern "C" void MCListSpliceAfterElementOf(MCProperListRef p_list, index_t p_ind
157157

158158
////////////////////////////////////////////////////////////////////////////////////////////////////
159159

160+
#ifdef _TEST
160161
extern void log(const char *module, const char *test, bool result);
161162
#define log_result(test, result) log("LIST MODULE", test, result)
162163
void MCListRunTests()
@@ -244,4 +245,5 @@ void MCListRunTests()
244245
log_result("splice into element", t_num == 2 && !t_result);
245246

246247
MCValueRelease(t_lst);
247-
}
248+
}
249+
#endif

libscript/src/module-map.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ void MCMapStoreElementOfMatrix(MCValueRef p_value, MCArrayRef& x_target, MCPrope
293293
// ctxt . Throw()
294294
}
295295

296+
#ifdef _TEST
296297
extern void log(const char *module, const char *test, bool result);
297298
#define log_result(test, result) log("MAP MODULE", test, result)
298299
void MCMapRunTests()
@@ -509,4 +510,5 @@ void MCMapRunTests()
509510
MCValueRelease(t_matrix);
510511

511512
log_result("store/fetch element of matrix", t_value == kMCTrue);
512-
}
513+
}
514+
#endif

0 commit comments

Comments
 (0)