You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Proposal to Enhance C Preprocessor Redefinition Strings Generation
Objective:
This proposal suggests an extension to enhance the functionality of generating C Preprocessor redefinition strings without quotation marks in order to provide more flexibility and convenience in defining C macros.
Rationale:
In certain scenarios, it becomes necessary for a module to redefine a C Preprocessor Macro to another symbol. However, the current implementation in kconfiglib utilizes the string type, which always generates a string with quotation marks. This limitation restricts the flexibility and usability of the tool.
Current Status:
The current version of kconfiglib only supports generating C Preprocessor redefinition strings with quotation marks. For instance:
Modify the kconfig for supporting another type (example: macro type):
config CONFIG_FUNCTION_CALLBACK_NAME
macro "Set the name of the callback function"
default "MyFunctionCallback"
help
This will generate the preprocessor macro for the function callback name.
The proposed extension aims to introduce the capability to generate C Preprocessor redefinition strings without quotation marks, as demonstrated in the following example:
This enhancement will enable developers to define macros more conveniently and provide greater flexibility in their code implementations. For example:
void CONFIG_FUNCTION_CALLBACK_NAME(void)
{
....
}
Benefits:
Improved Capability: The proposed extension enhances the tool's functionality by enabling the generation of C definitions without quotation marks, allowing for more versatile macro definitions.
The text was updated successfully, but these errors were encountered:
tito97sp
changed the title
Extension: Strings without quotation marks
Extension Suggestion: Strings without quotation marks (Macro-like)
Jun 9, 2023
Title: Proposal to Enhance C Preprocessor Redefinition Strings Generation
Objective:
This proposal suggests an extension to enhance the functionality of generating C Preprocessor redefinition strings without quotation marks in order to provide more flexibility and convenience in defining C macros.
Rationale:
In certain scenarios, it becomes necessary for a module to redefine a C Preprocessor Macro to another symbol. However, the current implementation in kconfiglib utilizes the string type, which always generates a string with quotation marks. This limitation restricts the flexibility and usability of the tool.
Current Status:
The current version of kconfiglib only supports generating C Preprocessor redefinition strings with quotation marks. For instance:
#define CONFIG_FUNCTION_CALLBACK_NAME "MyFunctionCallback"
Proposed Solution:
Modify the kconfig for supporting another type (example: macro type):
The proposed extension aims to introduce the capability to generate C Preprocessor redefinition strings without quotation marks, as demonstrated in the following example:
#define CONFIG_FUNCTION_CALLBACK_NAME MyFunctionCallback
This enhancement will enable developers to define macros more conveniently and provide greater flexibility in their code implementations. For example:
Benefits:
The text was updated successfully, but these errors were encountered: