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

Enhance hashmap implementation #133

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Enhance hashmap implementation #133

wants to merge 9 commits into from

Conversation

dekrain
Copy link
Collaborator

@dekrain dekrain commented Nov 20, 2022

This should fix #129 unless I messed up somewhere seriously.

@@ -396,7 +396,8 @@ static int yf_compile_files(struct yf_args * args, struct yf_compilation_data *
fdata->file_name = yf_strdup(fname);
fdata->parse_anew = 1;
/* TODO - more data */
yfh_set(&data.files, fdata->file_name, fdata);
if (yfh_set(&data.files, fdata->file_name, fdata) != YF_OK)
abort();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we print some error message here indicating what's happening? Or does abort do something similar?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Abort lets us break if we're debugging. For a regular user, the error would be meaningless since there's not anything that they can do anything about it.

adamhutchings
adamhutchings previously approved these changes Nov 20, 2022
Copy link
Collaborator

@adamhutchings adamhutchings left a comment

Choose a reason for hiding this comment

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

Looks good!

@adamhutchings
Copy link
Collaborator

Except for the failing tests. Do we know why?

@dekrain
Copy link
Collaborator Author

dekrain commented Nov 20, 2022

I'm debugging it

@adamhutchings
Copy link
Collaborator

Awesome, thanks so much!

@dekrain dekrain marked this pull request as ready for review November 20, 2022 17:56
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.

Fix hashmap iteration
2 participants