[c-ffi] Add a new error-condition result type. #803

Merged
merged 3 commits into from Jul 22, 2014

Conversation

Projects
None yet
2 participants
Contributor

fracek commented Jul 20, 2014

This helps writing better wrappers for C libraries where the
return value is used to signal if the function did error.

@waywardmonkeys waywardmonkeys commented on an outdated diff Jul 20, 2014

sources/dfmc/c-ffi/c-function-macro.dylan
@@ -158,10 +159,15 @@ define method parse-early-options
collecting (return-values, arg-fragments, parameters, parameter-names)
let result-fragment = #f;
let vname = result-spec.name;
+ // 1
@waywardmonkeys

waywardmonkeys Jul 20, 2014

Owner

This can be removed.

Owner

waywardmonkeys commented Jul 20, 2014

I think this would be a bit more clear if this was error-result instead of error-condition so that it matches with result, especially for the warning about multiple results (which I was very glad to see you'd included).

Owner

waywardmonkeys commented Jul 20, 2014

We'll also hold off on merging this until the documentation and release notes are updated!

fracek added some commits Jul 19, 2014

@fracek fracek [c-ffi] Add a new error-condition result type.
This helps writing better wrappers for C libraries where the
return value is used to signal if the function did error.
b7fd60a
@fracek fracek [doc] Add documentation about error-result. a17dad9
@fracek fracek [doc] Update release notes with latest changes to C-ffi. 9a76cd1

@waywardmonkeys waywardmonkeys added a commit that referenced this pull request Jul 22, 2014

@waywardmonkeys waywardmonkeys Merge pull request #803 from fracek/c-ffi-error-condition
[c-ffi] Add a new error-condition result type.
56038ee

@waywardmonkeys waywardmonkeys merged commit 56038ee into dylan-lang:master Jul 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment