summaryrefslogtreecommitdiff
path: root/lib/delphi/src/Thrift.pas
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2012-01-08 21:51:08 +0000
committerRoger Meier <roger@apache.org>2012-01-08 21:51:08 +0000
commit333bbf3d8899a6a0e8971ed7abb10f51b4fc7867 (patch)
tree8df4f544f44ff3e6cefecf0ec45ed09a10b9ca4a /lib/delphi/src/Thrift.pas
parent77e1e629131228cdeda3b740ef4cbf27a7af886b (diff)
downloadthrift-333bbf3d8899a6a0e8971ed7abb10f51b4fc7867.tar.gz
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
Diffstat (limited to 'lib/delphi/src/Thrift.pas')
-rw-r--r--lib/delphi/src/Thrift.pas11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/delphi/src/Thrift.pas b/lib/delphi/src/Thrift.pas
index aa69f9312..8b13406cf 100644
--- a/lib/delphi/src/Thrift.pas
+++ b/lib/delphi/src/Thrift.pas
@@ -30,7 +30,7 @@ const
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 @@ type
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 @@ begin
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 @@ begin
Result := TApplicationException.Create( typ, msg );
end;
-procedure TApplicationException.Write(oprot: IProtocol);
+procedure TApplicationException.Write( const oprot: IProtocol);
var
struc : IStruct;
field : IField;