Skip to content

Commit 3f2c90f

Browse files
committed
Merge remote-tracking branch 'official-hxcpp/master'
2 parents e81bc54 + 18f87b9 commit 3f2c90f

7 files changed

Lines changed: 12 additions & 15 deletions

File tree

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ stages:
2525
- template: tools/azure-pipelines/build.yml
2626
parameters:
2727
name: Mac
28-
vmImage: macOS-10.15
28+
vmImage: macOS-12
2929
platform: mac
3030
arch: 64
3131
- template: tools/azure-pipelines/build.yml

include/Dynamic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES Dynamic : public hx::ObjectPtr<hx::Object>
3838
Dynamic(const cpp::Variant &inRHS) : super(inRHS.asDynamic()) { }
3939
template<typename T>
4040
Dynamic(const hx::Native<T *> &inInterface):super(inInterface.ptr ? inInterface->__GetRealObject() : (hx::Object *)0 ) { }
41-
#if !defined(__GNUC__) || (defined(__WORDSIZE) && (__WORDSIZE != 64))
41+
#if !defined(__GNUC__) || defined(__MINGW32__) || (defined(__WORDSIZE) && (__WORDSIZE != 64))
4242
Dynamic(long inVal);
4343
Dynamic(unsigned long inVal);
4444
#endif
@@ -408,7 +408,7 @@ HXCPP_EXTERN_CLASS_ATTRIBUTES hx::Class &GetInt64Class();
408408
template<>
409409
inline bool Dynamic::IsClass<int>() { return mPtr && mPtr->__GetClass()==hx::GetIntClass(); }
410410
template<>
411-
inline bool Dynamic::IsClass<double>() { return mPtr &&
411+
inline bool Dynamic::IsClass<double>() { return mPtr &&
412412
( mPtr->__GetClass()==hx::GetIntClass() || mPtr->__GetClass()==hx::GetFloatClass()) ; }
413413
template<>
414414
inline bool Dynamic::IsClass<float>() { return mPtr && mPtr->__GetClass()==hx::GetFloatClass(); }
@@ -458,7 +458,7 @@ bool operator==(Platform::Box<T> ^inPtr, nullptr_t)
458458
inline bool operator op (float inLHS,const ::Dynamic &inRHS) \
459459
{ return inRHS.IsNumeric() && ((double)inLHS op (double)inRHS); } \
460460
inline bool operator op (int inLHS,const ::Dynamic &inRHS) \
461-
{ return inRHS.IsNumeric() && (inLHS op (double)inRHS); }
461+
{ return inRHS.IsNumeric() && (inLHS op (double)inRHS); }
462462

463463
COMPARE_DYNAMIC_OP( < )
464464
COMPARE_DYNAMIC_OP( <= )

src/Dynamic.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class StructData : public hx::Object
302302
diff = __GetType() - inRHS->__GetType();
303303
if (diff==0)
304304
diff = memcmp( mValue, inRHS->__GetHandle(), mLength );
305-
305+
306306
if (diff<0) return -1;
307307
if (diff>0) return 1;
308308
return 0;
@@ -386,7 +386,7 @@ Dynamic::Dynamic(short inVal)
386386
mPtr = fromInt(inVal);
387387
}
388388

389-
#if !defined(__GNUC__) || (defined(__WORDSIZE) && (__WORDSIZE != 64))
389+
#if !defined(__GNUC__) || defined(__MINGW32__) || (defined(__WORDSIZE) && (__WORDSIZE != 64))
390390
Dynamic::Dynamic(unsigned long inVal)
391391
{
392392
mPtr = fromInt(inVal);
@@ -642,5 +642,3 @@ void Dynamic::__boot()
642642
Static(__ObjcClass) = hx::_hx_RegisterClass(HX_CSTRING("objc::BoxedType"),IsPointer,sNone,sNone, 0,0,&__ObjcClass );
643643
#endif
644644
}
645-
646-

src/hx/Debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void CriticalErrorHandler(String inErr, bool allowFixup)
8989
DBGLOG("Critical Error: %s\n", inErr.utf8_str());
9090

9191
#if defined(HX_WINDOWS) && !defined(HX_WINRT)
92-
MessageBoxA(0, inErr.utf8_str(), "Critial Error - program must terminate",
92+
MessageBoxA(0, inErr.utf8_str(), "Critical Error - program must terminate",
9393
MB_ICONEXCLAMATION|MB_OK);
9494
#endif
9595

src/hx/libs/std/Socket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Mingw / gcc on windows
1212
#define _WIN32_WINNT 0x0501
1313
#include <winsock2.h>
14-
# include <Ws2tcpip.h>
14+
#include <ws2tcpip.h>
1515
#else
1616
// Windows...
1717
#include <winsock2.h>
@@ -412,7 +412,7 @@ Array<unsigned char> _hx_std_host_resolve_ipv6( String host, bool )
412412
memset(&hints, 0, sizeof(struct addrinfo));
413413
hints.ai_family = AF_INET6; // IPv6
414414
hints.ai_socktype = 0; // any - SOCK_STREAM or SOCK_DGRAM
415-
hints.ai_flags = AI_PASSIVE; // For wildcard IP address
415+
hints.ai_flags = AI_PASSIVE; // For wildcard IP address
416416
hints.ai_protocol = 0; // Any protocol
417417
hints.ai_canonname = 0;
418418
hints.ai_addr = 0;

test/native/tests/TestNativeEnum.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package tests;
22

33
// Uses native enum, which does not play nice with Dynamic - must use @:unreflective
44
@:unreflective
5-
@:enum extern abstract SystemMetric(SystemMetricImpl) {
5+
#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SystemMetric(SystemMetricImpl) {
66
@:native("wxSYS_MOUSE_BUTTONS") var MOUSE_BUTTONS;
77
@:native("wxSYS_OS") var OS;
88
}
@@ -13,7 +13,7 @@ extern class SystemMetricImpl { }
1313

1414

1515
// Wraps enum in struct, which does play nice...
16-
@:enum extern abstract SystemMetricStruct(SystemMetricStructImpl) {
16+
#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SystemMetricStruct(SystemMetricStructImpl) {
1717
@:native("wxSYS_MOUSE_BUTTONS") var MOUSE_BUTTONS;
1818
@:native("wxSYS_OS") var OS;
1919
}

tools/hxcpp/CopyFile.hx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ class CopyFile
8888
}
8989
}
9090

91-
@:enum
92-
abstract Overwrite(String) from String to String
91+
#if (haxe_ver >= 4.0) enum #else @:enum #end abstract Overwrite(String) from String to String
9392
{
9493
var ALWAYS = "always";
9594
var IF_NEWER = "ifNewer";

0 commit comments

Comments
 (0)