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

Add swss::Table to c api #964

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

erer1243
Copy link
Contributor

@erer1243 erer1243 commented Jan 8, 2025

No description provided.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

It is only used for key/field names, so this keeps it consistent with other class apis
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@r12f r12f left a comment

Choose a reason for hiding this comment

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

looks straight forward change to me.

@r12f r12f requested review from Pterosaur and liuh-80 January 8, 2025 23:17
@@ -31,3 +31,7 @@ void SWSSFieldValueArray_free(SWSSFieldValueArray arr) {
void SWSSKeyOpFieldValuesArray_free(SWSSKeyOpFieldValuesArray kfvs) {
SWSSTry(delete[] kfvs.data);
}

void SWSSStringArray_free(SWSSStringArray arr) {
SWSSTry(delete[] arr.data);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a "const char **data;", do you need delete all string pointer in this array first?

Copy link
Contributor Author

@erer1243 erer1243 Jan 9, 2025

Choose a reason for hiding this comment

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

The c api free functions don't do that because the data is sometimes user-owned. The behavior is expressed in the header file comments.

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.

4 participants