dstep
dstep copied to clipboard
Problem with static inline?
It appears that the following in a C header file:
static inline void dvb_file_free(struct dvb_file *dvb_file)
{
struct dvb_entry *entry = dvb_file->first_entry, *next;
while (entry) {
next = entry->next;
if (entry->channel)
free(entry->channel);
if (entry->vchannel)
free(entry->vchannel);
if (entry->location)
free(entry->location);
if (entry->video_pid)
free(entry->video_pid);
if (entry->audio_pid)
free(entry->audio_pid);
if (entry->other_el_pid)
free(entry->other_el_pid);
if (entry->lnb)
free(entry->lnb);
free(entry);
entry = next;
}
free(dvb_file);
}
results in the D module with:
void dvb_file_free (dvb_file* dvb_file);
which sadly has to be considered a bug.
dstep doesn't translate function bodies at all.
Yeah, that's a completely new topic.
OK, I cut and paste into the function manually.
I'm putting this as an enhancement request.
@jacob-carlborg -- I don't necessarily need the fn body transplanted, even a diagnostic warning that this has happened would be excellent.
I don't necessarily need the fn body transplanted, even a diagnostic warning that this has happened would be excellent.
That should be doable.