Skip to content

Commit

Permalink
Fix caml deprecated warnings in nls
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrk committed Mar 19, 2022
1 parent 24d1e02 commit 56793b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

sysname='Sundials/ML'
version=6.1.1
versionp=0
versionp=1
contact='[email protected]'

unset prefix
Expand Down
8 changes: 2 additions & 6 deletions src/lsolvers/sundials_linearsolver_ml.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include "../config.h"

#define CAML_NAME_SPACE

#include <caml/mlvalues.h>
#include <caml/alloc.h>
#include <caml/memory.h>
Expand All @@ -21,12 +23,6 @@
#include <caml/fail.h>
#include <caml/bigarray.h>

#if 41400 <= OCAML_VERSION
// caml/compatibility.h defines a macro 'initialize' in order to show a
// deprecated warning, but Sundials uses 'initialize' as a field name.
#undef initialize
#endif

#include "../sundials/sundials_ml.h"
#include "../nvectors/nvector_ml.h"
#include "../lsolvers/sundials_linearsolver_ml.h"
Expand Down
16 changes: 9 additions & 7 deletions src/lsolvers/sundials_nonlinearsolver_ml.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@

#include "../config.h"

#define CAML_NAME_SPACE

#include <caml/mlvalues.h>
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/callback.h>
#include <caml/custom.h>
#include <caml/fail.h>

#include "../sundials/sundials_ml.h"
#include "../nvectors/nvector_ml.h"
#include "../lsolvers/sundials_nonlinearsolver_ml.h"
Expand Down Expand Up @@ -66,13 +75,6 @@ typedef struct _N_VectorContent_SensWrapper *N_VectorContent_SensWrapper;

#endif

#include <caml/mlvalues.h>
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/callback.h>
#include <caml/custom.h>
#include <caml/fail.h>

#define MAX_ERRMSG_LEN 256

/* Nonlinear solvers (NLS) - use cases
Expand Down

0 comments on commit 56793b1

Please sign in to comment.