--- modules/libsvm/config.h.in.orig 2010-06-30 12:02:55.000000000 -0600 +++ modules/libsvm/config.h.in 2011-06-23 14:28:00.454999254 -0600 @@ -27,8 +27,8 @@ /* Define to 1 if you have the `svm_cross_validation' function. */ #undef HAVE_SVM_CROSS_VALIDATION -/* Define to 1 if you have the `svm_destroy_model' function. */ -#undef HAVE_SVM_DESTROY_MODEL +/* Define to 1 if you have the `svm_free_and_destroy_model' function. */ +#undef HAVE_SVM_FREE_AND_DESTROY_MODEL /* Define to 1 if you have the `svm_destroy_param' function. */ #undef HAVE_SVM_DESTROY_PARAM --- modules/libsvm/configure.in.orig 2010-06-30 12:02:55.000000000 -0600 +++ modules/libsvm/configure.in 2011-06-23 14:28:49.333999905 -0600 @@ -30,7 +30,7 @@ AC_CHECK_FUNCS(svm_check_parameter dnl svm_check_probability_model dnl svm_cross_validation dnl -svm_destroy_model dnl +svm_free_and_destroy_model dnl svm_destroy_param dnl svm_get_labels dnl svm_get_nr_class dnl --- modules/libsvm/configure.orig 2010-06-30 12:02:55.000000000 -0600 +++ modules/libsvm/configure 2011-06-23 14:28:27.827999766 -0600 @@ -4555,7 +4555,7 @@ if test "$ac_cv_search_svm_train" = "no"; then as_fn_error "cannot find LibSVM library" "$LINENO" 5 fi -for ac_func in svm_check_parameter svm_check_probability_model svm_cross_validation svm_destroy_model svm_destroy_param svm_get_labels svm_get_nr_class svm_get_svm_type svm_get_svr_probability svm_load_model svm_predict svm_predict_probability svm_predict_values svm_save_model svm_train svm_set_print_string_function +for ac_func in svm_check_parameter svm_check_probability_model svm_cross_validation svm_free_and_destroy_model svm_destroy_param svm_get_labels svm_get_nr_class svm_get_svm_type svm_get_svr_probability svm_load_model svm_predict svm_predict_probability svm_predict_values svm_save_model svm_train svm_set_print_string_function do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" --- modules/libsvm/libsvm.lisp.orig 2010-06-30 11:56:36.000000000 -0600 +++ modules/libsvm/libsvm.lisp 2011-06-23 14:33:44.334999678 -0600 @@ -97,11 +97,11 @@ ;;; foreign functions and small wrappers ;;; -(ffi:def-call-out svm_destroy_model - (:arguments (model model)) (:return-type nil)) +(ffi:def-call-out svm_free_and_destroy_model + (:arguments (model (c-pointer model))) (:return-type nil)) (defun destroy-model (model) (when (validp model) - (svm_destroy_model model) + (svm_free_and_destroy_model (ffi:with-c-var (modelp 'model model) (ffi:c-var-address modelp))) (setf (validp model) nil))) (cl:defun finalize-model (model) (ext:finalize (set-foreign-pointer model :copy) #'destroy-model) --- modules/libsvm/svm.xml.orig 2010-05-26 11:52:55.000000000 -0600 +++ modules/libsvm/svm.xml 2011-06-23 14:34:44.021999852 -0600 @@ -91,7 +91,7 @@ (destroy-model &model-r;) Release the memory taken by the model object and invalidate the &foreign-variable-t; &model-r;. - Calls svm_destroy_model. + Calls svm_free_and_destroy_model. You do ¬-e; have to call this function yourself, it is attached to the &model-r; by train and load-model via &finalize;.