Skip to content

Commit 5e31cdf

Browse files
committed
Merge remote-tracking branch 'official-hxcpp/master'
2 parents 6dfac96 + 95ebfc3 commit 5e31cdf

1,151 files changed

Lines changed: 477633 additions & 505309 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project/thirdparty/*/** linguist-vendored

.github/workflows/main.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: CI
2+
on: [push]
3+
4+
jobs:
5+
build_matrix:
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest, windows-latest, macos-latest]
9+
runs-on: ${{ matrix.os }}
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- uses: krdlab/setup-haxe@v1
15+
with:
16+
haxe-version: 4.3.0
17+
18+
- name: Set Haxelib
19+
run: |
20+
haxe -version
21+
haxelib dev hxcpp .
22+
23+
- name: Set Version
24+
run: haxe -cp tools/version --run Write ${{github.run_number}} > version.env
25+
26+
27+
- name: Build Tool
28+
run: |
29+
cd tools/hxcpp
30+
haxe compile.hxml
31+
32+
33+
- name: Check XCode
34+
if: startsWith(matrix.os,'macos')
35+
run: xcode-select -p
36+
37+
- name: Build Cppia
38+
run: |
39+
cd project
40+
haxe compile-cppia.hxml -D HXCPP_M64
41+
42+
- name: Clean Project
43+
if: startsWith(matrix.os,'ubuntu')
44+
run: |
45+
rm -rf project/cppia_bin
46+
47+
- name: Archive Linux Results
48+
if: startsWith(matrix.os,'ubuntu')
49+
uses: actions/upload-artifact@v3
50+
with:
51+
name: linux-64
52+
path: |
53+
bin/Linux64/Cppia
54+
tools
55+
toolchain
56+
version.env
57+
src
58+
run.n
59+
include
60+
hxcpp.n
61+
haxelib.json
62+
Changes.md
63+
hxcpp
64+
test
65+
docs
66+
project
67+
README.md
68+
build-tool
69+
java
70+
haxelib.xml
71+
LICENSE.txt
72+
73+
- name: Archive Windows Results
74+
if: startsWith(matrix.os,'windows')
75+
uses: actions/upload-artifact@v3
76+
with:
77+
name: windows-64
78+
path: |
79+
bin/Windows64/Cppia.exe
80+
81+
- name: Archive Mac Results
82+
if: startsWith(matrix.os,'macos')
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: mac-64
86+
path: |
87+
bin/Mac64/Cppia
88+
release:
89+
name: Release
90+
needs: build_matrix
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Download Linux
94+
uses: actions/download-artifact@v3
95+
with:
96+
name: linux-64
97+
path: hxcpp
98+
99+
- name: Download Mac
100+
uses: actions/download-artifact@v3
101+
with:
102+
name: mac-64
103+
path: hxcpp/bin/Mac64/
104+
105+
- name: Download Windows
106+
uses: actions/download-artifact@v3
107+
with:
108+
name: windows-64
109+
path: hxcpp/bin/Windows64/
110+
111+
- name: List Files
112+
run: ls -R
113+
114+
- name: Get Version
115+
run: |
116+
cat hxcpp/version.env
117+
cat hxcpp/version.env >> $GITHUB_ENV
118+
rm hxcpp/version.env
119+
120+
- name: Zip release
121+
run: |
122+
mv hxcpp hxcpp-${{ env.hxcpp_release }}
123+
zip -r hxcpp-${{ env.hxcpp_release }}.zip hxcpp-${{ env.hxcpp_release }}
124+
125+
- name: Create Release
126+
id: create_release
127+
uses: actions/create-release@v1
128+
env:
129+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130+
with:
131+
tag_name: v${{ env.hxcpp_release }}
132+
release_name: Release ${{ env.hxcpp_release }}
133+
draft: false
134+
prerelease: false
135+
136+
- name: Upload Release Asset
137+
id: upload-release-asset
138+
uses: actions/upload-release-asset@v1
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
with:
142+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
143+
asset_path: ./hxcpp-${{ env.hxcpp_release }}.zip
144+
asset_name: hxcpp-${{ env.hxcpp_release }}.zip
145+
asset_content_type: application/zip
146+
147+
148+

Changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
4.3
3+
------------------------------------------------------------
4+
5+
* Bug fixes
6+
* Upgrade to 4.3 API
7+
* Use PCRE v2
8+
9+
4.2
10+
------------------------------------------------------------
211

312
* Update MIN_IOS_VERSION
413
* Bug fixes

haxelib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "BSD",
55
"tags": ["haxe", "hxcpp", "cpp"],
66
"description": "Hxcpp is the runtime support for the C++ backend of the Haxe compiler. This contains the headers, libraries and support code required to generate a fully compiled executable from Haxe code.",
7-
"version": "4.2.0",
7+
"version": "4.3.0",
88
"releasenote": "See Changes.md",
99
"contributors": ["gamehaxe", "HaxeFoundation"],
1010
"binaryversion": 48,

include/Array.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ template<> struct ReturnNull<unsigned char> { typedef Dynamic type; };
4444
template<> struct ReturnNull<short> { typedef Dynamic type; };
4545
template<> struct ReturnNull<unsigned short> { typedef Dynamic type; };
4646
template<> struct ReturnNull<unsigned int> { typedef Dynamic type; };
47-
template<> struct ReturnNull<::cpp::Int64> { typedef Dynamic type; };
47+
template<> struct ReturnNull< ::cpp::Int64> { typedef Dynamic type; };
4848

4949
template<typename T>
5050
struct ArrayTraits { enum { StoreType = arrayObject }; };
@@ -53,7 +53,7 @@ template<> struct ArrayTraits<float> { enum { StoreType = arrayFloat}; };
5353
template<> struct ArrayTraits<double> { enum { StoreType = arrayFloat}; };
5454
template<> struct ArrayTraits<Dynamic> { enum { StoreType = arrayObject }; };
5555
template<> struct ArrayTraits<String> { enum { StoreType = arrayString }; };
56-
template<> struct ArrayTraits<::cpp::Int64> { enum { StoreType = arrayInt64 }; };
56+
template<> struct ArrayTraits< ::cpp::Int64> { enum { StoreType = arrayInt64 }; };
5757

5858
}
5959

@@ -461,7 +461,7 @@ template<> inline bool *NewNull<bool>() { bool b=0; return (bool *)hx::NewGCPriv
461461
template<> inline double *NewNull<double>() { double d=0.0; return (double *)hx::NewGCPrivate(&d,sizeof(d)); }
462462
template<> inline float *NewNull<float>() { float d=0.0f; return (float *)hx::NewGCPrivate(&d,sizeof(d)); }
463463
template<> inline unsigned char *NewNull<unsigned char>() { unsigned char u=0; return (unsigned char *)hx::NewGCPrivate(&u,sizeof(u)); }
464-
template<> inline ::cpp::Int64 *NewNull<::cpp::Int64>() { ::cpp::Int64 i=0; return (::cpp::Int64 *)hx::NewGCPrivate(&i,sizeof(i)); }
464+
template<> inline ::cpp::Int64 *NewNull< ::cpp::Int64>() { ::cpp::Int64 i=0; return (::cpp::Int64 *)hx::NewGCPrivate(&i,sizeof(i)); }
465465

466466

467467
bool DynamicEq(const Dynamic &a, const Dynamic &b);
@@ -478,7 +478,7 @@ template<> struct ArrayClassId<signed int> { enum { id=hx::clsIdArrayInt }; };
478478
template<> struct ArrayClassId<float> { enum { id=hx::clsIdArrayFloat32 }; };
479479
template<> struct ArrayClassId<double> { enum { id=hx::clsIdArrayFloat64 }; };
480480
template<> struct ArrayClassId<String> { enum { id=hx::clsIdArrayString }; };
481-
template<> struct ArrayClassId<::cpp::Int64> { enum { id=hx::clsIdArrayInt64 }; };
481+
template<> struct ArrayClassId< ::cpp::Int64> { enum { id=hx::clsIdArrayInt64 }; };
482482

483483
// sort...
484484
#include <algorithm>

include/Dynamic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ inline bool Dynamic::IsClass<String>() { return mPtr && mPtr->__GetClass()==hx::
421421
template<>
422422
inline bool Dynamic::IsClass<Dynamic>() { return true; }
423423
template<>
424-
inline bool Dynamic::IsClass<::cpp::Int64>() { return mPtr && mPtr->__GetClass()==hx::GetInt64Class(); }
424+
inline bool Dynamic::IsClass< ::cpp::Int64>() { return mPtr && mPtr->__GetClass()==hx::GetInt64Class(); }
425425

426426
inline String Dynamic::operator+(const String &s) const { return Cast<String>() + s; }
427427

include/cpp/VirtualArray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES VirtualArray_obj : public hx::ArrayCommon
609609
// Build dynamic array from foreign array
610610
template<typename SOURCE_>
611611
VirtualArray::VirtualArray( const Array<SOURCE_> &inRHS )
612-
: super( new VirtualArray_obj( inRHS.mPtr, true) )
612+
: super( !inRHS.mPtr ? 0 : new VirtualArray_obj( inRHS.mPtr, true) )
613613
{
614614
}
615615

include/hx/Class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ template<>
3333
inline hx::Class &ClassOf<String>() { return GetStringClass(); }
3434

3535
template<>
36-
inline hx::Class &ClassOf<::cpp::Int64>() { return GetInt64Class(); }
36+
inline hx::Class &ClassOf< ::cpp::Int64>() { return GetInt64Class(); }
3737

3838

3939
template<typename T>

include/hx/Native.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
77
*/
88

9+
#include <stdio.h>
10+
911
#ifndef HXCPP_H
1012
#define HXCPP_H
1113
typedef double Float;

include/hxString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class HXCPP_EXTERN_CLASS_ATTRIBUTES String
166166
inline const char *c_str() const { return utf8_str(); }
167167
inline const char *out_str(hx::IStringAlloc *inBuffer = 0) const { return utf8_str(inBuffer,false); }
168168
const wchar_t *wchar_str(hx::IStringAlloc *inBuffer = 0) const;
169-
const char16_t *wc_str(hx::IStringAlloc *inBuffer = 0) const;
169+
const char16_t *wc_str(hx::IStringAlloc *inBuffer = 0, int *outCharLength = 0) const;
170170

171171
const char *__CStr() const { return utf8_str(); };
172172
const wchar_t *__WCStr() const { return wchar_str(0); }

0 commit comments

Comments
 (0)