Sébastien Tandel ha scritto:

> Therefore you could then do what you want with something like the following :
> it = proto_tree_add_text(ptvcursor_tree(cursor), ptvcursor_tvbuff(cursor),
>       ptvcursor_current_offset(cursor), length, "foo");
> my_tree = ptvcursor_add_subtree_item(cursor, it, ...);
Thanks Sébastien,

that looks fine, except ptvcursor_add_subtree_item() is not (currently) 
declared in any header file, so that does not compile.
Apart from dumbly declaring it, I found this alternative:

  my_tree = ptvcursor_add_text_with_subtree(cursor, ..., "foo");
  my_item = proto_tree_get_parent(my_tree);
  /* ... */
  proto_item_set_text(my_item, "<%s>", my_string);

To me it looks safe and cleaner, am I missing anything?

Luca



___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to