I think this should be done in the wrapper. This file is supposed to be 'almost` C-free and only calling things from the Wrapper for easy readability.