-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust support - Native bstrings (#160)
Backport changes from pelikan to twitter/ccommon#186 Implement proper allocation/free for BString objects * All allocation of BStrings should happen from libc malloc() that way we don't mistakenly free something allocated from rust's allocator. * Drop should call libc's free() with the pointer, doing the correct thing. * This philosophy allows us to pass bstring pointers back and forth and not have to track which heap they're allocated on * Provide an implementation of a zero-cost reference object, much like String -> &str, we have BString -> &BStr.
- Loading branch information
Showing
17 changed files
with
1,159 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,5 @@ tags | |
# cscope | ||
cscope.* | ||
lcov | ||
|
||
CMAKE_BINARY_DIR |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
file(WRITE CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}\n") | ||
|
||
if(HAVE_RUST) | ||
add_subdirectory(ccommon_rs) | ||
endif() |
Oops, something went wrong.