SopiMlab/py

confusion about boolean configuration values

Opened this issue · 0 comments

the build configuration obviously uses boolean values, e.g.

py/build/config-lnx.def

Lines 24 to 25 in 35138a0

# use python with pymalloc (look for "pythonX.Ym" files)
PY_USE_PYMALLOC=1

however, the build system does not check whether these values are set to a true value (that is: 1), but instead it is only important that the variable is assigned any value:

ifdef PY_USE_PYMALLOC

the consequence is that e.g. setting PY_USE_PYMALLOC=0 will still enable pymalloc, even though the declaration suggests otherwise.

I suggest to either

  • check whether a configuration variable is both defined and has a value of 1 (very much preferred)
  • or document that the actual value does not matter