From 54c41b01b414c55f338a99df4efc87beda7275b3 Mon Sep 17 00:00:00 2001 From: stevenj Date: Tue, 1 Jun 2010 23:50:21 -0400 Subject: [PATCH] added fortran wrapper for nlopt_copy darcs-hash:20100602035021-c8de0-d1fabb203b45275b539e487a4868933cf9551be9.gz --- api/f77funcs_.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/f77funcs_.h b/api/f77funcs_.h index 61e29df..bac7e82 100644 --- a/api/f77funcs_.h +++ b/api/f77funcs_.h @@ -40,6 +40,15 @@ void F77_(nlo_create,NLO_CREATE)(nlopt_opt *opt, int *alg, int *n) } } +void F77_(nlo_copy,NLO_COPY)(nlopt_opt *nopt, nlopt_opt *opt) +{ + *nopt = nlopt_copy(*opt); + if (*nopt && nlopt_dup_f_data(*nopt, sizeof(f77_func_data)) < 0) { + nlopt_destroy(*nopt); + *nopt = NULL; + } +} + void F77_(nlo_destroy,NLO_DESTROY)(nlopt_opt *opt) { nlopt_destroy(*opt); -- 2.30.2