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

96 export enum constant which are not used by a function call #104

Conversation

ronan-ditto
Copy link
Contributor

ffi_export can now be applied to enums.

Furthermore Readme.md has been updated accordingly.

Copy link
Collaborator

@danielhenrymantilla danielhenrymantilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

README.md Outdated
@@ -78,6 +78,15 @@ fn mid_point(a: &Point, b: &Point) -> Point {
}
}

/* Export a Rust enum to C */
#[ffi_export]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[ffi_export]
#[ffi_export] // directly exporting a type is only needed
// if no exported function mentions is

@danielhenrymantilla
Copy link
Collaborator

Fixes #96 and #102

@ronan-ditto ronan-ditto merged commit d079d25 into master May 6, 2022
@ronan-ditto ronan-ditto deleted the 96-export-enum-constant-which-are-not-used-by-a-function-call branch May 6, 2022 06:51
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.

Export Enum & Constant which are not used by a function call
2 participants