THRIFT-1485 Performance: pass large and/or refcounted arguments as "const"
Patch: Jens Geyer
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228965 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/delphi/src/Thrift.pas b/lib/delphi/src/Thrift.pas
index aa69f93..8b13406 100644
--- a/lib/delphi/src/Thrift.pas
+++ b/lib/delphi/src/Thrift.pas
@@ -30,7 +30,7 @@
type
IProcessor = interface
['{B1538A07-6CAC-4406-8A4C-AFED07C70A89}']
- function Process( iprot :IProtocol; oprot: IProtocol): Boolean;
+ function Process( const iprot :IProtocol; const oprot: IProtocol): Boolean;
end;
TApplicationException = class( SysUtils.Exception )
@@ -53,8 +53,8 @@
constructor Create( AType: TExceptionType); overload;
constructor Create( AType: TExceptionType; const msg: string); overload;
- class function Read( iprot: IProtocol): TApplicationException;
- procedure Write( oprot: IProtocol );
+ class function Read( const iprot: IProtocol): TApplicationException;
+ procedure Write( const oprot: IProtocol );
end;
// base class for IDL-generated exceptions
@@ -102,8 +102,7 @@
FType := AType;
end;
-class function TApplicationException.Read(
- iprot: IProtocol): TApplicationException;
+class function TApplicationException.Read( const iprot: IProtocol): TApplicationException;
var
field : IField;
msg : string;
@@ -149,7 +148,7 @@
Result := TApplicationException.Create( typ, msg );
end;
-procedure TApplicationException.Write(oprot: IProtocol);
+procedure TApplicationException.Write( const oprot: IProtocol);
var
struc : IStruct;
field : IField;