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

igraph_error_t should be an enum #1867

Closed
szhorvat opened this issue Dec 2, 2021 · 6 comments
Closed

igraph_error_t should be an enum #1867

szhorvat opened this issue Dec 2, 2021 · 6 comments
Assignees
Milestone

Comments

@szhorvat
Copy link
Member

szhorvat commented Dec 2, 2021

igraph_error_t should be an enum, now it's a typedef for an int.

Be sure to test with C++.

@szhorvat szhorvat added this to the 0.10 milestone Dec 2, 2021
@GroteGnoom
Copy link
Member

Be sure to test with C++.

It should just pass all our tests, right? Or do you think extra tests are required?

@szhorvat
Copy link
Member Author

szhorvat commented Dec 2, 2021

Thinking about it, I think the C++ parts of igraph itself should be sufficient to test it. If the library compiles, we're fine.

@GroteGnoom
Copy link
Member

igraph_warning takes an igraph_error_t as one of its arguments, but that argument is 0 in one place in the source code, and -1 everywhere else (like in IGRAPH_WARNING). -1 is of course not allowed if igraph_error_t is an enum. Should we just remove the parameter?

@szhorvat
Copy link
Member Author

I was always of the opinion that this parameter should be removed.

Ping @ntamas @vtraag for input.

@ntamas
Copy link
Member

ntamas commented Jan 29, 2022

Yes, this can be removed (in igraph 0.10). Please either do it in the develop branch now or add it to the list of breaking changes in the wiki so we don't forget it.

@GroteGnoom
Copy link
Member

Fixed in #1948

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

No branches or pull requests

3 participants