Add capability to get and set the personalitty function from the C API