On Sat, 13 May 2017 13:48:18 -0700, Gregory Szorc wrote: > On Sat, May 13, 2017 at 11:14 AM, Jun Wu <qu...@fb.com> wrote: > > > Excerpts from Yuya Nishihara's message of 2017-05-13 22:45:14 +0900: > > > I got lots of warnings because of the precheck/postinit expansion: > > > > > > mercurial/util.h:80:16: warning: the comparison will always evaluate as > > > 'true' for the address of 'module_init' will never be NULL [-Waddress] > > > > > > > + ((int (*)(PyObject *))postinit)(m); \ > > > > > > It's dangerous to disable compiler type checking. > > > > > > Overall, I prefer not using a big macro like this even though it could > > get > > > rid of some redundant codes. > > > > This is mainly responding to Greg's comment about code duplication. > > Let me try if I can keep compiler type checking and remove those warnings. > > > > FWIW, I've been thinking about merging the C modules into a single one. IMO > there aren't many benefits to having separate C modules other than clearer > naming. Having all the code in a single compilation unit facilitates more > code reuse, more aggressive compiler optimization, etc. It would get a > little weird on the pure Python / CFFI side of the world.
Merging C modules would be likely to create more import cycles, seen in encoding.py for example. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel