Re: [evolution-patches] Trivial patch to add const to camel



seems to me like you are trying to micro-optimise and that's a huge
waste of time.

do you have any profiling data showing that these changes make a
difference?

On Fri, 2005-04-22 at 17:06 +0100, Ross Burton wrote:
> Index: camel/camel-object.c
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/camel/camel-object.c,v
> retrieving revision 1.52
> diff -u -r1.52 camel-object.c
> --- camel/camel-object.c        23 Dec 2004 04:22:43 -0000      1.52
> +++ camel/camel-object.c        22 Apr 2005 16:04:33 -0000
> @@ -105,18 +105,18 @@
>  };
>  
>  /* used to tag a bag hookpair */
> -static const char *bag_name = "object:bag";
> +static const char bag_name[] = "object:bag\0";

what's with the added \0's?

>  
>  /* meta-data stuff */
>  static void co_metadata_free(CamelObject *obj, CamelObjectMeta
> *meta);
>  static CamelObjectMeta *co_metadata_get(CamelObject *obj);
>  static CamelHookPair *co_metadata_pair(CamelObject *obj, int create);
>  
> -static const char *meta_name = "object:meta";
> +static const char meta_name[] = "object:meta\0";
>  #define CAMEL_OBJECT_STATE_FILE_MAGIC "CLMD"
>  
>  /* interface stuff */
> -static const char *interface_name = "object:interface";
> +static const char interface_name[] = "object:interface\0";

and everywhere else...

-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]