It's better to use some local/stable identifiier to avoid relying on the data not being freed in between creating the search menu and the exec function. This is similar to c473b2ce8b.
c473b2ce8b
RNA_prototypes.h