View Issue Details

IDProjectCategoryView StatusLast Update
0037810pas2jsrtlpublic2020-09-25 13:26
Reporterhenrique Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Fixed in Versiontrunk 
Summary0037810: TValue.Empty
DescriptionI created the Empty function for TValue.
TagsNo tags attached.
Fixed in Revision885
Attached Files

Activities

henrique

2020-09-24 18:39

reporter  

TValue.patch (935 bytes)   
From 9346676634e8558e996f7cbabf6689e65550ae04 Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Fri, 18 Sep 2020 15:34:11 -0300
Subject: [PATCH] Empty no TValue.

---
 packages/rtl/rtti.pas | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/rtl/rtti.pas b/packages/rtl/rtti.pas
index 88df786..b812955 100644
--- a/packages/rtl/rtti.pas
+++ b/packages/rtl/rtti.pas
@@ -63,6 +63,7 @@ type
     //ToDo: procedure SetArrayElement(aIndex: SizeInt; constref AValue: TValue);
     function IsType(ATypeInfo: PTypeInfo): boolean;
     function AsJSValue: JSValue;
+    class function Empty: TValue; static;
   end;
 
   TRttiType = class;
@@ -712,6 +713,11 @@ begin
   Result := FData;
 end;
 
+class function TValue.Empty: TValue;
+begin
+  Result.FTypeInfo := nil;
+end;
+
 { TRttiStructuredType }
 
 function TRttiStructuredType.GetMethods: TRttiMethodArray;
-- 
2.28.0.windows.1

TValue.patch (935 bytes)   

Michael Van Canneyt

2020-09-25 13:25

administrator   ~0125843

Checked & Applied, thank you very much!

Issue History

Date Modified Username Field Change
2020-09-24 18:39 henrique New Issue
2020-09-24 18:39 henrique File Added: TValue.patch
2020-09-25 13:25 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-09-25 13:25 Michael Van Canneyt Status new => resolved
2020-09-25 13:25 Michael Van Canneyt Resolution open => fixed
2020-09-25 13:25 Michael Van Canneyt Fixed in Version => trunk
2020-09-25 13:25 Michael Van Canneyt Fixed in Revision => 885
2020-09-25 13:25 Michael Van Canneyt Note Added: 0125843