-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sonic-net:master' into SAI_DBG_GEN_DUMP_support
- Loading branch information
Showing
32 changed files
with
660 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
#include "util.h" | ||
|
||
using namespace swss; | ||
|
||
bool swss::cApiTestingDisableAbort = false; | ||
|
||
SWSSString SWSSString_new(const char *data, uint64_t length) { | ||
SWSSTry(return makeString(std::string(data, numeric_cast<std::string::size_type>(length)))); | ||
} | ||
|
||
SWSSString SWSSString_new_c_str(const char *c_str) { | ||
SWSSTry(return makeString(std::string(c_str))); | ||
} | ||
|
||
const char *SWSSStrRef_c_str(SWSSStrRef s) { | ||
SWSSTry(return ((std::string *)s)->c_str()); | ||
} | ||
|
||
uint64_t SWSSStrRef_length(SWSSStrRef s) { | ||
SWSSTry(return ((std::string *)s)->length()); | ||
} | ||
|
||
void SWSSString_free(SWSSString s) { | ||
SWSSTry(delete (std::string *)s); | ||
} | ||
|
||
void SWSSFieldValueArray_free(SWSSFieldValueArray arr) { | ||
SWSSTry(delete[] arr.data); | ||
} | ||
|
||
void SWSSKeyOpFieldValuesArray_free(SWSSKeyOpFieldValuesArray kfvs) { | ||
SWSSTry(delete[] kfvs.data); | ||
} |
Oops, something went wrong.