Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Definition of 'null' in sc_types.h clashes with alternative definitions especially in C++ #2555

Closed
4 tasks done
terfloth opened this issue Dec 28, 2018 · 0 comments · Fixed by #2558
Closed
4 tasks done

Comments

@terfloth
Copy link
Contributor

terfloth commented Dec 28, 2018

There are some problems with the definition of 'null' in sc_types.h in the context of C++:

  • it does not make use of existing C++ definitions
  • 'null' is likely subject to definition clashes. As an example Qt 5.10 upwards also defines that symbol.

Additionally the literal name is defined by a constant and thus is not easily changeable for platform specific code generators.

So the following actions must be taken

  • replace the 'null' by 'sc_null'
  • redefine sc_null in sc_types.h for C
  • redefine sc_null sc_types.h for C++ to be 'NULL'
  • replace constant by extension method in C & C++ code generators
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant