[tables] Incorporate table data type information into table definition
Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
This commit is contained in:
@@ -17,8 +17,8 @@ struct command {
|
||||
int ( * exec ) ( int argc, char **argv );
|
||||
};
|
||||
|
||||
#define COMMANDS "commands"
|
||||
#define COMMANDS __table ( struct command, "commands" )
|
||||
|
||||
#define __command __table ( struct command, COMMANDS, 01 )
|
||||
#define __command __table_entry ( COMMANDS, 01 )
|
||||
|
||||
#endif /* _GPXE_COMMAND_H */
|
||||
|
||||
Reference in New Issue
Block a user