Thrift-1446:Compile error with Delphi 2009 in constant initializer
Client: delphi
Patch: Kenjiro Fukumitsu
Generated code cannot be compiled with Delphi 2009 due to the bug in constant initializer.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210728 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index 9ca90d9..e547413 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -85,12 +85,14 @@
begin
if b
then result := 'true'
- else result := 'false';
-end;
-
-
-{ TTestClient }
-
+ else result := 'false';
+end;
+
+// not available in all versions, so make sure we have this one imported
+function IsDebuggerPresent: BOOL; stdcall; external KERNEL32 name 'IsDebuggerPresent';
+
+{ TTestClient }
+
class procedure TTestClient.Execute(const args: array of string);
var
i : Integer;