GZipDecompressorInputStream missing an #undef


#1

Please add #undef Code after including "zlib/*" headers. Don't ask me how I know this!!!!


#2

I won't ask. But I'll also #undef "Dad", "Len" and "Freq"

zlib is such a relic. One day I'd love to have time to sit down and re-implement it using clean, readable C++. Could probably nail it in a few hundred lines of code.


#3

I’m doing the equivalent of:

#include "juce_core.cpp"
#include "juce_audio.cpp"
#include...

So there is just one .cpp that brings in all the beast sources. It required a little bit of massaging. But if you make one .cpp that includes all of the juce modules I bet you will catch some stuff and you’ll be able to clean things up.

As far as zlib goes…I dont think there’s much value in turning it into regular C++. The farthest I would go would be just to eliminate the macros. You can always wrap it.

Note that I’m using a few C libraries in beast…for example, http-parser from joyent (its the same parser used in Node.js). Do I want to rewrite that in C++? Hell no!!! Its fine the way it is, in C. And I can pick up updates without headache.


#4

As far as zlib goes...I dont think there's much value in turning it into regular C++. The farthest I would go would be just to eliminate the macros. You can always wrap it.

No, there's no actual value in doing that - it's just something I'd find satisfying!