Monotone-Parent: fafa72b8e42848069a3affa9d8e8895134ebc136

Monotone-Revision: 34a150bec80d8bcacb0dffe7e4fbe342dc0b2d3d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-05-31T05:06:26
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-05-31 05:06:26 +00:00
parent f409c1cb3e
commit ab9fbf320e
3 changed files with 15 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
2011-05-31 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/NSValue+MAPIStore.m (-asI8InMemCtx:): new method that
extracts an uint64_t from an NSNumber.
* OpenChange/MAPIStoreFallbackContext.[hm]: new class module for
the "fallback" context, used by the OpenChange core to create
contexts that are not specifically handled.

View File

@@ -30,6 +30,7 @@
- (uint8_t *) asBooleanInMemCtx: (void *) memCtx;
- (uint16_t *) asShortInMemCtx: (void *) memCtx;
- (uint32_t *) asLongInMemCtx: (void *) memCtx;
- (uint64_t *) asI8InMemCtx: (void *) memCtx;
- (double *) asDoubleInMemCtx: (void *) memCtx;
@end

View File

@@ -31,7 +31,7 @@
uint8_t *value;
value = talloc (memCtx, uint8_t);
*value = [self boolValue];
*value = ([self boolValue] ? 1 : 0);
return value;
}
@@ -56,6 +56,16 @@
return value;
}
- (uint64_t *) asI8InMemCtx: (void *) memCtx
{
uint64_t *value;
value = talloc (memCtx, uint64_t);
*value = [self unsignedLongLongValue];
return value;
}
- (double *) asDoubleInMemCtx: (void *) memCtx
{
double *value;