Skip to content

Commit

Permalink
Squashed 'src/' changes from b6a23a24..faf81447
Browse files Browse the repository at this point in the history
faf81447 50 apple clang 15 with c++11 or higher reports warnings wwritable strings in pbasiccpp (#57)

git-subtree-dir: src
git-subtree-split: faf81447ee82e86ce3b2cb9d71fd81316cccfd9f
  • Loading branch information
Darth Vader committed Aug 15, 2024
1 parent a8eadc4 commit e84db2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Phreeqc.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ class Phreeqc
int basic_run(char* commands, void* lnbase, void* vbase, void* lpbase);
void basic_free(void);
#ifdef IPHREEQC_NO_FORTRAN_MODULE
double basic_callback(double x1, double x2, char* str);
double basic_callback(double x1, double x2, const char* str);
#else
double basic_callback(double x1, double x2, const char* str);
#endif
void register_basic_callback(double (*fcn)(double x1, double x2, const char* str, void* cookie), void* cookie1);
#ifdef IPHREEQC_NO_FORTRAN_MODULE
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, char* str, size_t l));
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, size_t l));
#else
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, int l));
#endif
Expand Down Expand Up @@ -1661,7 +1661,7 @@ class Phreeqc
double (*basic_callback_ptr) (double x1, double x2, const char* str, void* cookie);
void* basic_callback_cookie;
#ifdef IPHREEQC_NO_FORTRAN_MODULE
double (*basic_fortran_callback_ptr) (double* x1, double* x2, char* str, size_t l);
double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, size_t l);
#else
double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, int l);
#endif
Expand Down
6 changes: 3 additions & 3 deletions basicsubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4242,7 +4242,7 @@ basic_callback(double x1, double x2, const char * str)

#ifdef IPHREEQC_NO_FORTRAN_MODULE
double Phreeqc::
basic_callback(double x1, double x2, char * str)
basic_callback(double x1, double x2, const char * str)
#else
double Phreeqc::
basic_callback(double x1, double x2, const char * str)
Expand All @@ -4253,7 +4253,7 @@ basic_callback(double x1, double x2, const char * str)

if (basic_callback_ptr != NULL)
{
return (*basic_callback_ptr) (x1, x2, (const char *) str, basic_callback_cookie);
return (*basic_callback_ptr) (x1, x2, str, basic_callback_cookie);
}
if (basic_fortran_callback_ptr != NULL)
{
Expand All @@ -4274,7 +4274,7 @@ Phreeqc::register_basic_callback(double (*fcn)(double x1, double x2, const char
}
#ifdef IPHREEQC_NO_FORTRAN_MODULE
void
Phreeqc::register_fortran_basic_callback(double ( *fcn)(double *x1, double *x2, char *str, size_t l))
Phreeqc::register_fortran_basic_callback(double ( *fcn)(double *x1, double *x2, const char *str, size_t l))
{
this->basic_fortran_callback_ptr = fcn;
}
Expand Down

0 comments on commit e84db2e

Please # to comment.