summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authormarcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-12-18 14:35:15 +0000
committermarcus <marcus@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-12-18 14:35:15 +0000
commit6c010262da0a8619374b8227ce60f7e93936ac0c (patch)
tree175b40ab0628691b783366054322c68a50611d80 /packages
parentb6e8fff154d9f35daea4825836de50f9fd3c11b6 (diff)
downloadfpc-6c010262da0a8619374b8227ce60f7e93936ac0c.tar.gz
Amiga: AsTag/TAG_ with unsigned overloads
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@35164 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages')
-rw-r--r--packages/amunits/src/coreunits/utility.pas12
-rw-r--r--packages/arosunits/src/utility.pas12
-rw-r--r--packages/morphunits/src/utility.pas54
3 files changed, 57 insertions, 21 deletions
diff --git a/packages/amunits/src/coreunits/utility.pas b/packages/amunits/src/coreunits/utility.pas
index 7099e28a56..1df248aca7 100644
--- a/packages/amunits/src/coreunits/utility.pas
+++ b/packages/amunits/src/coreunits/utility.pas
@@ -395,11 +395,13 @@ function TAG_(value: pointer): PtrUInt; overload; inline;
function TAG_(value: pchar): PtrUInt; overload; inline;
function TAG_(value: boolean): PtrUInt; overload; inline;
function TAG_(value: LongInt): PtrUInt; overload; inline;
+function TAG_(Value: LongWord): PtrUInt; overload; inline;
function AsTag(value: pointer): PtrUInt; overload; inline;
function AsTag(value: pchar): PtrUInt; overload; inline;
function AsTag(value: boolean): PtrUInt; overload; inline;
function AsTag(value: LongInt): PtrUInt; overload; inline;
+function AsTag(Value: LongWord): PtrUInt; overload; inline;
IMPLEMENTATION
@@ -472,6 +474,11 @@ begin
TAG_:=PtrUInt(value);
end;
+function TAG_(Value: LongWord): PtrUInt; inline;
+begin
+ TAG_ := PtrUInt(Value);
+end;
+
function AsTag(value: pointer): PtrUInt; inline;
begin
AsTag:=PtrUInt(value);
@@ -495,6 +502,11 @@ begin
AsTag:=PtrUInt(value);
end;
+function AsTag(Value: LongWord): PtrUInt; inline;
+begin
+ AsTag := PtrUInt(Value);
+end;
+
initialization
UtilityBase := _UtilityBase;
end.
diff --git a/packages/arosunits/src/utility.pas b/packages/arosunits/src/utility.pas
index c2439a996f..ad36f0b64f 100644
--- a/packages/arosunits/src/utility.pas
+++ b/packages/arosunits/src/utility.pas
@@ -259,11 +259,13 @@ function TAG_(Value: Pointer): PtrUInt; overload; inline;
function TAG_(Value: PChar): PtrUInt; overload; inline;
function TAG_(Value: boolean): PtrUInt; overload; inline;
function TAG_(Value: LongInt): PtrUInt; overload; inline;
+function TAG_(Value: LongWord): PtrUInt; overload; inline;
function AsTag(Value: Pointer): PtrUInt; overload; inline;
function AsTag(Value: PChar): PtrUInt; overload; inline;
function AsTag(Value: boolean): PtrUInt; overload; inline;
function AsTag(Value: LongInt): PtrUInt; overload; inline;
+function AsTag(Value: LongWord): PtrUInt; overload; inline;
implementation
@@ -313,6 +315,11 @@ begin
TAG_ := PtrUInt(Value);
end;
+function TAG_(Value: LongWord): PtrUInt; inline;
+begin
+ TAG_ := PtrUInt(Value);
+end;
+
function AsTag(Value: pointer): PtrUInt; inline;
begin
AsTag := PtrUInt(Value);
@@ -336,4 +343,9 @@ begin
AsTag := PtrUInt(Value);
end;
+function AsTag(Value: LongWord): PtrUInt; inline;
+begin
+ AsTag := PtrUInt(Value);
+end;
+
end.
diff --git a/packages/morphunits/src/utility.pas b/packages/morphunits/src/utility.pas
index 4d38ba5b82..4be0cec7bd 100644
--- a/packages/morphunits/src/utility.pas
+++ b/packages/morphunits/src/utility.pas
@@ -211,15 +211,17 @@ function GetUniqueID: LongWord; SysCall MOS_UtilityBase 270;
// varargs version
function AllocNamedObject(Name: STRPTR; const Tags: array of PtrUInt): PNamedObject; inline;
-function TAG_(Value: Pointer): LongWord; overload; inline;
-function TAG_(Value: PChar): LongWord; overload; inline;
-function TAG_(Value: Boolean): LongWord; overload; inline;
-function TAG_(Value: LongInt): LongWord; overload; inline;
-
-function AsTag(Value: Pointer): LongWord; overload; inline;
-function AsTag(Value: PChar): LongWord; overload; inline;
-function AsTag(Value: Boolean): LongWord; overload; inline;
-function AsTag(Value: LongInt): LongWord; overload; inline;
+function TAG_(Value: Pointer): PtrUInt; overload; inline;
+function TAG_(Value: PChar): PtrUInt; overload; inline;
+function TAG_(Value: Boolean): PtrUInt; overload; inline;
+function TAG_(Value: LongInt): PtrUInt; overload; inline;
+function TAG_(Value: LongWord): PtrUInt; overload; inline;
+
+function AsTag(Value: Pointer): PtrUInt; overload; inline;
+function AsTag(Value: PChar): PtrUInt; overload; inline;
+function AsTag(Value: Boolean): PtrUInt; overload; inline;
+function AsTag(Value: LongInt): PtrUInt; overload; inline;
+function AsTag(Value: LongWord): PtrUInt; overload; inline;
implementation
@@ -228,17 +230,17 @@ begin
AllocNamedObject := AllocNamedObjectA(Name, @Tags);
end;
-function TAG_(Value: Pointer): LongWord; inline;
+function TAG_(Value: Pointer): PtrUInt; inline;
begin
- TAG_ := LongWord(Value);
+ TAG_ := PtrUInt(Value);
end;
-function TAG_(Value: PChar): LongWord; inline;
+function TAG_(Value: PChar): PtrUInt; inline;
begin
- TAG_ := LongWord(Value);
+ TAG_ := PtrUInt(Value);
end;
-function TAG_(Value: Boolean): LongWord; inline;
+function TAG_(Value: Boolean): PtrUInt; inline;
begin
if Value then
TAG_ := LTrue
@@ -246,9 +248,14 @@ begin
TAG_ := LFalse;
end;
-function TAG_(Value: LongInt): LongWord; inline;
+function TAG_(Value: LongInt): PtrUInt; inline;
begin
- TAG_ := LongWord(Value);
+ TAG_ := PtrUInt(Value);
+end;
+
+function TAG_(Value: LongWord): PtrUInt; inline;
+begin
+ TAG_ := PtrUInt(Value);
end;
function AsTag(Value: Pointer): LongWord; inline;
@@ -256,12 +263,12 @@ begin
AsTag := LongWord(Value);
end;
-function AsTag(Value: PChar): LongWord; inline;
+function AsTag(Value: PChar): PtrUInt; inline;
begin
- AsTag := LongWord(Value);
+ AsTag := PtrUInt(Value);
end;
-function AsTag(Value: Boolean): LongWord; inline;
+function AsTag(Value: Boolean): PtrUInt; inline;
begin
if Value then
AsTag := LTrue
@@ -269,9 +276,14 @@ begin
AsTag := LFalse;
end;
-function AsTag(Value: LongInt): LongWord; inline;
+function AsTag(Value: LongInt): PtrUInt; inline;
begin
- AsTag := LongWord(Value);
+ AsTag := PtrUInt(Value);
+end;
+
+function AsTag(Value: LongWord): PtrUInt; inline;
+begin
+ AsTag := PtrUInt(Value);
end;
begin