How to get the last value set in a leaf-list when my callpoint is call

Hello,

When i tries to get the last values set in a leaf list i have allways the higher value in my leaf-list.
How to get the last value set in my leaf-list?

that’s my callpoint ts_callpoints_set_elem(struct confd_trans_ctx *tctx, confd_hkeypath_t * keypath, confd_value_t * newval)

I think i need to extract the last value in newval but i don’t know how.

Thanks for your help in advance.

See for example examples.confd/user_guide_examples/simple_notrans/simple.c and for documentation on a value represented as a confd_value_t C struct see confd_types(3) man page