diff --git a/objc/encoding.h b/objc/encoding.h index 4c4ff53..ceccd59 100644 --- a/objc/encoding.h +++ b/objc/encoding.h @@ -5,6 +5,10 @@ #ifndef __LIBOBJC_ENCODING_H_INCLUDED__ #define __LIBOBJC_ENCODING_H_INCLUDED__ +#ifdef __cplusplus +extern "C" { +#endif + const char *objc_skip_type_qualifiers (const char *type); const char *objc_skip_typespec(const char *type); @@ -71,4 +75,8 @@ void objc_layout_structure_get_info (struct objc_struct_layout *layout, #define _F_ONEWAY 0x10 #define _F_GCINVISIBLE 0x20 +#ifdef __cplusplus +} +#endif + #endif // __LIBOBJC_ENCODING_H_INCLUDED__ diff --git a/objc/hooks.h b/objc/hooks.h index 42c67ed..8b7e045 100644 --- a/objc/hooks.h +++ b/objc/hooks.h @@ -2,6 +2,10 @@ #pragma clang system_header #endif +#ifdef __cplusplus +extern "C" { +#endif + /** * This file includes all of the hooks that can be used to alter the behaviour * of the runtime. @@ -102,4 +106,6 @@ typedef IMP (*objc_tracing_hook)(id, SEL, IMP, int, void*); */ int objc_registerTracingHook(SEL, objc_tracing_hook); - +#ifdef __cplusplus +} +#endif diff --git a/objc/objc-arc.h b/objc/objc-arc.h index 32ecb7a..14f7d00 100644 --- a/objc/objc-arc.h +++ b/objc/objc-arc.h @@ -4,6 +4,11 @@ #ifndef __OBJC_ARC_INCLUDED__ #define __OBJC_ARC_INCLUDED__ + +#ifdef __cplusplus +extern "C" { +#endif + /** * Autoreleases the argument. Equivalent to [obj autorelease]. */ @@ -138,5 +143,10 @@ unsigned long objc_arc_autorelease_count_np(void); * this thread. */ unsigned long objc_arc_autorelease_count_for_object_np(id); + +#ifdef __cplusplus +} +#endif + #endif // __OBJC_ARC_INCLUDED__