]> git.ipfire.org Git - thirdparty/lxc.git/commit
python: improve convert_tuple_to_char_pointer_array
authorChristian Seiler <christian@iwakd.de>
Tue, 13 Aug 2013 19:36:58 +0000 (21:36 +0200)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 14 Aug 2013 21:51:15 +0000 (16:51 -0500)
commitb7f2846aabb8c1c59b078b4c529e60ea254432f1
tree9437ec89fab88f52b8c9b9b59fcccb0a092f084b
parent626ad11bfee3e12e675f51e92920030a6f383b19
python: improve convert_tuple_to_char_pointer_array

convert_tuple_to_char_pointer_array now also accepts lists and not only
tuples when converting to a C array. Other fixes:

 - some checking that it's actually a list/tuple before trying to
   convert
 - off-by-a-few-bytes allocation error
   (sizeof(char *)*n+1 vs. sizeof(char *)*(n+1)/calloc(...))

Signed-off-by: Christian Seiler <christian@iwakd.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/python-lxc/lxc.c