~ubuntu-branches/ubuntu/trusty/gnustep-base/trusty

« back to all changes in this revision

Viewing changes to Source/GSPrivate.h

Tags: upstream-1.20.0
ImportĀ upstreamĀ versionĀ 1.20.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  unsigned      _count;
71
71
  unsigned      _capacity;
72
72
  int           _grow_factor;
73
 
}
74
 
@end
75
 
 
76
 
@interface GSInlineArray : GSArray
77
 
{
 
73
  int           _version;
78
74
}
79
75
@end
80
76
 
165
161
 */
166
162
@interface GSString : NSString
167
163
{
 
164
@public
168
165
  GSCharPtr _contents;
169
166
  unsigned int  _count;
170
167
  struct {
171
168
    unsigned int        wide: 1;        // 16-bit characters in string?
172
 
    unsigned int        free: 1;        // Set if the instance owns the
 
169
    unsigned int        owned: 1;       // Set if the instance owns the
173
170
                                        // _contents buffer
174
171
    unsigned int        unused: 2;
175
172
    unsigned int        hash: 28;
183
180
 */
184
181
@interface GSMutableString : NSMutableString
185
182
{
186
 
  union {
187
 
    unichar             *u;
188
 
    unsigned char       *c;
189
 
  } _contents;
 
183
@public
 
184
  GSCharPtr _contents;
190
185
  unsigned int  _count;
191
186
  struct {
192
187
    unsigned int        wide: 1;
193
 
    unsigned int        free: 1;
 
188
    unsigned int        owned: 1;
194
189
    unsigned int        unused: 2;
195
190
    unsigned int        hash: 28;
196
191
  } _flags;
 
192
  unsigned int  _capacity;
197
193
  NSZone        *_zone;
198
 
  unsigned int  _capacity;
199
194
}
200
195
@end
201
196
 
202
 
/*
203
 
 * Typedef for access to internals of concrete string objects.
204
 
 */
205
 
typedef struct {
206
 
  @defs(GSMutableString)
207
 
} GSStr_t;
208
 
typedef GSStr_t *GSStr;
209
 
 
 
197
typedef GSMutableString *GSStr;
210
198
 
211
199
/*
212
200
 * Enumeration for MacOS-X compatibility user defaults settings.
237
225
  NSData        *_d;    // Only valid after initWithCoder:
238
226
}
239
227
- (const void*) bytes;
240
 
- (unsigned) count;
 
228
- (NSUInteger) count;
241
229
- (void) encodeWithCoder: (NSCoder*)aCoder;
242
230
- (id) initWithCoder: (NSCoder*)aCoder;
243
 
- (id) initWithObjCType: (const char*)t count: (int)c at: (const void*)a;
244
 
- (unsigned) size;
 
231
- (id) initWithObjCType: (const char*)t count: (NSInteger)c at: (const void*)a;
 
232
- (NSUInteger) size;
245
233
- (const char*) type;
246
234
@end
247
235
 
248
236
/* Get error information.
249
237
 */
250
 
@interface      NSError (GSCategories)
 
238
@interface      NSError (GNUstepBase)
251
239
+ (NSError*) _last;
252
240
+ (NSError*) _systemError: (long)number;
253
241
@end
264
252
  NSRunLoop             *loop;
265
253
  NSLock                *lock;
266
254
  NSMutableArray        *performers;
267
 
#ifdef __MINGW32__
 
255
#ifdef __MINGW__
268
256
  HANDLE                event;
269
257
#else
270
258
  int                   inputFd;
406
394
/* Function used by the NSRunLoop and friends for processing
407
395
 * queued notifications which should be processed at the first safe moment.
408
396
 */
409
 
void GSPrivateNotifyASAP(void) GS_ATTRIB_PRIVATE;
 
397
void GSPrivateNotifyASAP(NSString *mode) GS_ATTRIB_PRIVATE;
410
398
 
411
399
/* Function used by the NSRunLoop and friends for processing
412
400
 * queued notifications which should be processed when the loop is idle.
413
401
 */
414
 
void GSPrivateNotifyIdle(void) GS_ATTRIB_PRIVATE;
 
402
void GSPrivateNotifyIdle(NSString *mode) GS_ATTRIB_PRIVATE;
415
403
 
416
404
/* Function used by the NSRunLoop and friends for determining whether
417
405
 * there are more queued notifications to be processed.
418
406
 */
419
 
BOOL GSPrivateNotifyMore(void) GS_ATTRIB_PRIVATE;
 
407
BOOL GSPrivateNotifyMore(NSString *mode) GS_ATTRIB_PRIVATE;
420
408
 
421
409
/* Function to return the function for searching in a string for a range.
422
410
 */
505
493
  void (*unloadCallback)(Class, struct objc_category *)) GS_ATTRIB_PRIVATE;
506
494
 
507
495
 
508
 
/* Memory to use to put executabel code in.
 
496
/* Memory to use to put executable code in.
509
497
 */
510
498
@interface      GSCodeBuffer : NSObject
511
499
{
512
500
  unsigned      size;
513
501
  void          *buffer;
514
502
}
515
 
+ (GSCodeBuffer*) memoryWithSize: (unsigned)_size;
 
503
+ (GSCodeBuffer*) memoryWithSize: (NSUInteger)_size;
516
504
- (void*) buffer;
517
 
- (id) initWithSize: (unsigned)_size;
 
505
- (id) initWithSize: (NSUInteger)_size;
518
506
- (void) protect;
519
507
@end
520
508
 
 
509
/* Function to safely change the class of an object by 'isa' swizzling
 
510
 * wile maintaining allocation accounting and finalization in a GC world.
 
511
 */
 
512
void
 
513
GSPrivateSwizzle(id o, Class c) GS_ATTRIB_PRIVATE;
 
514
 
 
515
BOOL
 
516
GSPrivateIsCollectable(const void *ptr) GS_ATTRIB_PRIVATE;
 
517
 
 
518
NSZone*
 
519
GSAtomicMallocZone (void);
 
520
 
521
521
#endif /* _GSPrivate_h_ */
522
522