fpc/rtl/msdos/classes.pp
nickysn e342c11085 + introduced a private type TCodePtrList, which is the specialization
TFPGList<CodePointer> on archs/memory models where CodePointer is different
  than Pointer. On archs/memory models where CodePointer = Pointer, TCodePtrList
  is simply an alias of TList and the fgl unit isn't pulled in.
* the type of FindGlobalComponentList changed to TCodePtrList and the typecasts
  from TFindGlobalComponent (procvar type) to Pointer changed to CodePointer.
  This fixes compilation of unit classes in the i8086 medium memory model.

git-svn-id: trunk@25357 -
2013-08-23 19:25:51 +00:00

63 lines
1.5 KiB
ObjectPascal

{
This file is part of the Free Component Library (FCL)
Copyright (c) 1999-2000 by Michael Van Canneyt and Florian Klaempfl
Classes unit for win32
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$mode objfpc}
{ determine the type of the resource/form file }
{$define Win16Res}
{$if defined(FPC_MM_TINY) or defined(FPC_MM_SMALL) or defined(FPC_MM_LARGE) or defined(FPC_MM_HUGE)}
{ CodePointer = Pointer; nothing to define }
{$elseif defined(FPC_MM_MEDIUM) or defined(FPC_MM_COMPACT)}
{$define FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
{$else}
{$fatal Unknown i8086 memory model.}
{$endif}
unit Classes;
interface
uses
typinfo,
rtlconsts,
types,
{$if defined(FPC_TESTGENERICS) or defined(FPC_CODEPOINTER_DIFFERENT_THAN_POINTER)}
fgl,
{$endif}
sysutils;
{$i classesh.inc}
implementation
type
{$ifdef FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
TCodePtrList = specialize TFPGList<CodePointer>;
{$else FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
TCodePtrList = TList;
{$endif FPC_CODEPOINTER_DIFFERENT_THAN_POINTER}
{ OS - independent class implementations are in /inc directory. }
{$i classes.inc}
initialization
CommonInit;
finalization
CommonCleanup;
end.