compiler / firmware : references to other objects via #define don't work
rbrt23 opened this issue · comments
I often ues a construction including #define to create a reference for multiple tables.
the purpose is to have a 'master' - object, holding these references,
and other 'slave' - objects that can resolve the references.
practical example:
the master- objects references sample waveform data, parameters and other stuff stored in different tables,
the slave- objects only needs to reference the master-object to have access to these tables
(instead of for example having to create a lot of attributes, but there are other benefits)
this is pretty critical for what I'm doing right now with axoloti,and doesn't work with AKSO.
example , created with the axoloti-patcher, attached.
define bug.zip
I read about a different bug with #include that might be related.
latest findings:
using #define as in the above example also has some weird side-effects with axoliti:
the 'master' object has to be BEFORE the 'slave' object in axoliti's 'execution-order-geography',
otherwise the patch won't compile because the 'slaves' don't know what's defined in the 'master'
at the moment the patch starts running.
this seems buggy and even if it's not, I absolutely want to avoid this kind of thing,
since I don't feel like loosing my mind contemplating about 'realtime patching vs coding'.
after all, I got to learn a bit more about pointers, and found a way to pass references from 'master' to 'slave' via
pointers...which is probably also way more efficient/elegant.
so,CLOSED.