/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/c/cpp11_shared_ptr_const_runme.c
16 строк
479 B
William S Fulton
shared_ptr tests cleanup
26 мар 2026, 11:37
26 мар 2026, 11:37
4433e44
Код
Авторство
О чём код?
#include "cpp11_shared_ptr_const_wrap.h" #include <assert.h> int main(int argc, const char *argv[]) { cpp11_shared_ptr_const_Foo* f; cpp11_shared_ptr_const_Foo* f2; f = cpp11_shared_ptr_const_Foo_new(17); assert(cpp11_shared_ptr_const_Foo_get_m(f) == 17); f2 = cpp11_shared_ptr_const_single_foo(f); assert(cpp11_shared_ptr_const_Foo_get_m(f2) == 17); cpp11_shared_ptr_const_Foo_delete(f2); cpp11_shared_ptr_const_Foo_delete(f); return 0; }