X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2Fexoma.pas;h=b6f66bda1c3b6a505412265cdff8b5ada730607d;hb=8b7ced631d49879ce68703ac84389e3b4780c3db;hp=1931dbbee9c973bbbf4840714fbe4fdcda91f8fe;hpb=eced4802da504c41b09ae360c602ee2afb94d91b;p=d2df-sdl.git diff --git a/src/shared/exoma.pas b/src/shared/exoma.pas index 1931dbb..b6f66bd 100644 --- a/src/shared/exoma.pas +++ b/src/shared/exoma.pas @@ -1,4 +1,4 @@ -(* Copyright (C) DooM 2D:Forever Developers +(* Copyright (C) Doom 2D: Forever Developers * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,9 @@ unit exoma; interface uses - typinfo, SysUtils, Variants, mempool, hashtable, xparser; + {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} + typinfo, SysUtils, Variants, + hashtable, xparser; // ////////////////////////////////////////////////////////////////////////// // @@ -41,7 +43,7 @@ type // ////////////////////////////////////////////////////////////////////////// // type - TPropHash = class(TPoolObject) + TPropHash = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF} private mClass: TClass; mNames: THashStrInt; @@ -59,7 +61,7 @@ type // ////////////////////////////////////////////////////////////////////////// // type - TExprConstList = class(TPoolObject) + TExprConstList = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF} public function valid (const cname: AnsiString): Boolean; virtual; abstract; function get (const cname: AnsiString; out v: Variant): Boolean; virtual; abstract; @@ -68,7 +70,7 @@ type // ////////////////////////////////////////////////////////////////////////// // type - TExprScope = class(TPoolObject) + TExprScope = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF} public class procedure error (const amsg: AnsiString); class procedure errorfmt (const afmt: AnsiString; const args: array of const); @@ -78,7 +80,7 @@ type procedure setField (obj: TObject; const afldname: AnsiString; var aval: Variant); virtual; end; - TExprBase = class(TPoolObject) + TExprBase = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF} public class function coerce2bool (var v0: Variant): Boolean; class function toInt (var v: Variant): LongInt; @@ -345,7 +347,7 @@ var n: AnsiString; begin mClass := aklass; - mNames := hashNewStrInt(); + mNames := THashStrInt.Create(); pi := aklass.ClassInfo; pt := GetTypeData(pi); GetMem(pl, pt^.PropCount*sizeof(Pointer));