Ethereal-dev: Re: [Ethereal-dev] Re: value_string

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Tue, 30 Aug 2005 12:55:53 +1000
Dropping the const qualifier would be a relatively easy thing to do.


On 8/30/05, Guy Harris <gharris@xxxxxxxxx> wrote:
ronnie sahlberg wrote:

> What someone should implement (ill do it next week or so unless
> someone else wants to give it a try) to optimize access speed and the
> cost of val_to_str()   is to change
> val_to_str() to
> 1, When we find an entry in a value_string   keep track of the index
> into the array in a variable cnt.
> 2, Swap the entry at cnt (the one we found) with the entry cnt>>1
> (IFF cnt!=cnt>>1).

...after de-constifying all the value_string tables; otherwise,
modifying the table will get an access failure.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev