diff --git a/ChangeLog b/ChangeLog index c1156e2..3901aad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2005-04-05 Manuel Guesdon + * GSWExtensions.framework/Makefile.preamble: + o handle GSWDEBUG in Makefile.preamble + * GSWExtensionsGSW.framework/Makefile.preamble: + o handle GSWDEBUG in Makefile.preamble + * GSWExtensionsGSW.framework/GSWCacheElement.m: + o avoid stringWithFormat for simple cases + * GSWeb.framework/GSWPrivate.h: + o new (prvate) file + * GSWeb.framework/GSWRequest.m: + o explicit use of GSWValueQualityHeaderPart to + avoid compiler warning and make code more readable + o avoid using stringWithFormat in + -_urlWithURLPrefix:requestHandlerKey:path:queryString: + o avoid appendFormat: and use cached imp appendString: + in _getFormValuesFromMultipartFormData (50% speed gain) + * GSWeb.framework/GSWRepetition.m: + o avoid stringWithFormat: + * GSWeb.framework/GSWSession.m: + o replaced some statusLogWithFormat: by statusLogString: + * GSWeb.framework/GSWApplication.h/.m: + o added status logs methods with string parameters + * GSWeb.framework/GSWConditional.m: + o avoid stringWithFormat: + * GSWeb.framework/GSWInput.m: + o ensure name binding value is a string + 2005-04-04 David Wetzel * GSWeb.framework/GSWApplication.m * GSWeb.framework/GSWRequest.m diff --git a/GSWExtensions.framework/Makefile.preamble b/GSWExtensions.framework/Makefile.preamble index 004310c..460445e 100644 --- a/GSWExtensions.framework/Makefile.preamble +++ b/GSWExtensions.framework/Makefile.preamble @@ -43,6 +43,10 @@ else ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN endif +ifeq ($(GSWDEBUG), yes) + ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG +endif + ifeq ($(GSWDEBUG_MEM), yes) ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_MEM endif diff --git a/GSWExtensionsGSW.framework/GSWCacheElement.m b/GSWExtensionsGSW.framework/GSWCacheElement.m index 038f092..42e222f 100644 --- a/GSWExtensionsGSW.framework/GSWCacheElement.m +++ b/GSWExtensionsGSW.framework/GSWCacheElement.m @@ -133,6 +133,9 @@ static Class standardClass = Nil; else if (_cache) { // Get keys associations + static NSString* keysCache[10]={ @"key0", @"key1", @"key2", @"key3", @"key4", + @"key5", @"key6", @"key7", @"key8", @"key9" }; + static int keysCacheCount=10; int keyIndex=0; NSMutableArray* keysArray=(NSMutableArray*)[NSMutableArray array]; GSWAssociation* aKeyAssociation=nil; @@ -143,12 +146,16 @@ static Class standardClass = Nil; aKeyAssociation=[associations objectForKey:@"key"]; if (!aKeyAssociation) { - aKeyAssociation=[associations objectForKey:@"key0"]; + aKeyAssociation=[associations objectForKey:keysCache[0]]; } } + else if (keyIndexGSWeb: Class GSWPrivate + + Copyright (C) 2005 Free Software Foundation, Inc. + + Written by: Manuel Guesdon + Date: Apr 2005 + + $Revision$ + $Date$ + + This file is part of the GNUstep Web Library. + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +**/ + +// $Id$ + +#ifndef _GSWPrivate_h__ + #define _GSWPrivate_h__ + + +/** append string to object using appendString: impPtr. +If *impPtr is NULL, the method assign it **/ +static inline void GSWeb_appendStringWithImpPtr(NSMutableString* object,IMP* impPtr,NSString* string) +{ + if (object) + { + if (!*impPtr) + *impPtr=[object methodForSelector:@selector(appendString:)]; + (**impPtr)(object,@selector(appendString:),string); + }; +}; + + +#endif // _GSWPrivate_h__ diff --git a/GSWeb.framework/GSWRepetition.m b/GSWeb.framework/GSWRepetition.m index 847d188..2f88f78 100644 --- a/GSWeb.framework/GSWRepetition.m +++ b/GSWeb.framework/GSWRepetition.m @@ -140,7 +140,7 @@ static SEL setValueInComponentSEL = NULL; { [super setDeclarationName:declarationName]; if (declarationName && _childrenGroup) - [_childrenGroup setDeclarationName:[NSString stringWithFormat:@"%@-StaticGroup",declarationName]]; + [_childrenGroup setDeclarationName:[declarationName stringByAppendingString:@"-StaticGroup"]]; }; //-------------------------------------------------------------------- diff --git a/GSWeb.framework/GSWRequest.m b/GSWeb.framework/GSWRequest.m index 06a813c..4b7e045 100644 --- a/GSWeb.framework/GSWRequest.m +++ b/GSWeb.framework/GSWRequest.m @@ -35,6 +35,7 @@ RCS_ID("$Id$") #include "GSWeb.h" #include #include "GSWInputStreamData.h" +#include "GSWPrivate.h" //==================================================================== @implementation GSWValueQualityHeaderPart @@ -74,10 +75,12 @@ RCS_ID("$Id$") for(i=0;i