C-Macro-Collections icon indicating copy to clipboard operation
C-Macro-Collections copied to clipboard

Remove ext/ folder, use macros instead

Open duarm opened this issue 1 year ago • 0 comments

Feature Request Template

What is the nature of this request?

  • Change in standards

Is your feature request related to a problem? Please describe.

I always use CMC_EXT_INIT. So I generate a collection like this

#define V struct timeline
#define PFX timeline_list
#define SNAME timeline_list
#define CMC_EXT_INIT
#include <lib/ds/list/code.h>
#include <lib/ds/list/ext/code.h>
#include <lib/ds/cor/undef.h>

which is very verbose, I also need a copy of this on the header in order to share declarations.

Describe the solution you'd like

Ditch the ext/ folder, e.g· merge everything inside list/ext/code.h into list/code.h, list/header.h etc... and activate the feature with a macro. Like this

#define V struct timeline
#define PFX timeline_list
#define SNAME timeline_list
#define CMC_EXT_INIT
#include <lib/ds/list/code.h>
#include <lib/ds/cor/undef.h>

What is worth being an extension or included by default is another discussion, but for this particular case of CMC_EXT_INIT #37

duarm avatar Dec 07 '23 19:12 duarm