mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
partial nonfragile api support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/reorg@29601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7f3a1d3ac1
commit
92bfb8666e
58 changed files with 243 additions and 278 deletions
|
@ -69,7 +69,7 @@ extern "C" {
|
|||
|
||||
@interface GSMimeHeader : NSObject <NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(GSMimeCodingContext)
|
||||
#if GS_EXPOSE(GSMimeHeader)
|
||||
NSString *name;
|
||||
NSString *value;
|
||||
NSMutableDictionary *objects;
|
||||
|
|
|
@ -29,10 +29,12 @@
|
|||
|
||||
#ifndef __GSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __GSObjCRuntime_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#include <objc/objc.h>
|
||||
#include <objc/objc-api.h>
|
||||
#include <objc/runtime.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -88,7 +90,8 @@ extern "C" {
|
|||
#define nil 0
|
||||
#endif
|
||||
|
||||
#ifdef NeXT_RUNTIME
|
||||
#if defined(NeXT_RUNTIME)
|
||||
|
||||
#define _C_CONST 'r'
|
||||
#define _C_IN 'n'
|
||||
#define _C_INOUT 'N'
|
||||
|
@ -97,7 +100,12 @@ extern "C" {
|
|||
#define _C_BYREF 'R'
|
||||
#define _C_ONEWAY 'V'
|
||||
#define _C_GCINVISIBLE '!'
|
||||
#else
|
||||
|
||||
#elif defined(__GNUSTEP_RUNTIME__)
|
||||
|
||||
#else /* Old GNU runtime */
|
||||
|
||||
#define class_getInstanceSize(C) class_get_instance_size(C)
|
||||
|
||||
#define class_nextMethodList(aClass,anIterator) (({\
|
||||
if (*(anIterator) == 0) \
|
||||
|
@ -106,8 +114,12 @@ extern "C" {
|
|||
*(anIterator) = (*((struct objc_method_list**)(anIterator)))->method_next; \
|
||||
}), *(anIterator))
|
||||
|
||||
#define object_getClass(O) (O->isa)
|
||||
#define object_setClass(O,C) (O->isa = C)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
/*
|
||||
* Functions for accessing instance variables directly -
|
||||
|
|
|
@ -196,6 +196,6 @@
|
|||
#define __has_feature(x) 0
|
||||
#endif
|
||||
#define GS_EXPOSE(X) \
|
||||
(!__has_feature(objc_nonfragile_abi) || defined(EXPOSE_##X##_IVARS))
|
||||
((!__has_feature(objc_nonfragile_abi) && !__has_feature(objc_nonfragile_abi2)) || defined(EXPOSE_##X##_IVARS))
|
||||
|
||||
#endif /* __GNUSTEP_GSVERSIONMACROS_H_INCLUDED_ */
|
||||
|
|
|
@ -108,6 +108,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
@interface NSBundle : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSBundle)
|
||||
@public
|
||||
NSString *_path;
|
||||
NSMutableArray *_bundleClasses;
|
||||
Class _principalClass;
|
||||
|
|
|
@ -38,7 +38,7 @@ extern "C" {
|
|||
@interface NSDistantObject : NSProxy <NSCoding>
|
||||
{
|
||||
#if GS_EXPOSE(NSDistantObject)
|
||||
@private
|
||||
@public
|
||||
NSConnection *_connection;
|
||||
id _object;
|
||||
unsigned _handle;
|
||||
|
|
|
@ -52,7 +52,7 @@ extern "C" {
|
|||
@interface NSThread : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSThread)
|
||||
@private
|
||||
@public
|
||||
id _target;
|
||||
id _arg;
|
||||
SEL _selector;
|
||||
|
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
@interface NSTimer : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSTimer)
|
||||
@private
|
||||
@public
|
||||
NSDate *_date; /* Must be first - for NSRunLoop optimisation */
|
||||
BOOL _invalidated; /* Must be 2nd - for NSRunLoop optimisation */
|
||||
BOOL _repeats;
|
||||
|
|
|
@ -80,7 +80,6 @@ extern "C" {
|
|||
@interface NSURLAuthenticationChallenge : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLAuthenticationChallenge)
|
||||
@private
|
||||
void *_NSURLAuthenticationChallengeInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef enum
|
|||
@interface NSCachedURLResponse : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSCachedURLResponse)
|
||||
@private
|
||||
void *_NSCachedURLResponseInternal;
|
||||
#endif
|
||||
}
|
||||
|
@ -104,7 +103,6 @@ typedef enum
|
|||
@interface NSURLCache : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLCache)
|
||||
@private
|
||||
void *_NSURLCacheInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ extern "C" {
|
|||
@interface NSURLConnection : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLConnection)
|
||||
@private
|
||||
void *_NSURLConnectionInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ typedef enum {
|
|||
@interface NSURLCredential : NSObject <NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSURLCredential)
|
||||
@private
|
||||
void *_NSURLCredentialInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ extern NSString *const NSURLCredentialStorageChangedNotification;
|
|||
@interface NSURLCredentialStorage : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLCredentialStorage)
|
||||
@private
|
||||
void *_NSURLCredentialStorageInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ extern "C" {
|
|||
@interface NSURLDownload : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLDownload)
|
||||
@private
|
||||
void *_NSURLDownloadInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ extern NSString * const NSURLAuthenticationMethodHTTPDigest;
|
|||
@interface NSURLProtectionSpace : NSObject <NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSURLProtectionSpace)
|
||||
@private
|
||||
void *_NSURLProtectionSpaceInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -119,7 +119,6 @@ extern "C" {
|
|||
@interface NSURLProtocol : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSURLProtocol)
|
||||
@private
|
||||
void *_NSURLProtocolInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -85,7 +85,6 @@ typedef NSUInteger NSURLRequestCachePolicy;
|
|||
@interface NSURLRequest : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSURLRequest)
|
||||
@private
|
||||
void *_NSURLRequestInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ extern "C" {
|
|||
@interface NSURLResponse : NSObject <NSCoding, NSCopying>
|
||||
{
|
||||
#if GS_EXPOSE(NSURLResponse)
|
||||
@private
|
||||
void *_NSURLResponseInternal;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
|
|||
@interface NSXMLParser : NSObject
|
||||
{
|
||||
#if GS_EXPOSE(NSXMLParser)
|
||||
@private
|
||||
@public
|
||||
void *_parser; // GSXMLParser
|
||||
void *_handler; // SAXHandler
|
||||
void *_unused;
|
||||
|
|
|
@ -412,7 +412,9 @@ static Class GSInlineArrayClass;
|
|||
}
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count
|
||||
{
|
||||
_contents_array = (id*)&self[1];
|
||||
_contents_array
|
||||
= (id*)(((void*)self) + class_getInstanceSize([self class]));
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -1148,7 +1150,8 @@ static Class GSInlineArrayClass;
|
|||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &c];
|
||||
a = (id)NSAllocateObject(GSInlineArrayClass,
|
||||
sizeof(id)*c, GSObjCZone(self));
|
||||
a->_contents_array = (id*)&a[1];
|
||||
a->_contents_array
|
||||
= (id*)(((void*)a) + class_getInstanceSize([a class]));
|
||||
#endif
|
||||
if (c > 0)
|
||||
{
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
// FIXME: We should be using the new interfaces, not exposing the old ones.
|
||||
# define __OBJC_LEGACY_GNU_MODE__
|
||||
|
||||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSCoder.h"
|
||||
#import "Foundation/NSDistantObject.h"
|
||||
|
@ -30,8 +34,6 @@
|
|||
#import <config.h>
|
||||
#import <objc/objc-api.h>
|
||||
#if HAVE_OBJC_RUNTIME_H
|
||||
// FIXME: We should be using the new interfaces, not exposing the old ones.
|
||||
# define __OBJC_LEGACY_GNU_MODE__
|
||||
# import <objc/runtime.h>
|
||||
#endif
|
||||
#import <pthread.h>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
#import "config.h"
|
||||
|
||||
#define EXPOSE_GSFileHandle_IVARS 1
|
||||
#import "GNUstepBase/preface.h"
|
||||
#import "Foundation/NSObject.h"
|
||||
#import "Foundation/NSData.h"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
* in which case the macros here mostly reduce to nothing and the generated
|
||||
* code can be much more efficient.
|
||||
*/
|
||||
#if !__has_feature(objc_nonfragile_abi)
|
||||
#if 1 || !__has_feature(objc_nonfragile_abi)
|
||||
|
||||
/* Code for when we don't have non-fragine instance variables
|
||||
*/
|
||||
|
@ -93,15 +93,11 @@ DESTROY(_internal);
|
|||
/* We have support for non-fragile ivars
|
||||
*/
|
||||
|
||||
#define GS_BEGIN_INTERNAL(name) \
|
||||
@interface name \
|
||||
{
|
||||
#define GS_BEGIN_INTERNAL(name) @interface name () {
|
||||
|
||||
/* Finish declaration of internal ivars.
|
||||
*/
|
||||
#define GS_END_INTERNAL(name) \
|
||||
} \
|
||||
@end
|
||||
#define GS_END_INTERNAL(name) } @end
|
||||
|
||||
/* Create holder for internal ivars (nothing to do).
|
||||
*/
|
||||
|
|
|
@ -161,6 +161,7 @@ typedef union {
|
|||
*/
|
||||
@interface GSString : NSString
|
||||
{
|
||||
@public
|
||||
GSCharPtr _contents;
|
||||
unsigned int _count;
|
||||
struct {
|
||||
|
@ -179,10 +180,8 @@ typedef union {
|
|||
*/
|
||||
@interface GSMutableString : NSMutableString
|
||||
{
|
||||
union {
|
||||
unichar *u;
|
||||
unsigned char *c;
|
||||
} _contents;
|
||||
@public
|
||||
GSCharPtr _contents;
|
||||
unsigned int _count;
|
||||
struct {
|
||||
unsigned int wide: 1;
|
||||
|
@ -195,14 +194,7 @@ typedef union {
|
|||
}
|
||||
@end
|
||||
|
||||
/*
|
||||
* Typedef for access to internals of concrete string objects.
|
||||
*/
|
||||
typedef struct {
|
||||
@defs(GSMutableString)
|
||||
} GSStr_t;
|
||||
typedef GSStr_t *GSStr;
|
||||
|
||||
typedef GSMutableString *GSStr;
|
||||
|
||||
/*
|
||||
* Enumeration for MacOS-X compatibility user defaults settings.
|
||||
|
|
|
@ -170,10 +170,6 @@ instance.
|
|||
}
|
||||
@end
|
||||
|
||||
typedef struct {
|
||||
@defs(GSCSubString)
|
||||
} GSSubstringStruct;
|
||||
|
||||
/*
|
||||
* Include sequence handling code with instructions to generate search
|
||||
* and compare functions for NSString objects.
|
||||
|
@ -659,7 +655,8 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
{
|
||||
me = (GSStr)NSAllocateObject(GSCInlineStringClass, length,
|
||||
GSObjCZone(self));
|
||||
me->_contents.c = (unsigned char*)&((GSCInlineString*)me)[1];
|
||||
me->_contents.c = (unsigned char*)
|
||||
(((void*)me)+class_getInstanceSize(GSCInlineStringClass));
|
||||
me->_count = length;
|
||||
me->_flags.wide = 0;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
|
@ -741,8 +738,8 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
locale: (NSDictionary*)locale
|
||||
arguments: (va_list)argList
|
||||
{
|
||||
GSStr f;
|
||||
unsigned char buf[2048];
|
||||
GSStr_t f;
|
||||
unichar fbuf[1024];
|
||||
unichar *fmt = fbuf;
|
||||
size_t len;
|
||||
|
@ -766,55 +763,58 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
* Now set up 'f' as a GSMutableString object whose initial buffer is
|
||||
* allocated on the stack. The GSPrivateFormat function can write into it.
|
||||
*/
|
||||
f.isa = GSMutableStringClass;
|
||||
f._zone = NSDefaultMallocZone();
|
||||
f._contents.c = buf;
|
||||
f._capacity = sizeof(buf);
|
||||
f._count = 0;
|
||||
f._flags.wide = 0;
|
||||
f._flags.owned = 0;
|
||||
GSPrivateFormat(&f, fmt, argList, locale);
|
||||
f = (GSStr)alloca(class_getInstanceSize(GSMutableStringClass));
|
||||
object_setClass(f, GSMutableStringClass);
|
||||
f->_zone = NSDefaultMallocZone();
|
||||
f->_contents.c = buf;
|
||||
f->_capacity = sizeof(buf);
|
||||
f->_count = 0;
|
||||
f->_flags.wide = 0;
|
||||
f->_flags.owned = 0;
|
||||
GSPrivateFormat(f, fmt, argList, locale);
|
||||
if (fmt != fbuf)
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), fmt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't use noCopy because f._contents.u may be memory on the stack,
|
||||
* and even if it wasn't f._capacity may be greater than f._count so
|
||||
* Don't use noCopy because f->_contents.u may be memory on the stack,
|
||||
* and even if it wasn't f->_capacity may be greater than f->_count so
|
||||
* we could be wasting quite a bit of space. Better to accept a
|
||||
* performance hit due to copying data (and allocating/deallocating
|
||||
* the temporary buffer) for large strings. For most strings, the
|
||||
* on-stack memory will have been used, so we will get better performance.
|
||||
*/
|
||||
if (f._flags.wide == 1)
|
||||
if (f->_flags.wide == 1)
|
||||
{
|
||||
me = (GSStr)NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
f._count*sizeof(unichar), GSObjCZone(self));
|
||||
me->_contents.u = (unichar*)&((GSUnicodeInlineString*)me)[1];
|
||||
me->_count = f._count;
|
||||
f->_count*sizeof(unichar), GSObjCZone(self));
|
||||
me->_contents.u = (unichar*)
|
||||
(((void*)me)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
me->_count = f->_count;
|
||||
me->_flags.wide = 1;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
memcpy(me->_contents.u, f._contents.u, f._count*sizeof(unichar));
|
||||
memcpy(me->_contents.u, f->_contents.u, f->_count*sizeof(unichar));
|
||||
}
|
||||
else
|
||||
{
|
||||
me = (GSStr)NSAllocateObject(GSCInlineStringClass, f._count,
|
||||
me = (GSStr)NSAllocateObject(GSCInlineStringClass, f->_count,
|
||||
GSObjCZone(self));
|
||||
me->_contents.c = (unsigned char*)&((GSCInlineString*)me)[1];
|
||||
me->_count = f._count;
|
||||
me->_contents.c = (unsigned char*)
|
||||
(((void*)me)+class_getInstanceSize(GSCInlineStringClass));
|
||||
me->_count = f->_count;
|
||||
me->_flags.wide = 0;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
memcpy(me->_contents.c, f._contents.c, f._count);
|
||||
memcpy(me->_contents.c, f->_contents.c, f->_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the string had to grow beyond the initial buffer size, we must
|
||||
* release any allocated memory.
|
||||
*/
|
||||
if (f._flags.owned == 1)
|
||||
if (f->_flags.owned == 1)
|
||||
{
|
||||
NSZoneFree(f._zone, f._contents.c);
|
||||
NSZoneFree(f->_zone, f->_contents.c);
|
||||
}
|
||||
return (id)me;
|
||||
}
|
||||
|
@ -848,7 +848,8 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
*/
|
||||
me = (GSStr)NSAllocateObject(GSCInlineStringClass,
|
||||
length, GSObjCZone(self));
|
||||
me->_contents.c = (unsigned char*)&((GSCInlineString*)me)[1];
|
||||
me->_contents.c = (unsigned char*)
|
||||
(((void*)me)+class_getInstanceSize(GSCInlineStringClass));
|
||||
me->_count = length;
|
||||
me->_flags.wide = 0;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
|
@ -863,7 +864,8 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
*/
|
||||
me = (GSStr)NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
length*sizeof(unichar), GSObjCZone(self));
|
||||
me->_contents.u = (unichar*)&((GSUnicodeInlineString*)me)[1];
|
||||
me->_contents.u = (unichar*)
|
||||
(((void*)me)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
me->_count = length;
|
||||
me->_flags.wide = 1;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
|
@ -878,7 +880,8 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
*/
|
||||
me = (GSStr)NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
length*sizeof(unichar), GSObjCZone(self));
|
||||
me->_contents.u = (unichar*)&((GSUnicodeInlineString*)me)[1];
|
||||
me->_contents.u = (unichar*)
|
||||
(((void*)me)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
me->_count = length;
|
||||
me->_flags.wide = 1;
|
||||
me->_flags.owned = 1; // Ignored on dealloc, but means we own buffer
|
||||
|
@ -1659,19 +1662,22 @@ getCString_c(GSStr self, char *buffer, unsigned int maxLength,
|
|||
*/
|
||||
if (externalEncoding != internalEncoding)
|
||||
{
|
||||
struct {
|
||||
@defs(GSMutableString)
|
||||
} o;
|
||||
|
||||
memset(&o, '\0', sizeof(o));
|
||||
o._count = self->_count;
|
||||
o._capacity = self->_count;
|
||||
o._contents.c = self->_contents.c;
|
||||
GSStrWiden((GSStr)&o);
|
||||
getCString_u((GSStr)&o, buffer, maxLength, aRange, leftoverRange);
|
||||
if (o._flags.owned == 1)
|
||||
GSMutableString *o
|
||||
= (GSMutableString*)alloca(class_getInstanceSize(GSMutableStringClass));
|
||||
object_setClass(o, GSMutableStringClass);
|
||||
o->_count = self->_count;
|
||||
o->_flags.wide = 0;
|
||||
o->_flags.owned = 0;
|
||||
o->_flags.unused = 0;
|
||||
o->_flags.hash = 0;
|
||||
o->_capacity = self->_count;
|
||||
o->_contents.c = self->_contents.c;
|
||||
o->_zone = 0;
|
||||
GSStrWiden(o);
|
||||
getCString_u(o, buffer, maxLength, aRange, leftoverRange);
|
||||
if (o->_flags.owned == 1)
|
||||
{
|
||||
NSZoneFree(o._zone, o._contents.u);
|
||||
NSZoneFree(o->_zone, o->_contents.u);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2319,7 +2325,7 @@ static void GSStrMakeSpace(GSStr s, unsigned size)
|
|||
#if GS_WITH_GC
|
||||
s->_zone = GSAtomicMallocZone();
|
||||
#else
|
||||
if (s->isa == 0)
|
||||
if (object_getClass(s) == 0)
|
||||
{
|
||||
s->_zone = NSDefaultMallocZone();
|
||||
}
|
||||
|
@ -2387,7 +2393,7 @@ static void GSStrWiden(GSStr s)
|
|||
#if GS_WITH_GC
|
||||
s->_zone = GSAtomicMallocZone();
|
||||
#else
|
||||
if (s->isa == 0)
|
||||
if (object_getClass(s) == 0)
|
||||
{
|
||||
s->_zone = NSDefaultMallocZone();
|
||||
}
|
||||
|
@ -2655,7 +2661,7 @@ rangeOfString_u(GSStr self, NSString *aString, unsigned mask, NSRange aRange)
|
|||
static inline NSString*
|
||||
substring_c(GSStr self, NSRange aRange)
|
||||
{
|
||||
GSSubstringStruct *o;
|
||||
GSCSubString *o;
|
||||
|
||||
if (aRange.length == 0)
|
||||
{
|
||||
|
@ -2674,7 +2680,7 @@ substring_c(GSStr self, NSRange aRange)
|
|||
static inline NSString*
|
||||
substring_u(GSStr self, NSRange aRange)
|
||||
{
|
||||
GSSubstringStruct *o;
|
||||
GSCSubString *o;
|
||||
|
||||
if (aRange.length == 0)
|
||||
{
|
||||
|
@ -3202,12 +3208,11 @@ agree, create a new GSCInlineString otherwise.
|
|||
{
|
||||
if (!_flags.owned || NSShouldRetainWithZone(self, z) == NO)
|
||||
{
|
||||
struct {
|
||||
@defs(GSCInlineString)
|
||||
} *o;
|
||||
GSCInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSCInlineStringClass, _count, z);
|
||||
o->_contents.c = (unsigned char*)&o[1];
|
||||
o->_contents.c = (unsigned char*)
|
||||
(((void*)o)+class_getInstanceSize(GSCInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.c, _contents.c, _count);
|
||||
o->_flags.wide = 0;
|
||||
|
@ -3253,12 +3258,11 @@ agree, create a new GSCInlineString otherwise.
|
|||
*/
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
struct {
|
||||
@defs(GSCInlineString)
|
||||
} *o;
|
||||
GSCInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSCInlineStringClass, _count, z);
|
||||
o->_contents.c = (unsigned char*)&o[1];
|
||||
o->_contents.c = (unsigned char*)
|
||||
(((void*)o)+class_getInstanceSize(GSCInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.c, _contents.c, _count);
|
||||
o->_flags.wide = 0;
|
||||
|
@ -3526,13 +3530,12 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
{
|
||||
if (!_flags.owned || NSShouldRetainWithZone(self, z) == NO)
|
||||
{
|
||||
struct {
|
||||
@defs(GSUnicodeInlineString)
|
||||
} *o;
|
||||
GSUnicodeInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
_count * sizeof(unichar), z);
|
||||
o->_contents.u = (unichar*)&o[1];
|
||||
o->_contents.u = (unichar*)
|
||||
(((void*)o)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.u, _contents.u, _count * sizeof(unichar));
|
||||
o->_flags.wide = 1;
|
||||
|
@ -3578,13 +3581,12 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
*/
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
struct {
|
||||
@defs(GSUnicodeInlineString)
|
||||
} *o;
|
||||
GSUnicodeInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
_count * sizeof(unichar), z);
|
||||
o->_contents.u = (unichar*)&o[1];
|
||||
o->_contents.u = (unichar*)
|
||||
(((void*)o)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.u, _contents.u, _count * sizeof(unichar));
|
||||
o->_flags.wide = 1;
|
||||
|
@ -3708,13 +3710,12 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
{
|
||||
if (_flags.wide == 1)
|
||||
{
|
||||
struct {
|
||||
@defs(GSUnicodeInlineString)
|
||||
} *o;
|
||||
GSUnicodeInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
_count * sizeof(unichar), z);
|
||||
o->_contents.u = (unichar*)&o[1];
|
||||
o->_contents.u = (unichar*)
|
||||
(((void*)o)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.u, _contents.u, _count * sizeof(unichar));
|
||||
o->_flags.wide = 1;
|
||||
|
@ -3723,12 +3724,11 @@ agree, create a new GSUnicodeInlineString otherwise.
|
|||
}
|
||||
else
|
||||
{
|
||||
struct {
|
||||
@defs(GSCInlineString)
|
||||
} *o;
|
||||
GSCInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSCInlineStringClass, _count, z);
|
||||
o->_contents.c = (unsigned char*)&o[1];
|
||||
o->_contents.c = (unsigned char*)
|
||||
(((void*)o)+class_getInstanceSize(GSCInlineStringClass));
|
||||
o->_count = _count;
|
||||
memcpy(o->_contents.c, _contents.c, _count);
|
||||
o->_flags.wide = 0;
|
||||
|
@ -4489,13 +4489,12 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
if (_flags.wide == 1)
|
||||
{
|
||||
struct {
|
||||
@defs(GSUnicodeInlineString)
|
||||
} *o;
|
||||
GSUnicodeInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
aRange.length * sizeof(unichar), NSDefaultMallocZone());
|
||||
o->_contents.u = (unichar*)&o[1];
|
||||
o->_contents.u = (unichar*)
|
||||
(((void*)o)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
o->_count = aRange.length;
|
||||
memcpy(o->_contents.u, _contents.u + aRange.location,
|
||||
aRange.length * sizeof(unichar));
|
||||
|
@ -4505,13 +4504,12 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
else
|
||||
{
|
||||
struct {
|
||||
@defs(GSCInlineString)
|
||||
} *o;
|
||||
GSCInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSCInlineStringClass,
|
||||
aRange.length, NSDefaultMallocZone());
|
||||
o->_contents.c = (unsigned char*)&o[1];
|
||||
o->_contents.c = (unsigned char*)
|
||||
(((void*)o)+class_getInstanceSize(GSCInlineStringClass));
|
||||
o->_count = aRange.length;
|
||||
memcpy(o->_contents.c, _contents.c + aRange.location, aRange.length);
|
||||
o->_flags.wide = 0;
|
||||
|
@ -4530,13 +4528,12 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
if (_flags.wide == 1)
|
||||
{
|
||||
struct {
|
||||
@defs(GSUnicodeInlineString)
|
||||
} *o;
|
||||
GSUnicodeInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSUnicodeInlineStringClass,
|
||||
aRange.length * sizeof(unichar), NSDefaultMallocZone());
|
||||
o->_contents.u = (unichar*)&o[1];
|
||||
o->_contents.u = (unichar*)
|
||||
(((void*)o)+class_getInstanceSize(GSUnicodeInlineStringClass));
|
||||
o->_count = aRange.length;
|
||||
memcpy(o->_contents.u, _contents.u + aRange.location,
|
||||
aRange.length * sizeof(unichar));
|
||||
|
@ -4546,13 +4543,12 @@ NSAssert(_flags.owned == 1 && _zone != 0, NSInternalInconsistencyException);
|
|||
}
|
||||
else
|
||||
{
|
||||
struct {
|
||||
@defs(GSCInlineString)
|
||||
} *o;
|
||||
GSCInlineString *o;
|
||||
|
||||
o = (typeof(o))NSAllocateObject(GSCInlineStringClass,
|
||||
aRange.length, NSDefaultMallocZone());
|
||||
o->_contents.c = (unsigned char*)&o[1];
|
||||
o->_contents.c = (unsigned char*)
|
||||
(((void*)o)+class_getInstanceSize(GSCInlineStringClass));
|
||||
o->_count = aRange.length;
|
||||
memcpy(o->_contents.c, _contents.c + aRange.location, aRange.length);
|
||||
o->_flags.wide = 0;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#define EXPOSE_NSAutoreleasePool_IVARS 1
|
||||
#define EXPOSE_NSThread_IVARS 1
|
||||
#include "GNUstepBase/preface.h"
|
||||
#include "Foundation/NSAutoreleasePool.h"
|
||||
#include "Foundation/NSGarbageCollector.h"
|
||||
|
@ -49,8 +50,7 @@ static unsigned pool_count_warning_threshhold = UINT_MAX;
|
|||
#define BEGINNING_POOL_SIZE 32
|
||||
|
||||
/* Easy access to the thread variables belonging to NSAutoreleasePool. */
|
||||
typedef struct { @defs(NSThread) } *TInfo;
|
||||
#define ARP_THREAD_VARS (&(((TInfo)GSCurrentThread())->_autorelease_vars))
|
||||
#define ARP_THREAD_VARS (&((GSCurrentThread())->_autorelease_vars))
|
||||
|
||||
|
||||
@interface NSAutoreleasePool (Private)
|
||||
|
@ -232,7 +232,7 @@ static IMP initImp;
|
|||
|
||||
+ (void) addObject: (id)anObj
|
||||
{
|
||||
TInfo t = (TInfo)GSCurrentThread();
|
||||
NSThread *t = GSCurrentThread();
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
pool = t->_autorelease_vars.current_pool;
|
||||
|
@ -251,7 +251,7 @@ static IMP initImp;
|
|||
|
||||
if (anObj != nil)
|
||||
{
|
||||
NSLog(@"autorelease called without pool for object (%x) "
|
||||
NSLog(@"autorelease called without pool for object (%p) "
|
||||
@"of class %@ in thread %@", anObj,
|
||||
NSStringFromClass([anObj class]), [NSThread currentThread]);
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ static IMP initImp;
|
|||
struct autorelease_thread_vars *tv;
|
||||
NSAutoreleasePool *pool;
|
||||
|
||||
tv = &(((TInfo)thread)->_autorelease_vars);
|
||||
tv = &((thread)->_autorelease_vars);
|
||||
|
||||
/* First release any objects in the pool... bearing in mind that
|
||||
* releasing any object could cause other objects to be added to
|
||||
|
|
|
@ -765,10 +765,6 @@ _find_main_bundle_for_tool(NSString *toolName)
|
|||
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
@defs(NSBundle)
|
||||
} *bptr;
|
||||
|
||||
static void
|
||||
_bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||
{
|
||||
|
@ -802,7 +798,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
}
|
||||
|
||||
/* Store classes (but don't store categories) */
|
||||
[((bptr)_loadingBundle)->_bundleClasses addObject:
|
||||
[(_loadingBundle)->_bundleClasses addObject:
|
||||
[NSValue valueWithPointer: (void*)theClass]];
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#define EXPOSE_NSCachedURLResponse_VARS 1
|
||||
#define EXPOSE_NSCachedURLResponse_IVARS 1
|
||||
#include "GSURLPrivate.h"
|
||||
#include "Foundation/NSCoder.h"
|
||||
|
||||
|
@ -34,10 +34,7 @@ typedef struct {
|
|||
NSURLCacheStoragePolicy storagePolicy;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSCachedURLResponse)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSCachedURLResponseInternal))
|
||||
#define this ((Internal*)(self->_NSCachedURLResponseInternal))
|
||||
|
||||
|
||||
@implementation NSCachedURLResponse
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#import "config.h"
|
||||
|
||||
#define EXPOSE_NSConnection_IVARS 1
|
||||
#define EXPOSE_NSDistantObject_IVARS 1
|
||||
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
|
@ -143,13 +144,6 @@ NSString * const NSObjectInaccessibleException =
|
|||
NSString * const NSObjectNotAvailableException =
|
||||
@"NSObjectNotAvailableException";
|
||||
|
||||
/*
|
||||
* Set up a type to permit us to have direct access into an NSDistantObject
|
||||
*/
|
||||
typedef struct {
|
||||
@defs(NSDistantObject)
|
||||
} ProxyStruct;
|
||||
|
||||
/*
|
||||
* Cache various class pointers.
|
||||
*/
|
||||
|
@ -799,7 +793,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
NSDistantObject *obj = [item obj];
|
||||
|
||||
NSMapRemove(targetToCached,
|
||||
(void*)(uintptr_t)((ProxyStruct*)obj)->_handle);
|
||||
(void*)(uintptr_t)obj->_handle);
|
||||
}
|
||||
}
|
||||
if ([cached_locals count] == 0)
|
||||
|
@ -2295,7 +2289,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
rmc = [conn _makeInRmc: components];
|
||||
if (debug_connection > 5)
|
||||
{
|
||||
NSLog(@"made rmc 0x%x for %d", rmc, type);
|
||||
NSLog(@"made rmc %p for %d", rmc, type);
|
||||
}
|
||||
|
||||
switch (type)
|
||||
|
@ -2916,11 +2910,11 @@ static NSLock *cached_proxies_gate = nil;
|
|||
for (pos = 0; pos < count; pos++)
|
||||
{
|
||||
unsigned target;
|
||||
ProxyStruct *prox;
|
||||
NSDistantObject *prox;
|
||||
|
||||
[rmc decodeValueOfObjCType: @encode(typeof(target)) at: &target];
|
||||
|
||||
prox = (ProxyStruct*)[self includesLocalTarget: target];
|
||||
prox = [self includesLocalTarget: target];
|
||||
if (prox != 0)
|
||||
{
|
||||
if (debug_connection > 3)
|
||||
|
@ -2988,7 +2982,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
((ProxyStruct*)local)->_counter++; // Vended on connection.
|
||||
local->_counter++; // Vended on connection.
|
||||
}
|
||||
M_UNLOCK(IrefGate);
|
||||
|
||||
|
@ -3041,7 +3035,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
[rmc decodeValueOfObjCType: @encode(unsigned) at: &target];
|
||||
[self _doneInRmc: rmc];
|
||||
p = [self includesLocalTarget: target];
|
||||
o = (p != nil) ? ((ProxyStruct*)p)->_object : nil;
|
||||
o = (p != nil) ? p->_object : nil;
|
||||
|
||||
/* xxx We should make sure that TARGET is a valid object. */
|
||||
/* Not actually a Proxy, but we avoid the warnings "id" would have made. */
|
||||
|
@ -3252,7 +3246,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
M_LOCK(IrefGate);
|
||||
if (debug_connection > 5)
|
||||
{
|
||||
NSLog(@"done rmc 0x%x", c);
|
||||
NSLog(@"done rmc %p", c);
|
||||
}
|
||||
if (cacheCoders == YES && IcachedDecoders != nil)
|
||||
{
|
||||
|
@ -3277,7 +3271,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
}
|
||||
if (debug_connection > 5)
|
||||
{
|
||||
NSLog(@"fail rmc 0x%x", c);
|
||||
NSLog(@"fail rmc %p", c);
|
||||
}
|
||||
[c dispatch]; /* Tell NSPortCoder to release the connection. */
|
||||
RELEASE(c);
|
||||
|
@ -3495,15 +3489,15 @@ static NSLock *cached_proxies_gate = nil;
|
|||
M_LOCK(IrefGate);
|
||||
NSParameterAssert (IisValid);
|
||||
|
||||
object = ((ProxyStruct*)anObj)->_object;
|
||||
target = ((ProxyStruct*)anObj)->_handle;
|
||||
object = anObj->_object;
|
||||
target = anObj->_handle;
|
||||
|
||||
/*
|
||||
* If there is no target allocated to the proxy, we add one.
|
||||
*/
|
||||
if (target == 0)
|
||||
{
|
||||
((ProxyStruct*)anObj)->_handle = target = ++local_object_counter;
|
||||
anObj->_handle = target = ++local_object_counter;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3560,7 +3554,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
GSIMapNode node;
|
||||
|
||||
M_LOCK(IrefGate);
|
||||
anObj = ((ProxyStruct*)prox)->_object;
|
||||
anObj = prox->_object;
|
||||
node = GSIMapNodeForKey(IlocalObjects, (GSIMapKey)anObj);
|
||||
|
||||
/*
|
||||
|
@ -3570,7 +3564,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
*/
|
||||
if (node != 0 && node->value.obj == prox)
|
||||
{
|
||||
target = ((ProxyStruct*)prox)->_handle;
|
||||
target = prox->_handle;
|
||||
|
||||
/*
|
||||
* If this proxy has been vended onwards to another process
|
||||
|
@ -3578,11 +3572,11 @@ static NSLock *cached_proxies_gate = nil;
|
|||
* to the local object around for a while in case that other
|
||||
* process needs it.
|
||||
*/
|
||||
if ((((ProxyStruct*)prox)->_counter) != 0)
|
||||
if ((prox->_counter) != 0)
|
||||
{
|
||||
CachedLocalObject *item;
|
||||
|
||||
(((ProxyStruct*)prox)->_counter) = 0;
|
||||
(prox->_counter) = 0;
|
||||
M_LOCK(cached_proxies_gate);
|
||||
if (timer == nil)
|
||||
{
|
||||
|
@ -3692,7 +3686,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
* Found in cache ... add to this connection as the object
|
||||
* is no longer in use by any connection.
|
||||
*/
|
||||
ASSIGN(((ProxyStruct*)proxy)->_connection, self);
|
||||
ASSIGN(proxy->_connection, self);
|
||||
[self addLocalObject: proxy];
|
||||
NSMapRemove(targetToCached, (void*)(uintptr_t)target);
|
||||
if (debug_connection > 3)
|
||||
|
@ -3737,12 +3731,12 @@ static NSLock *cached_proxies_gate = nil;
|
|||
* order to handle connection shutdown cleanly.
|
||||
*/
|
||||
proxy = node->value.obj;
|
||||
local = RETAIN(((ProxyStruct*)proxy)->_object);
|
||||
local = RETAIN(proxy->_object);
|
||||
proxy = [NSDistantObject proxyWithLocal: local
|
||||
connection: self];
|
||||
nTarget = ((ProxyStruct*)proxy)->_handle;
|
||||
nTarget = proxy->_handle;
|
||||
GSIMapRemoveKey(IlocalTargets, (GSIMapKey)nTarget);
|
||||
((ProxyStruct*)proxy)->_handle = target;
|
||||
proxy->_handle = target;
|
||||
GSIMapAddPair(IlocalTargets, (GSIMapKey)target,
|
||||
(GSIMapVal)((id)proxy));
|
||||
}
|
||||
|
@ -3766,7 +3760,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
- (void) vendLocal: (NSDistantObject*)aProxy
|
||||
{
|
||||
M_LOCK(IrefGate);
|
||||
((ProxyStruct*)aProxy)->_counter++;
|
||||
aProxy->_counter++;
|
||||
M_UNLOCK(IrefGate);
|
||||
}
|
||||
|
||||
|
@ -3837,7 +3831,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
unsigned count = 1;
|
||||
GSIMapNode node;
|
||||
|
||||
target = ((ProxyStruct*)aProxy)->_handle;
|
||||
target = aProxy->_handle;
|
||||
node = GSIMapNodeForKey(IremoteProxies, (GSIMapKey)target);
|
||||
|
||||
/*
|
||||
|
@ -3846,7 +3840,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
*/
|
||||
if (node != 0 && node->value.obj == aProxy)
|
||||
{
|
||||
count = ((ProxyStruct*)aProxy)->_counter;
|
||||
count = aProxy->_counter;
|
||||
GSIMapRemoveKey(IremoteProxies, (GSIMapKey)target);
|
||||
/*
|
||||
* Tell the remote application that we have removed our proxy and
|
||||
|
@ -3884,7 +3878,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
NSParameterAssert(aTarget > 0);
|
||||
NSParameterAssert(aProxy==nil || aProxy->isa == distantObjectClass);
|
||||
NSParameterAssert(aProxy==nil || [aProxy connectionForProxy] == self);
|
||||
NSParameterAssert(aProxy==nil || aTarget == ((ProxyStruct*)aProxy)->_handle);
|
||||
NSParameterAssert(aProxy==nil || aTarget == aProxy->_handle);
|
||||
|
||||
M_LOCK(IrefGate);
|
||||
node = GSIMapNodeForKey(IremoteProxies, (GSIMapKey)aTarget);
|
||||
|
@ -3910,7 +3904,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
*/
|
||||
if (p != nil)
|
||||
{
|
||||
((ProxyStruct*)p)->_counter++;
|
||||
p->_counter++;
|
||||
}
|
||||
M_UNLOCK(IrefGate);
|
||||
return p;
|
||||
|
|
|
@ -241,7 +241,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone)
|
|||
#endif
|
||||
if (tmp == 0)
|
||||
{
|
||||
NSLog(@"Malloc failed for file (%@) of length %d - %@", path,
|
||||
NSLog(@"Malloc failed for file (%@) of length %ld - %@", path,
|
||||
fileLength + c, [NSError _last]);
|
||||
goto failure;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone)
|
|||
#endif
|
||||
if (tmp == 0)
|
||||
{
|
||||
NSLog(@"Malloc failed for file (%@) of length %d - %@", path,
|
||||
NSLog(@"Malloc failed for file (%@) of length %ld - %@", path,
|
||||
fileLength, [NSError _last]);
|
||||
goto failure;
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ enum proxyLocation
|
|||
{
|
||||
if (debug_proxy)
|
||||
{
|
||||
NSLog(@"Local object is 0x%x (0x%x)\n",
|
||||
NSLog(@"Local object is %p (%p)\n",
|
||||
(uintptr_t)o, (uintptr_t)o ? ((NSDO*)o)->_object : 0);
|
||||
}
|
||||
return RETAIN(((NSDO*)o)->_object);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#define EXPOSE_NSHTTPCookies_IVARS 1
|
||||
#define EXPOSE_NSHTTPCookie_IVARS 1
|
||||
#import "GSURLPrivate.h"
|
||||
#import "Foundation/NSSet.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
@ -46,11 +46,8 @@ typedef struct {
|
|||
NSDictionary *_properties;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSHTTPCookie)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSHTTPCookieInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSHTTPCookieInternal))
|
||||
#define this ((Internal*)(self->_NSHTTPCookieInternal))
|
||||
#define inst ((Internal*)(o->_NSHTTPCookieInternal))
|
||||
|
||||
@implementation NSHTTPCookie
|
||||
|
||||
|
|
|
@ -39,11 +39,8 @@ typedef struct {
|
|||
NSMutableSet *_cookies;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSHTTPCookieStorage)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSHTTPCookieStorageInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSHTTPCookieStorageInternal))
|
||||
#define this ((Internal*)(self->_NSHTTPCookieStorageInternal))
|
||||
#define inst ((Internal*)(o->_NSHTTPCookieStorageInternal))
|
||||
|
||||
|
||||
/* FIXME
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
|
||||
#import "config.h"
|
||||
#define EXPOSE_NSPort_IVARS 1
|
||||
#define EXPOSE_NSMessagePort_IVARS 1
|
||||
#import "GNUstepBase/preface.h"
|
||||
#import "GNUstepBase/GSLock.h"
|
||||
#import "Foundation/NSArray.h"
|
||||
|
|
|
@ -162,13 +162,13 @@ static void GSLogZombie(id o, SEL sel)
|
|||
}
|
||||
if (c == 0)
|
||||
{
|
||||
NSLog(@"Deallocated object (0x%x) sent %@",
|
||||
NSLog(@"Deallocated object (%p) sent %@",
|
||||
o, NSStringFromSelector(sel));
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Deallocated %@ (0x%x) sent %@",
|
||||
NSStringFromClass(c), o, NSStringFromSelector(sel));
|
||||
NSLog(@"Deallocated %@ (%p) sent %@",
|
||||
c, o, NSStringFromSelector(sel));
|
||||
}
|
||||
if (GSPrivateEnvironmentFlag("CRASH_ON_ZOMBIE", NO) == YES)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ GS_END_INTERNAL(NSOperation)
|
|||
|
||||
static NSArray *empty = nil;
|
||||
|
||||
@implementation NSOperation : NSObject
|
||||
@implementation NSOperation
|
||||
|
||||
+ (BOOL) automaticallyNotifiesObserversForKey: (NSString*)theKey
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
#import "config.h"
|
||||
#define EXPOSE_NSPort_IVARS 1
|
||||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSString.h"
|
||||
#import "Foundation/NSNotification.h"
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#define EXPOSE_NSComparisonPredicate_IVARS 1
|
||||
#define EXPOSE_NSCompoundPredicate_IVARS 1
|
||||
#define EXPOSE_NSExpression_IVARS 1
|
||||
|
||||
#import "Foundation/NSComparisonPredicate.h"
|
||||
#import "Foundation/NSCompoundPredicate.h"
|
||||
#import "Foundation/NSExpression.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#import "config.h"
|
||||
#define EXPOSE_NSRunLoop_IVARS 1
|
||||
#define EXPOSE_NSTimer_IVARS 1
|
||||
#import "GNUstepBase/preface.h"
|
||||
#import "Foundation/NSMapTable.h"
|
||||
#import "Foundation/NSDate.h"
|
||||
|
@ -243,17 +244,13 @@ static NSDate *theFuture = nil;
|
|||
#include "GNUstepBase/GSIArray.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@defs(NSTimer)
|
||||
} *tvars;
|
||||
|
||||
static inline NSDate *timerDate(NSTimer *t)
|
||||
{
|
||||
return ((tvars)t)->_date;
|
||||
return t->_date;
|
||||
}
|
||||
static inline BOOL timerInvalidated(NSTimer *t)
|
||||
{
|
||||
return ((tvars)t)->_invalidated;
|
||||
return t->_invalidated;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -89,9 +89,7 @@ static inline unichar myGetC(unsigned char c)
|
|||
/*
|
||||
* Hack for direct access to internals of an concrete string object.
|
||||
*/
|
||||
typedef struct {
|
||||
@defs(GSString)
|
||||
} *ivars;
|
||||
typedef GSString *ivars;
|
||||
#define myLength() (((ivars)_string)->_count)
|
||||
#define myUnicode(I) (((ivars)_string)->_contents.u[I])
|
||||
#define myChar(I) myGetC((((ivars)_string)->_contents.c[I]))
|
||||
|
|
|
@ -121,10 +121,6 @@ static Class MutableDictionaryClass = 0;
|
|||
static Class StringClass = 0;
|
||||
static Class NumberClass = 0;
|
||||
|
||||
typedef struct {
|
||||
@defs(GSString)
|
||||
} *ivars;
|
||||
|
||||
typedef struct {
|
||||
NSMutableData *data;
|
||||
void (*appImp)(NSData*,SEL,const void*,unsigned);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#import "config.h"
|
||||
#define EXPOSE_NSPort_IVARS 1
|
||||
#define EXPOSE_NSSocketPort_IVARS 1
|
||||
#import "GNUstepBase/preface.h"
|
||||
#import "GNUstepBase/GSLock.h"
|
||||
|
|
|
@ -1086,7 +1086,7 @@ handle_printf_atsign (FILE *stream,
|
|||
arguments: (va_list)argList
|
||||
{
|
||||
unsigned char buf[2048];
|
||||
GSStr_t f;
|
||||
GSStr f;
|
||||
unichar fbuf[1024];
|
||||
unichar *fmt = fbuf;
|
||||
size_t len;
|
||||
|
@ -1109,48 +1109,49 @@ handle_printf_atsign (FILE *stream,
|
|||
* Now set up 'f' as a GSMutableString object whose initial buffer is
|
||||
* allocated on the stack. The GSPrivateFormat function can write into it.
|
||||
*/
|
||||
f.isa = GSMutableStringClass;
|
||||
f._zone = NSDefaultMallocZone();
|
||||
f._contents.c = buf;
|
||||
f._capacity = sizeof(buf);
|
||||
f._count = 0;
|
||||
#if HAVE_WIDE_PRINTF_FUNCTION
|
||||
f._flags.wide = 0;
|
||||
#endif /* HAVE_WIDE_PRINTF_FUNCTION */
|
||||
f._flags.owned = 0;
|
||||
GSPrivateFormat(&f, fmt, argList, locale);
|
||||
GSPrivateStrExternalize(&f);
|
||||
f = (GSStr)alloca(class_getInstanceSize(GSMutableStringClass));
|
||||
object_setClass(f, GSMutableStringClass);
|
||||
f->_zone = NSDefaultMallocZone();
|
||||
f->_contents.c = buf;
|
||||
f->_capacity = sizeof(buf);
|
||||
f->_count = 0;
|
||||
f->_flags.wide = 0;
|
||||
f->_flags.owned = 0;
|
||||
f->_flags.unused = 0;
|
||||
f->_flags.hash = 0;
|
||||
GSPrivateFormat(f, fmt, argList, locale);
|
||||
GSPrivateStrExternalize(f);
|
||||
if (fmt != fbuf)
|
||||
{
|
||||
NSZoneFree(NSDefaultMallocZone(), fmt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't use noCopy because f._contents.u may be memory on the stack,
|
||||
* and even if it wasn't f._capacity may be greater than f._count so
|
||||
* Don't use noCopy because f->_contents.u may be memory on the stack,
|
||||
* and even if it wasn't f->_capacity may be greater than f->_count so
|
||||
* we could be wasting quite a bit of space. Better to accept a
|
||||
* performance hit due to copying data (and allocating/deallocating
|
||||
* the temporary buffer) for large strings. For most strings, the
|
||||
* on-stack memory will have been used, so we will get better performance.
|
||||
*/
|
||||
#if HAVE_WIDE_PRINTF_FUNCTION
|
||||
if (f._flags.wide == 1)
|
||||
if (f->_flags.wide == 1)
|
||||
{
|
||||
self = [self initWithCharacters: f._contents.u length: f._count];
|
||||
self = [self initWithCharacters: f->_contents.u length: f->_count];
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_WIDE_PRINTF_FUNCTION */
|
||||
{
|
||||
self = [self initWithCString: (char*)f._contents.c length: f._count];
|
||||
self = [self initWithCString: (char*)f->_contents.c length: f->_count];
|
||||
}
|
||||
|
||||
/*
|
||||
* If the string had to grow beyond the initial buffer size, we must
|
||||
* release any allocated memory.
|
||||
*/
|
||||
if (f._flags.owned == 1)
|
||||
if (f->_flags.owned == 1)
|
||||
{
|
||||
NSZoneFree(f._zone, f._contents.c);
|
||||
NSZoneFree(f->_zone, f->_contents.c);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -97,8 +97,6 @@ extern NSTimeInterval GSTimeNow(void);
|
|||
+ (void) _endThread: (NSThread*)thread;
|
||||
@end
|
||||
|
||||
typedef struct { @defs(NSThread) } NSThread_ivars;
|
||||
|
||||
static Class threadClass = Nil;
|
||||
static NSNotificationCenter *nc = nil;
|
||||
|
||||
|
@ -1049,16 +1047,16 @@ GSRunLoopInfoForThread(NSThread *aThread)
|
|||
{
|
||||
aThread = GSCurrentThread();
|
||||
}
|
||||
if (((NSThread_ivars*)aThread)->_runLoopInfo == nil)
|
||||
if (aThread->_runLoopInfo == nil)
|
||||
{
|
||||
[gnustep_global_lock lock];
|
||||
if (((NSThread_ivars*)aThread)->_runLoopInfo == nil)
|
||||
if (aThread->_runLoopInfo == nil)
|
||||
{
|
||||
((NSThread_ivars*)aThread)->_runLoopInfo = [GSRunLoopThreadInfo new];
|
||||
aThread->_runLoopInfo = [GSRunLoopThreadInfo new];
|
||||
}
|
||||
[gnustep_global_lock unlock];
|
||||
}
|
||||
info = ((NSThread_ivars*)aThread)->_runLoopInfo;
|
||||
info = aThread->_runLoopInfo;
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -1313,12 +1311,12 @@ GSUnregisterCurrentThread (void)
|
|||
|
||||
thread = GSCurrentThread();
|
||||
|
||||
if (((NSThread_ivars *)thread)->_active == YES)
|
||||
if (thread->_active == YES)
|
||||
{
|
||||
/*
|
||||
* Set the thread to be inactive to avoid any possibility of recursion.
|
||||
*/
|
||||
((NSThread_ivars *)thread)->_active = NO;
|
||||
thread->_active = NO;
|
||||
|
||||
/*
|
||||
* Let observers know this thread is exiting.
|
||||
|
|
|
@ -36,11 +36,8 @@ typedef struct {
|
|||
NSMutableDictionary *memory;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLCache)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLCacheInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLCacheInternal))
|
||||
#define this ((Internal*)(self->_NSURLCacheInternal))
|
||||
#define inst ((Internal*)(o->_NSURLCacheInternal))
|
||||
|
||||
|
||||
static NSURLCache *shared = nil;
|
||||
|
|
|
@ -174,11 +174,8 @@ typedef struct
|
|||
BOOL _debug;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLConnection)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLConnectionInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLConnectionInternal))
|
||||
#define this ((Internal*)(self->_NSURLConnectionInternal))
|
||||
#define inst ((Internal*)(o->_NSURLConnectionInternal))
|
||||
|
||||
@implementation NSURLConnection
|
||||
|
||||
|
|
|
@ -40,11 +40,8 @@
|
|||
}
|
||||
@end
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLDownload)
|
||||
} priv;
|
||||
#define this ((GSURLDownload*)(((priv*)self)->_NSURLDownloadInternal))
|
||||
#define inst ((GSURLDownload*)(((priv*)o)->_NSURLDownloadInternal))
|
||||
#define this ((GSURLDownload*)(self->_NSURLDownloadInternal))
|
||||
#define inst ((GSURLDownload*)(o->_NSURLDownloadInternal))
|
||||
|
||||
@implementation NSURLDownload
|
||||
|
||||
|
|
|
@ -50,11 +50,8 @@ typedef struct {
|
|||
BOOL isProxy;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLProtectionSpace)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLProtectionSpaceInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLProtectionSpaceInternal))
|
||||
#define this ((Internal*)(self->_NSURLProtectionSpaceInternal))
|
||||
#define inst ((Internal*)(o->_NSURLProtectionSpaceInternal))
|
||||
|
||||
@implementation NSURLProtectionSpace
|
||||
|
||||
|
|
|
@ -277,11 +277,8 @@ typedef struct {
|
|||
#endif
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLProtocol)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLProtocolInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLProtocolInternal))
|
||||
#define this ((Internal*)(self->_NSURLProtocolInternal))
|
||||
#define inst ((Internal*)(o->_NSURLProtocolInternal))
|
||||
|
||||
static NSMutableArray *registered = nil;
|
||||
static NSLock *regLock = nil;
|
||||
|
|
|
@ -46,11 +46,8 @@ typedef struct {
|
|||
/* Defines to get easy access to internals from mutable/immutable
|
||||
* versions of the class and from categories.
|
||||
*/
|
||||
typedef struct {
|
||||
@defs(NSURLRequest)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLRequestInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLRequestInternal))
|
||||
#define this ((Internal*)(self->_NSURLRequestInternal))
|
||||
#define inst ((Internal*)(((NSURLRequest*)o)->_NSURLRequestInternal))
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
@end
|
||||
|
|
|
@ -44,11 +44,8 @@ typedef struct {
|
|||
int statusCode;
|
||||
} Internal;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSURLResponse)
|
||||
} priv;
|
||||
#define this ((Internal*)(((priv*)self)->_NSURLResponseInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLResponseInternal))
|
||||
#define this ((Internal*)(self->_NSURLResponseInternal))
|
||||
#define inst ((Internal*)(o->_NSURLResponseInternal))
|
||||
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
|
||||
#define EXPOSE_NSValueTransformer_IVARS 1
|
||||
#import "Foundation/NSData.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSKeyedArchiver.h"
|
||||
|
|
|
@ -607,7 +607,7 @@ NewUTF8STR(const void *ptr, int len)
|
|||
length: len
|
||||
encoding: NSUTF8StringEncoding];
|
||||
if (s == nil)
|
||||
NSLog(@"could not convert to UTF8 string! bytes=%08x len=%d", ptr, len);
|
||||
NSLog(@"could not convert to UTF8 string! bytes=%p len=%d", ptr, len);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -648,9 +648,8 @@ static SEL foundCommentSel;
|
|||
|
||||
#define EXTRA_DEBUG 0
|
||||
|
||||
typedef struct { @defs(NSXMLParser) } *xp;
|
||||
#define _parser (((xp)self)->_parser)
|
||||
#define _handler (((xp)self)->_handler)
|
||||
#define _parser (self->_parser)
|
||||
#define _handler (self->_handler)
|
||||
#define this ((NSXMLParserIvars*)_parser)
|
||||
#define _del ((id)_handler)
|
||||
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
#define _INCLUDED_NSXMLPRIVATE_H
|
||||
|
||||
#import "config.h"
|
||||
#define EXPOSE_NSXMLDTD_IVARS 1
|
||||
#define EXPOSE_NSXMLDTDNode_IVARS 1
|
||||
#define EXPOSE_NSXMLDocument_IVARS 1
|
||||
#define EXPOSE_NSXMLElement_IVARS 1
|
||||
#define EXPOSE_NSXMLNode_IVARS 1
|
||||
#import "GNUstepBase/preface.h"
|
||||
#import "Foundation/NSArray.h"
|
||||
#import "Foundation/NSData.h"
|
||||
|
|
|
@ -518,7 +518,7 @@ ihandler(int sig)
|
|||
NSConnection *connection;
|
||||
|
||||
if (debugging)
|
||||
NSLog(@"Adding observer %lu for %@ %@",
|
||||
NSLog(@"Adding observer %llu for %@ %@",
|
||||
anObserver, notificationName, anObject);
|
||||
|
||||
connection = [(NSDistantObject*)client connectionForProxy];
|
||||
|
@ -801,7 +801,7 @@ ihandler(int sig)
|
|||
{
|
||||
[obs->queue removeObjectAtIndex: 0];
|
||||
if (debugging)
|
||||
NSLog(@"Posting to observer %lu with %@", obs->observer, n);
|
||||
NSLog(@"Posting to observer %llu with %@", obs->observer, n);
|
||||
[obs->client->client postNotificationName: n->name
|
||||
object: n->object
|
||||
userInfo: n->info
|
||||
|
@ -824,7 +824,7 @@ ihandler(int sig)
|
|||
- (void) removeObserver: (GDNCObserver*)observer
|
||||
{
|
||||
if (debugging)
|
||||
NSLog(@"Removing observer %lu for %@ %@",
|
||||
NSLog(@"Removing observer %llu for %@ %@",
|
||||
observer->observer, observer->notificationName,
|
||||
observer->notificationObject);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ HAVE_GNUTLS=@HAVE_GNUTLS@
|
|||
WITH_FFI=@WITH_FFI@
|
||||
|
||||
NX_CONST_STRING_CLASS=@NX_CONST_STRING_CLASS@
|
||||
OBJCFLAGS=@OBJCFLAGS@
|
||||
|
||||
HAVE_INET_PTON=@HAVE_INET_PTON@
|
||||
HAVE_INET_NTOP=@HAVE_INET_NTOP@
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
|
||||
#include <objc/Object.h>
|
||||
|
||||
@interface NSObject : Object
|
||||
@end
|
||||
|
||||
@implementation NSObject
|
||||
@end
|
||||
|
||||
@interface Test : Object
|
||||
+(int) testResult;
|
||||
@end
|
||||
|
|
7
configure
vendored
7
configure
vendored
|
@ -725,6 +725,7 @@ HAVE_INET_PTON
|
|||
HAVE_INET_NTOP
|
||||
GS_PASS_ARGUMENTS
|
||||
GS_FAKE_MAIN
|
||||
OBJCFLAGS
|
||||
WITH_FFI
|
||||
XML2_CONFIG
|
||||
XML_CONFIG
|
||||
|
@ -18507,7 +18508,7 @@ fi
|
|||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
{ echo "$as_me:$LINENO: checking for non-fragile-abi support" >&5
|
||||
echo $ECHO_N "checking for non-fragile-abi support... $ECHO_C" >&6; }
|
||||
if test "$cross_compiling" = yes; then
|
||||
|
@ -18556,6 +18557,7 @@ fi
|
|||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $non_fragile" >&5
|
||||
echo "${ECHO_T}$non_fragile" >&6; }
|
||||
|
@ -21689,6 +21691,7 @@ HAVE_INET_PTON!$HAVE_INET_PTON$ac_delim
|
|||
HAVE_INET_NTOP!$HAVE_INET_NTOP$ac_delim
|
||||
GS_PASS_ARGUMENTS!$GS_PASS_ARGUMENTS$ac_delim
|
||||
GS_FAKE_MAIN!$GS_FAKE_MAIN$ac_delim
|
||||
OBJCFLAGS!$OBJCFLAGS$ac_delim
|
||||
WITH_FFI!$WITH_FFI$ac_delim
|
||||
XML2_CONFIG!$XML2_CONFIG$ac_delim
|
||||
XML_CONFIG!$XML_CONFIG$ac_delim
|
||||
|
@ -21714,7 +21717,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
|
@ -1436,13 +1436,14 @@ fi
|
|||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCFLAGS -fobjc-nonfragile-abi -x objective-c"
|
||||
AC_MSG_CHECKING(for non-fragile-abi support)
|
||||
AC_RUN_IFELSE([#include "$srcdir/config/config.non-fragile-ivars.m"],
|
||||
non_fragile=yes, non_fragile=no)
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
if test $non_fragile = yes; then
|
||||
OBJCFLAGS="$OBJCFLAGS -fobjc-nonfragile-abi"
|
||||
AC_SUBST(OBJCFLAGS)
|
||||
fi
|
||||
AC_MSG_RESULT($non_fragile)
|
||||
|
||||
|
|
Loading…
Reference in a new issue