
On 11/18/2013 03:44 PM, Doug Goldstein wrote:
virTypedParamsClear() and virTypedParamsFree() were introduced in libvirt 1.0.2. In an effort to keep the code clean bring these two functions to libvirt-python if we're building against a version of libvirt that's older than 1.0.2 --- libvirt-utils.c | 43 +++++++++++++++++++++++++++++++++++++++++++ libvirt-utils.h | 6 ++++++ 2 files changed, 49 insertions(+)
+ * Returns nothing. + */ +void +virTypedParamsClear(virTypedParameterPtr params, + int nparams)
Umm, where's the LIBVIR_CHECK_VERSION() to ensure that we don't compile this when using a new enough libvirt.so?
+ * + * Frees all memory used by string parameters and the memory occuiped by
s/occuiped/occupied/ (upstream was correct, so not sure how you made that mistake)
+# if ! LIBVIR_CHECK_VERSION(1,0,2) +void virTypedParamsClear(virTypedParameterPtr params, int nparams); + +void virTypedParamsFree(virTypedParameterPtr params, int nparams); +# endif /* ! LIBVIR_CHECK_VERSION(1,0,2) */
This part is okay, but the .c side also needs guards. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org