gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing for libobjc2


From: David Chisnall
Subject: Testing for libobjc2
Date: Wed, 8 Sep 2010 15:06:45 +0100

Hi,

To make it easier for configure and related things to find whether libobjc2 is 
installed, and what features it supports, I've just added a new API to 
libobjc2.  You can now test whether libobjc2 is installed very easily, by 
simply checking if the <objc/capabilities.h> header exists.  

This file defines a macro for each feature that the runtime supports (including 
those that may or may not be supported, depending on compile-time options).  
Future versions of the runtime will add additional flags in this header.  

In addition to the list of capabilities in the header, there is also a 
function, objc_test_capability(), which can be used to detect, at run time, 
whether a specific capability is available.  You can use this for more detailed 
feature tests.  For example, the header always contains the constants for the 
type-dependent dispatch and low-memory profile features, but these are both 
compile-time options when building libobjc2.  

Hopefully these should make feature detection a bit easier,

David

--
This email complies with ISO 3103




reply via email to

[Prev in Thread] Current Thread [Next in Thread]