Skip to content

Commit df14d81

Browse files
committed
remove unused LISTcreate_with() macro
also removes even older function in an `#if 0` block
1 parent c08dcdd commit df14d81

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

include/express/linklist.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ struct Linked_List_ {
7373
extern SC_EXPRESS_EXPORT Error ERROR_empty_list;
7474
extern SC_EXPRESS_EXPORT struct freelist_head LINK_fl;
7575
extern SC_EXPRESS_EXPORT struct freelist_head LIST_fl;
76-
extern SC_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
7776

7877
/******************************/
7978
/* macro function definitions */
@@ -84,11 +83,6 @@ extern SC_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - ug
8483
#define LIST_new() (struct Linked_List_ *)MEM_new(&LIST_fl)
8584
#define LIST_destroy(x) MEM_destroy(&LIST_fl,(Freelist *)(Generic)x)
8685

87-
/** following could be optimized */
88-
#define LISTcreate_with(x) (LINK__l = LISTcreate()),\
89-
LISTadd(LINK__l,x),\
90-
LINK_l)
91-
9286
/** accessing links */
9387
#define LINKdata(link) (link)->data
9488
#define LINKnext(link) (link)->next

src/express/linklist.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
Error ERROR_empty_list = ERROR_none;
2828
struct freelist_head LINK_fl;
2929
struct freelist_head LIST_fl;
30-
Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
3130

3231
void
3332
LISTinitialize( void ) {
@@ -51,16 +50,6 @@ LISTcreate() {
5150
return( list );
5251
}
5352

54-
#if 0
55-
/* could optimize this function! */
56-
Linked_List
57-
LISTcreate_with( Generic g ) {
58-
Linked_List dst = LISTcreate();
59-
LISTadd( dst, g );
60-
return( dst );
61-
}
62-
#endif
63-
6453
Linked_List
6554
LISTcopy( Linked_List src ) {
6655
Linked_List dst = LISTcreate();

0 commit comments

Comments
 (0)