Hello,
I have a C function which expects a list \0 terminated strings as input:
void external_C( int length , const char ** string_list) {
// Inspect the content of string_list - but not modify it.
}
From python (with ctypes) I would like to call this function based on a list of python strings:
def call_c( string_list ):
lib.external_C( ?? )
call_c( ["String1" , "String2" , "The last string"])
Any tips on how to build up the datastructure on the python side? Observe that I guarantee that the C function will NOT alter content of the strings in string_list.
Regards
joakim