Guy Harris wrote:
On Mon, Dec 01, 2003 at 05:43:46PM +0000, didier wrote:

BTW, why do we use a pointer for value in field_info (proto.h) and in
proto_node?
         fvalue_t                        *value;
} field_info;


Probably because that was the most straightforward way to deal with
objects of a particular type.

"fvalue_t" is defined in "epan/ftypes/ftypes.h", so the structure is
exported; we could probably have an "fvalue_init()" routine that took a
pointer to an "fvalue_t" and an "ftenum_t" as arguments and initialized
the "fvalue_t" appropriately for that type, and an FVALUE_CLEANUP macro
that calls the free routine for the value if it exists, and include the
"fvalue_t" in the field_info structure.
Attached a patch for field_info fvalue_t *value to fvalue_t fvalue

Didier

Attachment: ethereal.gz
Description: Unix tar archive

_______________________________________________
Ethereal-dev mailing list
[EMAIL PROTECTED]
http://www.ethereal.com/mailman/listinfo/ethereal-dev

Reply via email to