fix crash on 64 bit system. (testing on MacOS)

From python ctypes document:

`
You can also use a callable Python object (a function or a class for example) as the restype attribute, if the foreign function returns an integer. The callable will be called with the integer the C function returns, and the result of this call will be used as the result of your function call.
`

so python truncated the 64 bit address to integer (32 bit) for freeing_char_p. that's why it crashed. 

fix it by wrap it in a Python method.