* EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m:

([EOAttribute-_valueTypeCharacter]): Correct references from
	_valueTypeChar.
	([PostgreSQLChannel+initialize]): Ditto.
	(newValueForNumberTypeLengthAttribute): Ditto.  Handle nil
	return value of valueType.
	Bug reported by: Eric Johns <ericjohns@verizon.net>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@25597 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2007-11-20 23:25:32 +00:00
parent 1bfaf20463
commit ad9989bbe3
2 changed files with 22 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2007-11-21 David Ayers <ayers@fsfe.org>
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m:
([EOAttribute-_valueTypeCharacter]): Correct references from
_valueTypeChar.
([PostgreSQLChannel+initialize]): Ditto.
(newValueForNumberTypeLengthAttribute): Ditto. Handle nil
return value of valueType.
Bug reported by: Eric Johns <ericjohns@verizon.net>.
2007-10-31 David Ayers <ayers@fsfe.org>
* Makefile.postamble (after-distclean::): Remove generated

View file

@ -84,7 +84,7 @@ RCS_ID("$Id$")
@interface EOAttribute (private)
- (Class)_valueClass;
- (char)_valueTypeChar;
- (char)_valueTypeCharacter;
@end
static BOOL attrRespondsToValueClass = NO;
@ -263,9 +263,16 @@ newValueForNumberTypeLengthAttribute(const void *bytes,
}
else
{
char valueTypeChar = attrRespondsToValueTypeChar
? [attribute _valueTypeChar]
: [[attribute valueType] cString][0];
char valueTypeChar = '\0';
if (attrRespondsToValueTypeChar)
{
valueTypeChar = [attribute _valueTypeCharacter];
}
else
{
NSString *vt = [attribute valueType];
if (vt) valueTypeChar = [[attribute valueType] UTF8String][0];
}
switch(valueTypeChar)
{
case 'i':
@ -475,7 +482,7 @@ newValueForBytesLengthAttribute (const void *bytes,
attrRespondsToValueClass
= [EOAttribute instancesRespondToSelector: @selector(_valueClass)];
attrRespondsToValueTypeChar
= [EOAttribute instancesRespondToSelector: @selector(_valueTypeChar)];
= [EOAttribute instancesRespondToSelector: @selector(_valueTypeCharacter)];
initialized = YES;
};