-
Notifications
You must be signed in to change notification settings - Fork 38
struct member expansion #137
Copy link
Copy link
Closed
Description
I have a struct:
// FILE object wrapper for vfs access
typedef struct {
struct DB_vfs_s *vfs;
} DB_FILE;dstep now looks up struct DB_vfs_s and expands this inside the parent struct while eating all comments before the definition of struct DB_vfs_s. Leading to something like:
// FILE object wrapper for vfs access
struct DB_FILE
{
// md5 calc control structure (see md5/md5.h)
// bps must be 32 if this is true
// lots more comments
struct DB_vfs_s
{
DB_plugin_t plugin;
// capabilities
const(char*)* function () get_schemes; // NULL-terminated list of supported schemes, e.g. {"http://", "ftp://", NULL}; can be NULL
and so on...
This is a workaround (C code):
typedef struct DB_vfs_s DB_vfs_t;
// FILE object wrapper for vfs access
typedef struct DB_FILE_s {
DB_vfs_t *vfs;
} DB_FILE;but seems like dstep should cope with using struct notation without expanding it inline.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels