Commit 087329a5 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

param: Introduce the notion of simple parameters

The simple parameters are those that successfully migrated to params.h
because they were trivial to declare in a way that could be used in all
the places where they are needed.

The PARAM() macro is now changed so that the outstanding `type` argument
is separated from arguments matching struct parspec fields. To minimize
disruption the new PARAM_SIMPLE() macro takes parameters in the order of
the previous PARAM() definition.

Refs #3250
parent e954c73d
......@@ -82,7 +82,7 @@ struct params {
#define ptyp_uint unsigned
#define ptyp_vsl_buffer unsigned
#define ptyp_vsl_reclen unsigned
#define PARAM(nm, ty, ...) \
#define PARAM(ty, nm, ...) \
ptyp_##ty nm;
#include <tbl/params.h>
#undef ptyp_bool
......
......@@ -39,7 +39,7 @@
struct parspec mgt_parspec[] = {
#define PARAM(nm, ty, ...) { #nm, tweak_##ty, &mgt_param.nm, __VA_ARGS__ },
#define PARAM(ty, nm, ...) { #nm, __VA_ARGS__ },
#include "tbl/params.h"
{ "cc_command", tweak_string, &mgt_cc_cmd,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment