Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lwt return void #460

Merged
merged 2 commits into from
Oct 21, 2016
Merged

Lwt return void #460

merged 2 commits into from
Oct 21, 2016

Conversation

dsheets
Copy link
Contributor

@dsheets dsheets commented Oct 21, 2016

This tests that generating lwt job bindings to void-returning functions is broken in master and then fixes that defect during stub generation by using int for the type of the lwt job result field (never initialized or used) and then returning Val_unit as the result.

This isn't the prettiest solution but it does unblock me. Please let me know if you'd like to see a different approach used, I'd (probably) be happy to accommodate.

This retains the result field in the job struct and sets its type to int.
Val_unit is now returned as the result rather than using the uninitialized
result field.
@yallop
Copy link
Owner

yallop commented Oct 21, 2016

Perhaps we can eliminate the result field altogether in the future when the return type is void. But this patch appears correct and fixes the problem, so I'll merge.

@yallop yallop merged commit 9e531a3 into yallop:master Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants