[XML-SIG] FW: pyexpat compilation errors - Python 2.0b1
Walter Underwood
wunder@ultraseek.com
Thu, 06 Jul 2000 16:03:40 -0700
I'd prefer seeing forward declarations for the functions, then a
declare the array in one place. Then there is no need for null
termination, because you can get the length with this idiom:
sizeof(handler_info_array)/sizeof(handler_info_array[0])
It's a compile-time constant, so the optimizer has maximum fun.
wunder
--On Tuesday, July 04, 2000 12:48 PM -0500 Paul Prescod
<paul@prescod.net> wrote:
> I like this solution. Work for you Mark?
>
> Juergen Hermann wrote:
>>
>> statichere struct HandlerInfo* handler_info = 0;
>>
>> ...
>>
>> statichere struct HandlerInfo handler_info_array[]=
>> {{"StartElementHandler",
>> ...
>> };
>>
>> void
>> initpyexpat(){
>> handler_info = handler_info_array;
>> ...
>> }
>
> --
> Paul Prescod - Not encumbered by corporate consensus
> The distinction between the real twentieth century (1914-1999) and the
> calenderical one (1900-2000) is based on the convincing idea that the
> century's bouts of unprecented violence, both within nations and
> between them, possess a definite historical coherence -- that they
> constitute, to
> put it simply, a single story.
> - The Unfinished Twentieth Century, Jonathan Schell
> Harper's Magazine, January 2000
>
> _______________________________________________
> XML-SIG maillist - XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig
>
--
Walter R. Underwood
Senior Staff Engineer, Ultraseek Corp.
http://www.ultraseek.com/