Created by: nilayvaish
Curently the functions for setting and getting options have code for each option generated using preprocessor macros. This results in excessive amount of code and increases the size of the library. With this commit, we alter the functions for setting and getting options.
-
We define a new data type struct option_t. This struct contains all the information that we need to process an option. Using macros, we have created an array that contains the required information for each option.
-
We also define certain helper types and functions.
-
The code for getting and setting options now contains a for loop in which we go over all the options one by one. This reduces the amount of code by a significant amount.
This reduces the size of the static library by about 340 KB.
Issue: #2717