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

c-api: README.md #974

Merged
merged 4 commits into from
Feb 20, 2025
Merged

c-api: README.md #974

merged 4 commits into from
Feb 20, 2025

Conversation

erer1243
Copy link
Contributor

Added a README for the C API at Riff's request, explaining its purpose, exception handling, and memory management practices.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@erer1243 erer1243 requested a review from r12f February 18, 2025 19:47
@@ -0,0 +1,72 @@
# C API

This directory contains the swss-common C API. The C API is an incomplete,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe better to change incomplete to in progress :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, although my understanding is the intention is never for it to be complete.

This directory contains the swss-common C API. The C API is an incomplete,
hand-written C wrapper around functions in swss-common. Functionality is
added as needed. It is designed to be understandable without incurring major
performance penalties. It was primarily written to support Rust code using
Copy link
Contributor

Choose a reason for hiding this comment

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

It was initially (not primarily)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These mean the same thing in context but I will make this change

returned value in this case.

Example:
```c
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: line break before code block

Copy link
Contributor

Choose a reason for hiding this comment

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

usually markdown-lint vs extension can help identify all the small format issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can change this but I'm not sure why. It's not required by markdown.

@@ -0,0 +1,72 @@
# C API
Copy link
Contributor

Choose a reason for hiding this comment

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

swss-common C API

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@erer1243 erer1243 merged commit 599b0a6 into sonic-net:master Feb 20, 2025
15 checks passed
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.

3 participants