From 6205375c0317ec93fe1bb4715cef61bff1f969eb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 3 Apr 2021 10:04:16 -0400 Subject: [PATCH] allow const char for compute/fix id arguments --- src/library.cpp | 4 ++-- src/library.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index ac059f53ae..8f23ffcb6c 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1615,7 +1615,7 @@ lists the available options. * \return pointer (cast to ``void *``) to the location of the * requested data or ``NULL`` if not found. */ -void *lammps_extract_compute(void *handle, char *id, int style, int type) +void *lammps_extract_compute(void *handle, const char *id, int style, int type) { LAMMPS *lmp = (LAMMPS *) handle; @@ -1801,7 +1801,7 @@ The following table lists the available options. * \return pointer (cast to ``void *``) to the location of the * requested data or ``NULL`` if not found. */ -void *lammps_extract_fix(void *handle, char *id, int style, int type, +void *lammps_extract_fix(void *handle, const char *id, int style, int type, int nrow, int ncol) { LAMMPS *lmp = (LAMMPS *) handle; diff --git a/src/library.h b/src/library.h index 3500e1b65e..8db19f7eb2 100644 --- a/src/library.h +++ b/src/library.h @@ -138,8 +138,8 @@ void *lammps_extract_atom(void *handle, const char *name); * Library functions to access data from computes, fixes, variables in LAMMPS * ---------------------------------------------------------------------- */ -void *lammps_extract_compute(void *handle, char *id, int, int); -void *lammps_extract_fix(void *handle, char *, int, int, int, int); +void *lammps_extract_compute(void *handle, const char *, int, int); +void *lammps_extract_fix(void *handle, const char *, int, int, int, int); void *lammps_extract_variable(void *handle, const char *, const char *); int lammps_set_variable(void *, char *, char *);