This pull request updates bmi.h to pass pointers to a Bmi struct as a first argument.
int (*initialize)(struct Bmi *self, const char *config_file);
That is, the first argument is a struct Bmi *self rather than void *self.
Bmi * model = (Bmi*)malloc(sizeof(Bmi)); // Allocate memory for the BMI
register_bmi(model); // Initialize the BMI methods and any model data
// Call the BMI methods
model->initialize(model, "config_file.txt");
model->update_until(model, 10.5);
model->finalize(model);
I've also wrapped the header with extern "C" for C++.
This pull request updates bmi.h to pass pointers to a Bmi struct as a first argument.
That is, the first argument is a
struct Bmi *self
rather thanvoid *self
.I've also wrapped the header with
extern "C"
for C++.