Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c library does not allow disable debug without changing the code #323

Open
ArFe opened this issue Oct 10, 2023 · 1 comment
Open

c library does not allow disable debug without changing the code #323

ArFe opened this issue Oct 10, 2023 · 1 comment

Comments

@ArFe
Copy link

ArFe commented Oct 10, 2023

The c library defines #define SPARKPLUG_DEBUG 1 in the code.

That prevents anyone from disabling the debug print without changing the code, as DEBUG_PRINT is defined if SPARKPLUG_DEBUG is defined or not.

// Enable/disable debug messages
#define SPARKPLUG_DEBUG 1
#ifdef SPARKPLUG_DEBUG
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
#else
#define DEBUG_PRINT(...) do {} while (0)
#endif

If you change the code you have to disclose your source code, as per the license, which makes it hard to use it in professional projects.

@wes-johnson
Copy link
Contributor

If you want to resubmit a PR against a Github account where you've signed the ECA, I'm fine to accept this. I also am not a lawyer, but I'm not sure your interpretation of the Eclipse Public License is entirely correct. Regardless, I'll leave this open for a while if you want to resubmit that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants