anchao commented on PR #12601:
URL: https://github.com/apache/nuttx/pull/12601#issuecomment-2240807358
> How about using macros to isolate different implementations? list.h:
>
> ```
> #ifdef INLINE_QUEUE
> #define STATIC_INLINE static line
> #else
> #define STATIC_INLINE
> #endif
>
> STATIC_INLINE void add_queue(void);
> #ifdef INLINE_QUEUE
> STATIC_INLINE void add_queue(void)
> {
> #implement
> }
> #endif
> ```
>
> list.c:
>
> ```
> #undef INLINE_QUEUE
> #include <list.h>
> ```
>
> Make.defs
>
> ```
> ifneq ($(INLINE_QUEUE),y)
> CSRCS += list.c
> endif
> ```
@hujun260 How about this approach? You could still merge all list
implementations into the header file
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]