Dual-Life / Devel-PPPort

Perl/Pollution/Portability
9 stars 28 forks source link

Enhancement: add the concept of __REDEFINE__ #226

Closed atoomic closed 2 years ago

atoomic commented 2 years ago

The idea here is to introduce a new macro __REDEFINE__ which would do the #undef and redefinition of the macro this could then be used in multiple locations to simplify code like this

#if { VERSION < 5.27.7 }
#undef dNOOP
 __UNDEFINED__ dNOOP struct Perl___notused_struct
#endif

to

#if { VERSION < 5.27.7 }
__REDEFINE__ dNOOP struct Perl___notused_struct
#endif
khwilliamson commented 2 years ago

patches welcome