From de6d5359ed730ab5e6f03b89008ecea3a39e66be Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 6 Jun 2020 22:51:45 +0300 Subject: [PATCH] Use #pragma managed(push, off) around unmanaged includes in managed code. GitOrigin-RevId: 1b8944dfa23e38f675aec0f25d78644baa27ab84 --- td/telegram/ClientDotNet.cpp | 4 ++++ td/telegram/LogDotNet.cpp | 4 ++++ td/tl/tl_dotnet_object.h | 2 ++ tdutils/td/utils/port/CxCli.h | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/td/telegram/ClientDotNet.cpp b/td/telegram/ClientDotNet.cpp index 9719b429a..080f72464 100644 --- a/td/telegram/ClientDotNet.cpp +++ b/td/telegram/ClientDotNet.cpp @@ -4,13 +4,17 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // +#pragma managed(push, off) #include "td/telegram/Client.h" +#pragma managed(pop) #include "td/telegram/TdDotNetApi.h" #include "td/utils/port/CxCli.h" +#pragma managed(push, off) #include +#pragma managed(pop) namespace Telegram { namespace Td { diff --git a/td/telegram/LogDotNet.cpp b/td/telegram/LogDotNet.cpp index 7e2e7db26..de5d44616 100644 --- a/td/telegram/LogDotNet.cpp +++ b/td/telegram/LogDotNet.cpp @@ -4,11 +4,15 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // +#pragma managed(push, off) #include "td/telegram/Log.h" +#pragma managed(pop) #include "td/utils/port/CxCli.h" +#pragma managed(push, off) #include +#pragma managed(pop) namespace Telegram { namespace Td { diff --git a/td/tl/tl_dotnet_object.h b/td/tl/tl_dotnet_object.h index a1afce343..75843b1b2 100644 --- a/td/tl/tl_dotnet_object.h +++ b/td/tl/tl_dotnet_object.h @@ -8,8 +8,10 @@ #include "td/utils/port/CxCli.h" +#pragma managed(push, off) #include "td/telegram/td_api.h" #include "td/telegram/td_api.hpp" +#pragma managed(pop) namespace Telegram { namespace Td { diff --git a/tdutils/td/utils/port/CxCli.h b/tdutils/td/utils/port/CxCli.h index 0eaa7d60e..8e9dcd241 100644 --- a/tdutils/td/utils/port/CxCli.h +++ b/tdutils/td/utils/port/CxCli.h @@ -6,19 +6,25 @@ // #pragma once +#pragma managed(push, off) #include "td/utils/port/config.h" +#pragma managed(pop) #include "td/utils/common.h" #if TD_WINRT +#pragma managed(push, off) #include "td/utils/port/wstring_convert.h" +#pragma managed(pop) #include "collection.h" +#pragma managed(push, off) #include #include #include +#pragma managed(pop) #undef small