Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resetNashSolver() to the public API #3

Merged
merged 3 commits into from
Apr 24, 2021

Conversation

bzinberg
Copy link

@bzinberg bzinberg commented Apr 20, 2021

Fixes #2.

Tested

Builds successfully on my machine.

lrsnashlib.h Outdated
@@ -67,7 +67,7 @@ void initFwidth(game *g);
void updateFwidth(game *g, int col, int pos, char *str);


long FirstTime; /* set this to true for every new game to be solved */
extern long FirstTime; /* set this to true for every new game to be solved */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why defining it here at all?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reading of the standard is that every variable must be defined exactly once, and an extern declaration is not a definition.

Copy link

@giordano giordano Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can remove this line 🙂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then the variable would have internal linkage

@blegat
Copy link
Member

blegat commented Apr 22, 2021

Can you redirect the change to the branch of #4 ? We won't be making change for the old version of lrslib, let's focus on v7.1a. There the definition in the .h was removed and we need to add it back, see JuliaPolyhedra/LRSLib.jl#41 (comment)

@blegat
Copy link
Member

blegat commented Apr 22, 2021

Probably even better is to add a function for modifying FirstTime and not defining the variable in .h.

@bzinberg
Copy link
Author

Probably even better is to add a function for modifying FirstTime and not defining the variable in .h.

Responded to this in JuliaPolyhedra/LRSLib.jl#41 (comment)

@bzinberg
Copy link
Author

Can you redirect the change to the branch of #4 ? We won't be making change for the old version of lrslib, let's focus on v7.1a. There the definition in the .h was removed and we need to add it back, see JuliaPolyhedra/LRSLib.jl#41 (comment)

Absolutely. Thanks for working on the migration!

In preparation for rebasing this PR onto JuliaPolyhedra#4

This is a backward-incompatible change that will break earlier versions of LRSLib.jl.
@bzinberg bzinberg changed the base branch from master to v7.1 April 22, 2021 21:40
@bzinberg bzinberg changed the title Make FirstTime extern Add resetNashSolver() to the public API Apr 22, 2021
@bzinberg
Copy link
Author

Can you redirect the change to the branch of #4 ?

Done, and changed the target branch of this PR accordingly.

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@blegat blegat merged commit 5b8ab79 into JuliaPolyhedra:v7.1 Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link error for identifier FirstTime
3 participants