mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
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:
parent
1ba18cbf94
commit
af9a29b68e
3 changed files with 18 additions and 7 deletions
|
@ -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>
|
2010-10-31 Larry Campbell <lcampbel@akamai.com>
|
||||||
|
|
||||||
* Tools/make_strings/make_strings.m: Permits tool to take nil as the
|
* Tools/make_strings/make_strings.m: Permits tool to take nil as the
|
||||||
|
|
|
@ -2947,7 +2947,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
||||||
}
|
}
|
||||||
else if (next == 0x33)
|
else if (next == 0x33)
|
||||||
{
|
{
|
||||||
double in;
|
NSSwappedDouble in;
|
||||||
// Date
|
// Date
|
||||||
NSDate *date;
|
NSDate *date;
|
||||||
[data getBytes: &in range: NSMakeRange(counter, sizeof(double))];
|
[data getBytes: &in range: NSMakeRange(counter, sizeof(double))];
|
||||||
|
@ -3764,7 +3764,7 @@ isEqualFunc(const void *item1, const void *item2,
|
||||||
- (void) storeDate: (NSDate*) date
|
- (void) storeDate: (NSDate*) date
|
||||||
{
|
{
|
||||||
unsigned char code;
|
unsigned char code;
|
||||||
double out;
|
NSSwappedDouble out;
|
||||||
|
|
||||||
code = 0x33;
|
code = 0x33;
|
||||||
[dest appendBytes: &code length: 1];
|
[dest appendBytes: &code length: 1];
|
||||||
|
|
|
@ -369,12 +369,18 @@ printf(" %3i : %i '%s'\n", i, arg_ok[i], args[i]);
|
||||||
comment = [NSString stringWithCString:
|
comment = [NSString stringWithCString:
|
||||||
(char*)args[lf->comment_index]];
|
(char*)args[lf->comment_index]];
|
||||||
|
|
||||||
if (lf->table_index == -1)
|
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? */
|
table = @"Localizable"; /* TODO: customizable? */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
table = [NSString stringWithCString:
|
table = [NSString stringWithCString:
|
||||||
(char*)args[lf->table_index]];
|
(char*)args[lf->table_index]];
|
||||||
|
}
|
||||||
e = [[SourceEntry alloc] initWithKey: key
|
e = [[SourceEntry alloc] initWithKey: key
|
||||||
comment: comment
|
comment: comment
|
||||||
file: filenamestr
|
file: filenamestr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue