mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 20:18:31 +02:00

the use of Objective-C 1.0 constructs. Because it is a mode switch, it can be used cumulatively with every syntax mode. Note that a {$mode xxx} statement resets all mode switches as well, so you cannot use the -Mobjectivec1 variant if you have such a statement in a unit. This modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386, as the backend support is not yet implemented for other platforms. + implemented selector() statement that can be used to create an Objective-C selector for the message with the specified *constant* name (in the future, it will also work for Objective-C method identifiers) + added SEL type to the system unit (the selector() statement returns it) + added all Objective-C segments to the assembler writers + (currently mostly dummy) objc1 unit that is automatically included if the {$modeswitch objectivec1} statement is used + some tests for the selector() statement git-svn-id: trunk@12870 -
35 lines
817 B
ObjectPascal
35 lines
817 B
ObjectPascal
{
|
|
This file is part of the Free Pascal run time library.
|
|
Copyright (c) 2009 by the Free Pascal development team
|
|
|
|
This unit provides an interface to the Objective-C 1.0
|
|
run time as defined by Apple
|
|
|
|
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.
|
|
|
|
**********************************************************************}
|
|
|
|
unit objc1;
|
|
|
|
interface
|
|
|
|
{$ifdef darwin}
|
|
const
|
|
libname = 'objc';
|
|
{$linkframework Cocoa}
|
|
{$define targetok}
|
|
{$endif}
|
|
|
|
{$ifndef targetok}
|
|
{$error Add support for the current target to the objc1 unit }
|
|
{$endif}
|
|
|
|
implementation
|
|
|
|
end.
|