Changeset acafba4 for libcfa/src/bits


Ignore:
Timestamp:
Sep 5, 2023, 1:20:16 PM (15 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
f54e6ec
Parents:
0ac8d07
Message:

Rename internal macro away from TYPE, which is a cs343 name collision.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/collections.hfa

    r0ac8d07 racafba4  
    7979//-----------------------------------------------------------------------------
    8080#ifdef __cforall
    81         forall(TYPE &)
    82         #define T TYPE
    83 #else
    84         #define T void
     81        forall(T &)
     82        #define __elem_t T
     83#else
     84        #define __elem_t void
    8585#endif
    8686struct __stack {
    87         T * top;
     87        __elem_t * top;
    8888};
    89 #undef T
     89#undef __elem_t
    9090
    9191#ifdef __cforall
     
    127127//-----------------------------------------------------------------------------
    128128#ifdef __cforall
    129         forall(TYPE &)
    130         #define T TYPE
    131 #else
    132         #define T void
     129        forall(T &)
     130        #define __elem_t T
     131#else
     132        #define __elem_t void
    133133#endif
    134134struct __queue {
    135         T * head;
    136         T ** tail;
     135        __elem_t * head;
     136        __elem_t ** tail;
    137137};
    138 #undef T
     138#undef __elem_t
    139139
    140140#ifdef __cforall
     
    217217//-----------------------------------------------------------------------------
    218218#ifdef __cforall
    219         forall(TYPE &)
    220         #define T TYPE
    221         #define __getter_t * [T * & next, T * & prev] ( T & )
     219        forall(T &)
     220        #define __elem_t T
     221        #define __getter_t * [__elem_t * & next, __elem_t * & prev] ( __elem_t & )
    222222#else
    223223        typedef void (*__generit_c_getter_t)();
    224         #define T void
     224        #define __elem_t void
    225225        #define __getter_t __generit_c_getter_t
    226226#endif
    227227struct __dllist {
    228         T * head;
     228        __elem_t * head;
    229229        __getter_t __get;
    230230};
    231 #undef T
     231#undef __elem_t
    232232#undef __getter_t
    233233
Note: See TracChangeset for help on using the changeset viewer.