Skip to content

Add resetNashSolver() to the public API#3

Merged
blegat merged 3 commits into
JuliaPolyhedra:v7.1from
bzinberg:master
Apr 24, 2021
Merged

Add resetNashSolver() to the public API#3
blegat merged 3 commits into
JuliaPolyhedra:v7.1from
bzinberg:master

Conversation

@bzinberg

@bzinberg bzinberg commented Apr 20, 2021

Copy link
Copy Markdown

Fixes #2.

Tested

Builds successfully on my machine.

Comment thread lrsnashlib.h Outdated


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 */

Copy link
Copy Markdown

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
Copy Markdown
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.

@giordano giordano Apr 20, 2021

Copy link
Copy Markdown

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
Copy Markdown
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

blegat commented Apr 22, 2021

Copy link
Copy Markdown
Member

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

blegat commented Apr 22, 2021

Copy link
Copy Markdown
Member

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

@bzinberg

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Author

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

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

@blegat blegat left a comment

Copy link
Copy Markdown
Member

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