Come posso convertire un elenco python di stringhe python in uno char**
con terminazione null in modo che possa passarlo alla funzione C esterna?Cython - conversione dell'elenco di stringhe in char **
ho:
struct saferun_task:
saferun_jail *jail
saferun_limits *limits
char **argv
int stdin_fd
int stdout_fd
int stderr_fd
int saferun_run(saferun_inst *inst, saferun_task *task, saferun_stat *stat)
in cdef blocco extern
voglio convertire qualcosa come ('./a.out', 'param1', 'param2')
a qualcosa che posso assegnare a saferun_task.argv
Come?
Controllare questo: https://groups.google.com/forum/?fromgroups#!searchin/cython-users/char**/cython-users/ldtOV1QwITA/bxL1AtiALkwJ –
Possibile duplicato di [Fast string array - Cython] (http://stackoverflow.com/questions/17511309/fast-string-array-cython) – Claudiu