mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-03 22:26:24 +00:00
Monotone-Parent: 2fba878ec8713c26f41ffeb5cf08c75601a7c6b0
Monotone-Revision: 88ed6891d1a0ab07ab5cd6b7f28144e585e93c30 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-27T21:51:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2011-07-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/NSArray+MAPIStore.m (-asArrayOfUnicodeStringsInCtx:):
|
||||
the return type is now "struct WStringArray_r *".
|
||||
|
||||
* OpenChange/NSString+MAPIStore.m (-asUnicodeInMemCtx): return an
|
||||
empty string when length == 0, otherwise the resulting pointer
|
||||
will be NULL.
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
@interface NSArray (MAPIStoreFolders)
|
||||
|
||||
- (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx;
|
||||
- (struct WStringArray_r *) asArrayOfUnicodeStringsInCtx: (void *) memCtx;
|
||||
// - (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -32,19 +32,19 @@
|
||||
|
||||
@implementation NSArray (MAPIStoreFolders)
|
||||
|
||||
- (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx
|
||||
- (struct WStringArray_r *) asArrayOfUnicodeStringsInCtx: (void *) memCtx
|
||||
{
|
||||
struct mapi_SPLSTRArrayW *list;
|
||||
struct WStringArray_r *list;
|
||||
NSInteger count, max;
|
||||
|
||||
max = [self count];
|
||||
|
||||
list = talloc_zero(memCtx, struct mapi_SPLSTRArrayW);
|
||||
list = talloc_zero(memCtx, struct WStringArray_r);
|
||||
list->cValues = max;
|
||||
list->strings = talloc_array(list, struct mapi_LPWSTR, max);
|
||||
list->lppszW = talloc_array(list, const char *, max);
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
(list->strings + count)->lppszW = [[self objectAtIndex: count] asUnicodeInMemCtx: list->strings];
|
||||
list->lppszW[count] = [[self objectAtIndex: count] asUnicodeInMemCtx: list->lppszW];
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user