Affichage des articles dont le libellé est How does this macro work?. Afficher tous les articles
Affichage des articles dont le libellé est How does this macro work?. Afficher tous les articles

lundi 13 février 2017

How does this macro work?

Vote count: 0

In this Python implementation for microcontrollers, they use C-macro like follows:

MP_ROM_QSTR(MP_QSTR_mem16)

with:

#define MP_ROM_QSTR(q) MP_OBJ_NEW_QSTR(q)

and:

#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 2) | 2))

My issue is: MP_QSTR_mem16 seems to be never defined!

So, how does this work?

asked 25 secs ago

Let's block ads! (Why?)



How does this macro work?