Libelektra: Base64: Plugin Does Not Replace `ELEKTRA_PLUGIN_NAME_C`

Created on 11 Oct 2017  路  2Comments  路  Source: ElektraInitiative/libelektra

Description

The Base64 plugin uses the following macro code in various places:

ELEKTRA_PLUGIN_FUNCTION (ELEKTRA_PLUGIN_NAME_C, something)

. Since both ELEKTRA_PLUGIN_FUNCTION and ELEKTRA_PLUGIN_NAME_C are macro definitions the text ELEKTRA_PLUGIN_NAME_C is not replaced with the name of the plugin. For example ELEKTRA_PLUGIN_FUNCTION (ELEKTRA_PLUGIN_NAME_C, base64Decode) produces the text

libelektra_ELEKTRA_PLUGIN_NAME_C_LTX_elektraPluginbase64Decode

instead of

libelektra_base64_LTX_elektraPluginbase64Decode

, assuming ELEKTRA_PLUGIN_NAME_C stores the value base64. Currently this is not a big problem, but it might be if another plugin also tries to use the same pattern.

System Information

  • Elektra Version: master
bug build low priority

All 2 comments

wouldn't double evalutation of the arguments of ELEKTRA_PLUGIN_FUNCTION (as done in STRINGIFY) solve the issue?

Directly doing #1042 might be the same effort, though (except of fixing all occurrences in compilation variant plugins.).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dominicjaeger picture dominicjaeger  路  3Comments

markus2330 picture markus2330  路  4Comments

mpranj picture mpranj  路  3Comments

dmoisej picture dmoisej  路  3Comments

mpranj picture mpranj  路  3Comments