libcsptr
libcsptr copied to clipboard
Smart pointers for the (GNU) C programming language
I'd like to extend libcsptr (specifically, the `shared_ptr`/`unique_ptr` macros) to handle C99 structs with flexible array members. I. e. ```c struct Foo { size_t size; char data[]; } struct Foo...
https://snaipe.me/c/c-smart-pointers/ does not work for me 404
hello, I learn a lot from you project, When I write a multi-thread program and test. I use [tsan](https://clang.llvm.org/docs/ThreadSanitizer.html) to check data race, reports error: ``` 0x7b0c00000328 ================== WARNING: ThreadSanitizer:...
In the blog post you wrote: >lock-free implementations [of refcounting] rely on a compare-and-swap mechanism on the wrapped pointer – here, the pointer is not wrapped. This sucks, but if...
We use C in windows with MSVC compiler, but `__attribute__((cleanup))` does not work in MSVC. Is is possible to support MSVC?
What is a good use of smove() function?
``` [ 11% 6/9] /usr/bin/cc -I/disk-samsung/freebsd-ports/devel/libcsptr/work/libcsptr-2.0.4-24-gac73451/check/../include -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -Werror -g -std=gnu99 -Wno-unused-result -Wno-missing-field-initializers -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT check/CMakeFiles/check_unit.dir/test/misc.c.o...
I am a big fan of bringing unique_ptr to GNU C. But I think there is a difference beetween your repo and the cpp standard: reading this https://en.cppreference.com/w/cpp/memory/unique_ptr/operator%3D What happens...