Skip to content

Commit 3e8f160

Browse files
committed
Fixed breaking change with jump. Specifically, that julia code expects the first two fields of HighsCallbackDataIn to be: interrupt, solution.
I had rearranged the fields in HighsCallbackDataIn, which caused the break.
1 parent e1a8009 commit 3e8f160

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

highs/lp_data/HighsCallbackStruct.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@ typedef struct {
4747
HighsInt user_solution_callback_origin;
4848
} HighsCallbackDataOut;
4949

50+
// Some external packages (e.g., jump) currently assume that the first 2 fields
51+
// of this struct are interrupt and solution. Rearranging the struct may be a
52+
// breaking change.
5053
typedef struct {
51-
void* cbdata; // cast of HighsCallbackInput
5254
int user_interrupt;
55+
double* user_solution;
56+
void* cbdata; // cast of HighsCallbackInput (for internal use)
5357
int user_has_solution;
5458
HighsInt user_solution_size;
55-
double* user_solution;
5659
} HighsCallbackDataIn;
5760

5861
// Additional callback handling

0 commit comments

Comments
 (0)