Thanks for merging my other PR! I really appreciate the positive feedback.
This just contains code style and consistency changes, most of which are related to the compatibility updates from my previous PR.
None of this is strictly necessary (and nothing here affects runtime), but it makes the codebase ever-so-slightly nicer to work with.
cleanup comments for consistency
cleanup function definitions for consistency
standardize coding style in iwlist.c
move py2/3 compat macros to utils.h
add comments for prettiness
This looks good! I'm going to merge it in, however something I should have made public is that you've motivated me to rewrite the library using CFFI to save the headaches that C extensions create (bytes vs strings, extensibility, documentation, PyPy support, refcounting and so on).
The current branch is available here - I've pushed my work only a few minutes ago, but I believe it mirrors the current API exactly, and updates the Python 3 API to mirror the Python 2 API exactly regarding str vs bytes for dictionary keys by making all keys bytes.
Let me know what you think! It would be good to get more activity on the project. I'm not going to merge it in and release it until I've played with it a little while longer, but in my testing so far it seems pretty good.
Good job with the CFFI support. I don't have any experience writing code that uses it, but I can see where it is nice to have.
Just to confirm that this was the case, I did at least fetch your branch and use it to scan for wireless networks with Python 3. This was successful. I've been short on time lately, so it's up in the air whether I'll take the time to learn CFFI so I can mess with this further, but it's nice to see an even more portable variant.