Skip to content

Commit a615a61

Browse files
authored
Merge pull request livecode#6071 from montegoulding/lcidlc
[[ LCIDLC ]] Fix issues building lcidl based externals
2 parents 5306e62 + cf6b6a4 commit a615a61

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

lcidlc/src/InterfaceGenerate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ static bool InterfaceGenerateExports(InterfaceRef self, CoderRef p_coder)
17091709
NameGetCString(t_handler -> name),
17101710
NameGetCString(t_handler -> name));
17111711
}
1712-
CoderWriteLine(p_coder, "\t{ 0 }\n};");
1712+
CoderWriteLine(p_coder, "\t{ 0, nullptr, nullptr }\n};");
17131713

17141714
CoderWriteLine(p_coder, "");
17151715

lcidlc/src/Support.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <stdio.h>
1919
#include <stdlib.h>
2020
#include <string.h>
21+
#include <stdint.h>
2122

2223
#ifdef __OBJC__
2324
#import <Foundation/Foundation.h>
@@ -49,10 +50,9 @@
4950

5051
#ifdef __WINDOWS__
5152
#include <windows.h>
52-
typedef unsigned int uint32_t;
53+
#define strcasecmp _stricmp
5354
#else
5455
#include <pthread.h>
55-
#include <stdint.h>
5656
#endif
5757

5858
////////////////////////////////////////////////////////////////////////////////
@@ -1147,7 +1147,7 @@ static LCError LCArrayResolvePath(LCArrayRef p_array, unsigned int p_options, co
11471147
t_key = (MCVariableRef)p_array;
11481148

11491149
// SN-2015-01-15: [[ Bug 14057 ]] Use the UTF8 string if possible.
1150-
int32_t t_option;
1150+
uint32_t t_option;
11511151
if (s_interface -> version < 6)
11521152
t_option = kMCOptionAsCString;
11531153
else
@@ -1443,7 +1443,7 @@ LCError LCArrayStoreKeyOnPath(LCArrayRef p_array, unsigned int p_options, const
14431443
t_key = (MCVariableRef)p_array;
14441444

14451445
// SN-2015-01-15: [[ Bug 14057 ]] Use the UTF8 string if possible.
1446-
int32_t t_option;
1446+
uint32_t t_option;
14471447
if (s_interface -> version < 6)
14481448
t_option = kMCOptionAsCString;
14491449
else
@@ -2744,7 +2744,7 @@ void LCExceptionRaise(const char *p_format, ...)
27442744
va_end(args);
27452745

27462746
free(s_error);
2747-
s_error = (char *)malloc(length);
2747+
s_error = (char *)malloc(length+1);
27482748
if (s_error == nil)
27492749
return;
27502750

@@ -2864,7 +2864,7 @@ static bool default__cstring(const char *arg, char*& r_value)
28642864
{
28652865
char *t_arg_copy;
28662866
t_arg_copy = strdup(arg);
2867-
if (r_value != nil)
2867+
if (t_arg_copy != nil)
28682868
{
28692869
r_value = t_arg_copy;
28702870
return true;

0 commit comments

Comments
 (0)