-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conduit/c: use a type safe alias for
conduit_{datatype,node}
(#795)
Using `typedef void` meant that the APIs were all taking `void*` which in turn means that any pointer is valid to pass to these types. Instead, use a unique opaque type so that callers must either do the unsafe casting themselves or use the `cpp_to_c` APIs to do the casting the intended way. The actual definition of the structs themselves are empty; they are just used it as a way to smuggle the C++ pointer around under an opaque name. Fixes: #782
- Loading branch information
Showing
4 changed files
with
20 additions
and
14 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