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

update c api to properly use the struct keyword #192

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

ryanolson
Copy link
Contributor

Rust will automatically create bindings when the C API is properly structured. Unfortunately, we were missing the struct keyword in a number of places. If you are using this header in a C++ setting, you can get away with it, but the way Rust is using LLMV to create the bindings, the C API must properly conform to the standards.

In C, you must explicitly use the struct keyword to declare a structure. In C++, you do not need to use the struct keyword after the type has been defined.

You have the option of declaring variables when the structure type is defined by placing one or more comma-separated variable names between the closing brace and the semicolon.

Copy link
Contributor Author

@ryanolson ryanolson left a comment

Choose a reason for hiding this comment

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

Error_Code doesn't need to have a struct on it.

@dyastremsky
Copy link
Contributor

Looks good to me. Running through CI, then can merge if passes.

@dyastremsky dyastremsky merged commit 6a77ef5 into triton-inference-server:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants