serialisation bugfix and correction to nil handling when making localisation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31581 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-11-02 11:01:50 +00:00
parent e8ae189950
commit e4ef659b97
3 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2010-11-02 Larry Campbell <lcampbel@akamai.com>
* Tools/make_strings/make_strings.m: Fix line missed in last patch.
* Source/NSPropertyList.m: Fixes for date serialization byte swaps.
2010-10-31 Larry Campbell <lcampbel@akamai.com>
* Tools/make_strings/make_strings.m: Permits tool to take nil as the

View file

@ -2947,7 +2947,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
}
else if (next == 0x33)
{
double in;
NSSwappedDouble in;
// Date
NSDate *date;
[data getBytes: &in range: NSMakeRange(counter, sizeof(double))];
@ -3764,7 +3764,7 @@ isEqualFunc(const void *item1, const void *item2,
- (void) storeDate: (NSDate*) date
{
unsigned char code;
double out;
NSSwappedDouble out;
code = 0x33;
[dest appendBytes: &code length: 1];

View file

@ -369,12 +369,18 @@ printf(" %3i : %i '%s'\n", i, arg_ok[i], args[i]);
comment = [NSString stringWithCString:
(char*)args[lf->comment_index]];
if (lf->table_index == -1)
table = @"Localizable"; /* TODO: customizable? */
if (lf->table_index == -1
|| (arg_ok[lf->table_index]
&& (args[lf->table_index] == 0
|| strcmp("nil", (char*)args[lf->table_index]) == 0)))
{
table = @"Localizable"; /* TODO: customizable? */
}
else
table = [NSString stringWithCString:
(char*)args[lf->table_index]];
{
table = [NSString stringWithCString:
(char*)args[lf->table_index]];
}
e = [[SourceEntry alloc] initWithKey: key
comment: comment
file: filenamestr