Benjamin Gilbert bgilbert at cs.cmu.edu
Mon Jul 30 13:54:21 EDT 2012

On 07/30/2012 08:56 AM, Agelos Pappas wrote:
> I just committed a new version of the leica vendor file, which fixes
> most of the issues that you pointed out.

Great, I'll take a look when I can.

> You wrote that "Name constants should be static const arrays like
> LEICA_DESCRIPTION". Does this mean that I should declare as arrays every
> xml property request and every XPATH query?
> i.e. do the following, for example, need to be declared as const arrays:
> result = xmlXPathEvalExpression(BAD_CAST "new:pixels/new:dimension",
> context);
> str = xmlGetProp(result->nodesetval->nodeTab[0], BAD_CAST "version");

The observation that prompted the comment was that in some cases you 
were hardcoding the same string multiple times.  For XML properties, it 
should be fairly straightforward to use static const arrays (which could 
already be of xmlChar[] type), so I'd be inclined to do so.  XPath 
queries could get really clunky that way, so perhaps not.  Use your 

--Benjamin Gilbert

More information about the openslide-users mailing list