View Issue Details

IDProjectCategoryView StatusLast Update
0006743GNUnetfile-sharing servicepublic2021-06-10 23:01
Reportercy1 Assigned Toschanzen  
PrioritylowSeverityfeatureReproducibilityhave not tried
Status feedbackResolutionopen 
PlatformGentooOSLinuxOS Version5.9.1
Product VersionGit master 
Summary0006743: anonymous structs in GNUNET_FS_ProgressInfo impede modularity
DescriptionI'd like to write myself a dispatcher that delegates to various dispatchers in different modules for each operation, like:

static void* progress_cb (void *cls,
                          const struct GNUNET_FS_ProgressInfo *info) {
    switch(info->status) {
              return search_progress(info->;
              return download_progress(info->;

But since info-> is an anonymous struct, there is no way to write the function signature for search_progress, or download_progress, outside of using typeof like:

const struct GNUNET_FS_ProgressInfo dummyvariable __attribute__((__unused__));
void* search_progress(const typeof( info);

I would appreciate it if each of the members of that union could be given names, however ludicrously verbose, so that I could write:

void* search_progress(GNUNET_FS_ProgressInfoSearch info);

Once I know it's a search event, there's no reason to access or value.publish, so it just prevents me from removing verbosity, and introduces potential for interface boundary failures such as accidentally using code which accesses in a search dispatcher. Anyway it's just a little nitpick I wanted to get reported so that someone with commit access could patch it whenever they get around to it.
TagsNo tags attached.



2021-02-06 18:11



2021-02-21 10:55

manager   ~0017558

Can you check 8095b1a1b..a3971a93c if that is what you need?

Issue History

Date Modified Username Field Change
2021-02-06 18:11 cy1 New Issue
2021-02-06 18:11 cy1 File Added: named_progress_values.bundle
2021-02-21 10:55 schanzen Assigned To => schanzen
2021-02-21 10:55 schanzen Status new => feedback
2021-02-21 10:55 schanzen Note Added: 0017558
2021-02-21 10:55 schanzen Target Version => 0.14.1
2021-04-05 11:25 schanzen Target Version 0.14.1 => 0.14.2
2021-06-10 19:37 schanzen Target Version 0.14.2 => 0.15.0
2021-06-10 23:01 schanzen Target Version 0.15.0 =>