View Issue Details

IDProjectCategoryView StatusLast Update
0038407FPCFCLpublic2021-01-27 16:19
ReporterBart Broersma Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Platformi386OSWindows 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038407: TDeque: implement protected proprty Data
DescriptionThe (parts of the) patches for 0038306 and 0038406 (handling of managed data) require that derived or specilized instances of TDeque have access to the internal data structure of the data array.
Due to issue 0038363, it is currently possible to access FData directly in specialized classes (in certain circumstances).
Once this is fixed, it becomes impossible to implement meaningfull overrides for MoveData(), ClearData() etc.

Attached patch implement a protected read only property Data, so specialized and derived classes can access individual elements of the FData array.
TagsNo tags attached.
Fixed in Revision48436
FPCOldBugId
FPCTarget3.2.2
Attached Files

Activities

Bart Broersma

2021-01-27 11:55

reporter  

gdeque.data-property.diff (605 bytes)   
Index: packages/fcl-stl/src/gdeque.pp
===================================================================
--- packages/fcl-stl/src/gdeque.pp	(revision 48433)
+++ packages/fcl-stl/src/gdeque.pp	(working copy)
@@ -35,6 +35,7 @@
     procedure MoveSimpleData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
     procedure MoveManagedData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
     procedure MoveData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
+    property Data: TArr read FData;
   public
     function Size():SizeUInt;inline;
     constructor Create();
gdeque.data-property.diff (605 bytes)   

Michael Van Canneyt

2021-01-27 12:43

administrator   ~0128615

Patch does not apply. Applied change manually. Thank you very much !

Issue History

Date Modified Username Field Change
2021-01-27 11:55 Bart Broersma New Issue
2021-01-27 11:55 Bart Broersma File Added: gdeque.data-property.diff
2021-01-27 12:43 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-01-27 12:43 Michael Van Canneyt Status new => resolved
2021-01-27 12:43 Michael Van Canneyt Resolution open => fixed
2021-01-27 12:43 Michael Van Canneyt Fixed in Version => 3.3.1
2021-01-27 12:43 Michael Van Canneyt Fixed in Revision => 48436
2021-01-27 12:43 Michael Van Canneyt FPCTarget => 3.2.2
2021-01-27 12:43 Michael Van Canneyt Note Added: 0128615
2021-01-27 16:19 Bart Broersma Status resolved => closed