yfinkelstein/node-zookeeper — comment on commit 4a11a9cfd8de3414a11332bd76bd8dede6eae1d8
File: src/node-zk.cpp line 61
By ddopson:

The biggest API change was the removal of the native EventEmitter class. This require a rearchitecture of the plugin's structure to include a JS wrapper that adds the EventEmitter. During that work, I also did some clean-up on the native code.

What you are seeing in these lines is my attempt to rework the macro definitions. I moved as much as I could to outside the class and tried to use a more simple pattern of MACRO_DEF, MACRO_USE, MACRO_USE, MACRO_USE. I found this made the code simpler to understand.

In my original pull request comments, I warned that this was a major rework and risked breaking changes; however, I did try to maintain backwards compatibility to the best of my ability. With only light test coverage, this was a challenge, and I have fixed several back-compat bugs that I introduced accidentally (**). However, to the best of my knowledge, any piece of code written to the original module should work with the latest version of this code. If this is not true, I'll be more than happy to fix any bugs you can find.