Why if i have this simple code
void voidFunct() { printf("voidFunct called!!!\n"); }
I will compile it as a dynamic library with
gcc -c LSB.c -o LSB.o gcc -shared -Wl -o libLSB.so.1 LSB.o
And I call the function from the python interpreter using ctypes
>>> from ctypes import * >>> dll = CDLL("./libLSB.so.1") >>> return = dll.voidFunct() voidFunct called!!! >>> print return 17
why is the value returned by the void method equal to 17 , and not None or the like? Thanks.
source share