From cf045116329d87c8ca0a5451e48a9f00d2800aa6 Mon Sep 17 00:00:00 2001 From: fantasy Date: Wed, 13 Mar 2019 12:56:50 +0800 Subject: [PATCH] fix(coobjc.h): fix c++ compile problem fix compile error in cpp or mm code files fix #46 --- coobjc/coobjc.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coobjc/coobjc.h b/coobjc/coobjc.h index 6e3a668..61b5554 100644 --- a/coobjc/coobjc.h +++ b/coobjc/coobjc.h @@ -26,6 +26,10 @@ #import #import +#ifdef __cplusplus +extern "C" { +#endif + #pragma mark - Basic operator /** @@ -226,3 +230,7 @@ NS_INLINE COActor * _Nonnull co_actor_onqueue(dispatch_queue_t _Nullable queue, return (COActor*)[co resume]; } + +#ifdef __cplusplus +} +#endif