Skip to content

Commit 940dcb1

Browse files
committed
Added Delphi 10.3 support.
1 parent a7367c2 commit 940dcb1

File tree

5 files changed

+110
-102
lines changed

5 files changed

+110
-102
lines changed

Delphinus.Info.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{
2-
"id": "{0AE3CEFD-7687-4190-92F7-7940BED824C0}",
3-
"name": "Hprose",
4-
"picture": "Logo.png",
5-
"license_type": "MIT",
6-
"license_file": "LICENSE.md",
7-
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64",
8-
"package_compiler_min": 14,
9-
"package_compiler_max": 32,
10-
"compiler_min": 14,
11-
"compiler_max": 32,
12-
"first_version": "2.0.1",
13-
"version": "2.0.1"
1+
{
2+
"id": "{0AE3CEFD-7687-4190-92F7-7940BED824C0}",
3+
"name": "Hprose",
4+
"picture": "Logo.png",
5+
"license_type": "MIT",
6+
"license_file": "LICENSE.md",
7+
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64",
8+
"package_compiler_min": 14,
9+
"package_compiler_max": 32,
10+
"compiler_min": 14,
11+
"compiler_max": 32,
12+
"first_version": "2.0.1",
13+
"version": "2.0.2"
1414
}

Delphinus.Install.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
{
2-
"search_pathes": [{
3-
"pathes": "Source",
4-
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64"
5-
}],
6-
"browsing_pathes": [{
7-
"pathes": "Source",
8-
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64"
9-
}],
10-
"source_folders": [{
11-
"folder": "."
12-
},
13-
{
14-
"folder": "CppBuilder",
15-
"recursive": true
16-
},
17-
{
18-
"folder": "Icons",
19-
"recursive": true
20-
},
21-
{
22-
"folder": "Lazarus",
23-
"recursive": true
24-
},
25-
{
26-
"folder": "Packages",
27-
"recursive": true
28-
},
29-
{
30-
"folder": "Source",
31-
"recursive": true
32-
},
33-
{
34-
"folder": "Test",
35-
"recursive": true
36-
}]
1+
{
2+
"search_pathes": [{
3+
"pathes": "Source",
4+
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64"
5+
}],
6+
"browsing_pathes": [{
7+
"pathes": "Source",
8+
"platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64"
9+
}],
10+
"source_folders": [{
11+
"folder": "."
12+
},
13+
{
14+
"folder": "CppBuilder",
15+
"recursive": true
16+
},
17+
{
18+
"folder": "Icons",
19+
"recursive": true
20+
},
21+
{
22+
"folder": "Lazarus",
23+
"recursive": true
24+
},
25+
{
26+
"folder": "Packages",
27+
"recursive": true
28+
},
29+
{
30+
"folder": "Source",
31+
"recursive": true
32+
},
33+
{
34+
"folder": "Test",
35+
"recursive": true
36+
}]
3737
}

README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
<p align="center"><img src="http://hprose.com/[email protected]" alt="Hprose" title="Hprose" width="650" height="200" /></p>
2-
3-
# Hprose for Delphi/Lazarus
4-
5-
[![Join the chat at https://gitter.im/hprose/hprose-delphi](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hprose/hprose-delphi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6-
[![Supported Delphi versions: delphi6-delphi10.1](https://img.shields.io/badge/delphi-6~10.2-blue.svg) ![Supported FreePascal versions: freepascal2-freepascal3](https://img.shields.io/badge/freepascal-2~3-blue.svg)](https://github.com/hprose/hprose-delphi) [![GitHub release](https://img.shields.io/github/release/hprose/hprose-delphi.svg)](https://github.com/hprose/hprose-delphi/releases)
7-
8-
*Hprose* is a High Performance Remote Object Service Engine.
9-
10-
It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.
11-
12-
*Hprose* supports many programming languages, for example:
13-
14-
* AAuto Quicker
15-
* ActionScript
16-
* ASP
17-
* C++
18-
* Dart
19-
* Delphi/Lazarus
20-
* dotNET(C#, Visual Basic...)
21-
* Golang
22-
* Java
23-
* JavaScript
24-
* Node.js
25-
* Objective-C
26-
* Perl
27-
* PHP
28-
* Python
29-
* Ruby
30-
* ...
31-
32-
Through *Hprose*, You can conveniently and efficiently intercommunicate between those programming languages.
33-
34-
This project is the implementation of Hprose for Delphi/Lazarus.
35-
36-
## Miscellaneous
37-
You can install [Delphinus package manager](https://github.com/Memnarch/Delphinus/wiki/Installing-Delphinus) and install Hprose as a package there. (Delphinus-Support)
1+
<p align="center"><img src="http://hprose.com/[email protected]" alt="Hprose" title="Hprose" width="650" height="200" /></p>
2+
3+
# Hprose for Delphi/Lazarus
4+
5+
[![Join the chat at https://gitter.im/hprose/hprose-delphi](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hprose/hprose-delphi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
[![Supported Delphi versions: delphi6-delphi10.3](https://img.shields.io/badge/delphi-6~10.3-blue.svg) ![Supported FreePascal versions: freepascal2-freepascal3](https://img.shields.io/badge/freepascal-2~3-blue.svg)](https://github.com/hprose/hprose-delphi) [![GitHub release](https://img.shields.io/github/release/hprose/hprose-delphi.svg)](https://github.com/hprose/hprose-delphi/releases)
7+
8+
*Hprose* is a High Performance Remote Object Service Engine.
9+
10+
It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.
11+
12+
*Hprose* supports many programming languages, for example:
13+
14+
* AAuto Quicker
15+
* ActionScript
16+
* ASP
17+
* C++
18+
* Dart
19+
* Delphi/Lazarus
20+
* dotNET(C#, Visual Basic...)
21+
* Golang
22+
* Java
23+
* JavaScript
24+
* Node.js
25+
* Objective-C
26+
* Perl
27+
* PHP
28+
* Python
29+
* Ruby
30+
* ...
31+
32+
Through *Hprose*, You can conveniently and efficiently intercommunicate between those programming languages.
33+
34+
This project is the implementation of Hprose for Delphi/Lazarus.
35+
36+
## Miscellaneous
37+
You can install [Delphinus package manager](https://github.com/Memnarch/Delphinus/wiki/Installing-Delphinus) and install Hprose as a package there. (Delphinus-Support)

Source/Hprose.inc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@
9595
{$DEFINE DELPHI10_2_UP}
9696
{$ENDIF}
9797

98+
{$IFDEF VER330}
99+
{$DEFINE DELPHI10_3}
100+
{$DEFINE DELPHI10_3_UP}
101+
{$ENDIF}
102+
103+
{$IFDEF DELPHI10_3_UP}
104+
{$DEFINE DELPHI10_2_UP}
105+
{$ENDIF}
106+
98107
{$IFDEF DELPHI10_2_UP}
99108
{$DEFINE DELPHI10_1_UP}
100109
{$ENDIF}

Source/HproseIO.pas

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* *
1515
* hprose io unit for delphi. *
1616
* *
17-
* LastModified: Apr 30, 2018 *
17+
* LastModified: Dec 11, 2018 *
1818
* Author: Ma Bingyao <[email protected]> *
1919
* *
2020
\**********************************************************/
@@ -303,13 +303,13 @@ THproseWriter = class
303303
procedure WriteArray(const Value: Variant); overload;
304304
procedure WriteArrayWithRef(const Value: Variant); overload;
305305
procedure WriteArray(const Value: array of const); overload;
306+
procedure WriteArray(const Value: TVariants); overload;
306307
procedure WriteList(const AList: IList); overload;
307308
procedure WriteListWithRef(const AList: IList); overload;
308309
procedure WriteMap(const AMap: IMap); overload;
309310
procedure WriteMapWithRef(const AMap: IMap);
310311
{$IFDEF SUPPORTS_GENERICS}
311312
procedure Serialize<T>(const Value: T); overload;
312-
procedure WriteArray(const DynArray: TVariants); overload;
313313
procedure WriteArray<T>(const DynArray: array of T); overload;
314314
procedure WriteDynArray<T>(const DynArray: TArray<T>);
315315
procedure WriteDynArrayWithRef<T>(const DynArray: TArray<T>); overload;
@@ -2946,6 +2946,19 @@ procedure THproseWriter.WriteRawBytes(const Bytes: TBytes);
29462946
FStream.WriteBuffer(Bytes[0], Length(Bytes));
29472947
end;
29482948

2949+
procedure THproseWriter.WriteArray(const Value: TVariants);
2950+
var
2951+
Count, I: Integer;
2952+
begin
2953+
FRefer.SetRef(Null);
2954+
Count := Length(Value);
2955+
FStream.WriteBuffer(HproseTagList, 1);
2956+
if Count > 0 then WriteRawBytes(BytesOf(IntToStr(Count)));
2957+
FStream.WriteBuffer(HproseTagOpenbrace, 1);
2958+
for I := 0 to Count - 1 do Serialize(Value[I]);
2959+
FStream.WriteBuffer(HproseTagClosebrace, 1);
2960+
end;
2961+
29492962
procedure THproseWriter.WriteArray(const Value: array of const);
29502963
var
29512964
I, N: Integer;
@@ -4292,20 +4305,6 @@ procedure THproseWriter.Serialize<T>(const Value: T);
42924305
Serialize(Value, TypeInfo(T));
42934306
end;
42944307

4295-
procedure THproseWriter.WriteArray(const DynArray: TVariants);
4296-
var
4297-
Count, I: Integer;
4298-
begin
4299-
FRefer.SetRef(Null);
4300-
Count := Length(DynArray);
4301-
FStream.WriteBuffer(HproseTagList, 1);
4302-
if Count > 0 then WriteRawBytes(BytesOf(IntToStr(Count)));
4303-
FStream.WriteBuffer(HproseTagOpenbrace, 1);
4304-
for I := 0 to Count - 1 do Serialize(DynArray[I]);
4305-
FStream.WriteBuffer(HproseTagClosebrace, 1);
4306-
end;
4307-
4308-
43094308
procedure THproseWriter.WriteArray<T>(const DynArray: array of T);
43104309
var
43114310
Count, I: Integer;

0 commit comments

Comments
 (0)