troydhanson / uthash

C macros for hash tables and more
Other
4.18k stars 926 forks source link

Fixed small bug in LL_INSERT_INORDER2. #154

Closed me-axentia closed 6 years ago

me-axentia commented 6 years ago

This is my first pull request. Hope I do it correctly.. LL_INSERT_INORDER2 did not work as expected.

me-axentia commented 6 years ago

While writing the tests I found a critical bug (null pointer exception) in the NO_DECLTYPE version of DL_INSERT_INORDER2. I fixed this and updated the documentation as well.

me-axentia commented 6 years ago

Woops, I realized I pushed up a change to do_tests_win32.cmd. This was not my intention.. I'm not sure how to correct this in a nice way?

Quuxplusone commented 6 years ago

I've manually pulled these changes as 9556e3b, 8488951, e0e1780; please take a look and see if I missed anything!

FYI, the nicest way to correct that do_tests_win32.cmd thing would be to revert that file in a new commit

git checkout upstream/master -- do_tests_win32.cmd
git commit -a

and then rebase in order to "fixup" that commit into the commit that had accidentally changed the file

git rebase -i 1c8b48cf~

and then push the resulting rewritten history back up to your GitHub repo:

git push -f origin ll_insert_inorder2_fix
me-axentia commented 6 years ago

Thanks for the pull! I see that you missed the 'prev' parameter in the documentation for DL_INSERT_INORDER2 and CDL_INSERT_INORDER2. Otherwise it looks good. I tried to fix up my branch and adjust this documentation. I don't know if that is useful, otherwise you can adjust the document yourself, I'm new to cooperation in git/github but I guess I should close the pull request now and that I'm free to delete my branch and/or the fork afterwards? (I only created the fork to contribute). Thanks again for a good library and all help!

Quuxplusone commented 6 years ago

Good catch! Fixed the docs in 49428699aa376f6668d2aedcfa9929480132b66e.

Yes, you're free to delete your branch and/or fork at this point. (GitHub will not get confused. It maintains a sort of "shadow repository" of all merged/closed/abandoned pull-requests pretty much forever, regardless of what happens to the actual branches.)