mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-16 00:45:26 +00:00
Monotone-Parent: a3759861ff6c685f2878fdb4bfe7ea6fe966df8b
Monotone-Revision: 4a0075d77198c329e5e471528db155313b163846 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-06-13T19:55:59 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-06-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSArray+Utilities.m ([NSArray
|
||||
-asPointersOfObjects]): new method that transforms an NSArray into
|
||||
an array of ptr**;
|
||||
|
||||
2008-06-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartICalViewer.m
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
@interface NSArray (SOGoArrayUtilities)
|
||||
|
||||
- (id *) asPointersOfObjects;
|
||||
|
||||
- (NSString *) jsonRepresentation;
|
||||
|
||||
- (NSArray *) stringsWithFormat: (NSString *) format;
|
||||
|
||||
@@ -27,6 +27,19 @@
|
||||
|
||||
@implementation NSArray (SOGoArrayUtilities)
|
||||
|
||||
- (id *) asPointersOfObjects
|
||||
{
|
||||
id *pointers;
|
||||
unsigned int max;
|
||||
|
||||
max = [self count];
|
||||
pointers = malloc (sizeof(id) * (max + 1));
|
||||
[self getObjects: pointers];
|
||||
*(pointers + max) = nil;
|
||||
|
||||
return pointers;
|
||||
}
|
||||
|
||||
- (NSArray *) stringsWithFormat: (NSString *) format
|
||||
{
|
||||
NSMutableArray *formattedStrings;
|
||||
|
||||
Reference in New Issue
Block a user