I tried loading C shared library .so in Python using ctypes.CDLL class (Linux). Here is the link to which tells what I did. As I see the documentation it says CDLL class assumes that function returns int types. I’ve a doubt here what if I need to return variable of type other than the int type from a function in C?.
And to what extent we can use C functions in Python i mean what are the limits/restrictions on using C shared libraries and functions
Thanks in Advance
By default, it assumes int, but you can set restype to any of the supported types to override that. E.g., from the docs:
This means that
strchrreturns a pointer to a char, which corresponds to a Python string (orNone, for aNULLpointer).