/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
rnmodules/react-native-kb/cpp/msgpack-safe.hpp
19 строк
499 B
chrisnojima-zoom
Version 670 - clean2 (#29122)
08 июн 2026, 19:31
Не верифицирован
08 июн 2026, 19:31
1943197
Код
Авторство
О чём код?
// Safe msgpack include wrapper. // ObjC defines `nil` as a macro (#define nil nullptr), which conflicts with // msgpack's `typedef nil_t nil;`. This header saves/undefines nil before // including msgpack and restores it afterward, so it's safe to use from // both .cpp and .mm files. #pragma once #ifdef nil #pragma push_macro("nil") #undef nil #define KB_MSGPACK_NIL_PUSHED #endif #include <msgpack.hpp> #ifdef KB_MSGPACK_NIL_PUSHED #pragma pop_macro("nil") #undef KB_MSGPACK_NIL_PUSHED #endif