From fd4261fdbe43e2d832eb8c2f1312453d2d3ee1ab Mon Sep 17 00:00:00 2001 From: David Ayers Date: Thu, 4 Jan 2007 22:51:31 +0000 Subject: [PATCH] * EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m (assignExternalInfoForEntity:): Remove method replicated from superclass. * EOControl/EOKeyValueCoding.m (computeAvgForKey:): Return zero for empty arrays. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@24314 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 9 +++++++++ EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m | 16 ---------------- EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m | 3 ++- EOControl/EOKeyValueCoding.m | 6 +++++- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 445fa4c..b544319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-01-04 David Ayers + + * EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m + (assignExternalInfoForEntity:): Remove method replicated from + superclass. + + * EOControl/EOKeyValueCoding.m (computeAvgForKey:): Return zero + for empty arrays. + 2006-01-03 Matt Rice * EOAdaptors/SQLiteAdaptor/LoginPanel/SQLite3LoginPanel.m: Remove diff --git a/EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m b/EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m index b8a78b6..9e64fb9 100644 --- a/EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m +++ b/EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m @@ -266,22 +266,6 @@ static NSString *typeNames[][2] = { [attribute setExternalType: typeNames[value][0]]; } -+ (void)assignExternalInfoForEntity: (EOEntity *)entity -{ - NSArray *attributes = [entity attributes]; - EOAttribute *attribute = nil; - IMP arrayOAI = NULL; - static SEL selfAEIFA_SEL = @selector(assignExternalInfoForAttribute:); - IMP selfAEIFA_IMP = [self methodForSelector: selfAEIFA_SEL]; - unsigned i, c; - - for (i=0, c=[attributes count]; i < c; i++) - { - attribute = PSQLA_ObjectAtIndexWithImpPtr(attributes, &arrayOAI, i); - selfAEIFA_IMP(self, selfAEIFA_SEL, attribute); - } -} - /* Inherited methods */ - (EOAdaptorContext *)createAdaptorContext diff --git a/EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m b/EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m index fec1310..7f46bad 100644 --- a/EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m +++ b/EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m @@ -185,7 +185,8 @@ pgResultDictionary(PGresult *pgResult) * read up to the specified number of characters, terminating at a non-digit * except for leading whitespace characters. */ -static inline int getDigits(const char *from, char *to, int limit, BOOL *error) +static inline int +getDigits(const char *from, char *to, int limit, BOOL *error) { int i = 0; int j = 0; diff --git a/EOControl/EOKeyValueCoding.m b/EOControl/EOKeyValueCoding.m index 62c265e..fb6d794 100644 --- a/EOControl/EOKeyValueCoding.m +++ b/EOControl/EOKeyValueCoding.m @@ -458,7 +458,11 @@ initialize(void) right = [[GDL2_ObjectAtIndexWithImp(self,oaiIMP,i) valueForKey: key] decimalValue]; NSDecimalAdd(&result, &left, &right, mode); } - }; + } + else + { + return [NSDecimalNumber zero]; + } left = result; NSDecimalFromComponents(&right, (unsigned long long) count, 0, NO);