THRIFT-4318 Delphi performance improvements
Client: Delphi
Patch: Jens Geyer

This closes #1348
diff --git a/lib/delphi/src/Thrift.pas b/lib/delphi/src/Thrift.pas
index e969ebf..6eca3c9 100644
--- a/lib/delphi/src/Thrift.pas
+++ b/lib/delphi/src/Thrift.pas
@@ -172,10 +172,10 @@
 
 class function TApplicationException.Read( const iprot: IProtocol): TApplicationException;
 var
-  field : IField;
+  field : TThriftField;
   msg : string;
   typ : TExceptionType;
-  struc : IStruct;
+  struc : TThriftStruct;
 begin
   msg := '';
   typ := TExceptionType.Unknown;
@@ -220,12 +220,11 @@
 
 procedure TApplicationException.Write( const oprot: IProtocol);
 var
-  struc : IStruct;
-  field : IField;
-
+  struc : TThriftStruct;
+  field : TThriftField;
 begin
-  struc := TStructImpl.Create( 'TApplicationException' );
-  field := TFieldImpl.Create;
+  Init(struc, 'TApplicationException');
+  Init(field);
 
   oprot.WriteStructBegin( struc );
   if Message <> '' then