View Issue Details

IDProjectCategoryView StatusLast Update
0003570GNUnetutil librarypublic2018-06-06 22:25
ReporterChristian Grothoff Assigned ToChristian Grothoff Due Date
PriorityhighSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003570: we need to finally kill SLIST
DescriptionDespite being deprecated for a while, people keep using it in new code (see RPS). It needs to die. Badly.
TagsNo tags attached.

Activities

cy1

2014-12-10 22:30

reporter   ~0008662

To be fair, DLL is a very confusing term. It might be better to call it a DList. I assume by "kill SList" you mean not using a list object at all, and just having each struct that happen to be used in the DLL macros have their own 'prev' and 'next' member?

So instead of:
struct thing {
  int data;
};

SList* things;
...;
slist_do_stuff(things->next);


...you would do this:

struct thing {
  int data;
  struct thing* next;
};

struct thing guy;
...
DLL_macro(guy);

Christian Grothoff

2014-12-10 23:12

manager   ~0008663

Yes, we have the GNUNET_CONTAINER_DLL_-API, and that should be used instead of the GNUNET_CONTAINER_SLIST-API.

cy1

2014-12-10 23:32

reporter   ~0008664

I only use an SList style when I'm making temporary lists of data structures, in unusual orders than they usually are, or subsets. It might be an idea to move the DLL API into its own header file just to make it easier to find.

Christian Grothoff

2014-12-10 23:39

manager   ~0008665

Even more headers, we won't be able to find header file anymore ;-).
Util was already split up into several dozen headers, please no more ;-).

As for truly temporary data structures, a better answer might be to put an array on the stack, otherwise you just put unnecessary pressure on the memory allocator ;-).

Christian Grothoff

2014-12-14 22:15

manager   ~0008687

SVN 34562 finally kills it. Thanks to everyone helping!

Issue History

Date ModifiedUsernameFieldChange
2014-12-08 14:51Christian GrothoffNew Issue
2014-12-10 22:30cy1Note Added: 0008662
2014-12-10 23:12Christian GrothoffNote Added: 0008663
2014-12-10 23:32cy1Note Added: 0008664
2014-12-10 23:39Christian GrothoffNote Added: 0008665
2014-12-14 11:59Christian GrothoffStatusnew => confirmed
2014-12-14 11:59Christian GrothoffTarget Version => 0.11.0pre66
2014-12-14 22:15Christian GrothoffNote Added: 0008687
2014-12-14 22:15Christian GrothoffStatusconfirmed => resolved
2014-12-14 22:15Christian GrothoffFixed in Version => 0.11.0pre66
2014-12-14 22:15Christian GrothoffResolutionopen => fixed
2014-12-14 22:15Christian GrothoffAssigned To => Christian Grothoff
2018-06-06 22:25Christian GrothoffStatusresolved => closed