From patchwork Wed Dec 22 00:06:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 76348 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7E2E2B7082 for ; Wed, 22 Dec 2010 11:06:21 +1100 (EST) Received: (qmail 20668 invoked by alias); 22 Dec 2010 00:06:18 -0000 Received: (qmail 20659 invoked by uid 22791); 22 Dec 2010 00:06:15 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, TW_BJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Dec 2010 00:06:08 +0000 Received: from eggs.gnu.org ([140.186.70.92]:42561) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PVCDT-0001Hl-7y for gcc-patches@gnu.org; Tue, 21 Dec 2010 19:06:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVCDU-0002Ks-1t for gcc-patches@gnu.org; Tue, 21 Dec 2010 19:06:05 -0500 Received: from smtp131.iad.emailsrvr.com ([207.97.245.131]:36082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVCDT-0002Ko-U6 for gcc-patches@gnu.org; Tue, 21 Dec 2010 19:06:04 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp33.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 4ACAD3046C for ; Tue, 21 Dec 2010 19:06:03 -0500 (EST) Received: from dynamic2.wm-web.iad.mlsrvr.com (dynamic2.wm-web.iad1a.rsapps.net [192.168.2.151]) by smtp33.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 39FF030372 for ; Tue, 21 Dec 2010 19:06:03 -0500 (EST) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic2.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 2C0C328E8066 for ; Tue, 21 Dec 2010 19:06:03 -0500 (EST) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Wed, 22 Dec 2010 01:06:03 +0100 (CET) Date: Wed, 22 Dec 2010 01:06:03 +0100 (CET) Subject: libobjc: another small, trivial private header tidyup From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1292976363.17883928@192.168.2.228> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The new objc-private headers (introduced in GCC 4.6) still had guards for compiling with C++, like the public headers; but unlike the public headers, they'll never be compiled with a C++ compiler as they are private to libobjc and libobjc is written in C/ObjC. This patch removes them. Committed to trunk. Thanks Index: objc-private/selector.h =================================================================== --- objc-private/selector.h (revision 168140) +++ objc-private/selector.h (working copy) @@ -25,10 +25,6 @@ #ifndef __objc_private_selector_INCLUDE_GNU #define __objc_private_selector_INCLUDE_GNU -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - /* Private runtime functions that may go away or be rewritten or replaced. */ @@ -58,8 +54,4 @@ SEL sel_get_any_uid (const char *name); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __objc_private_selector_INCLUDE_GNU */ Index: objc-private/sarray.h =================================================================== --- objc-private/sarray.h (revision 168140) +++ objc-private/sarray.h (working copy) @@ -39,10 +39,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - extern int nbuckets; /* for stats */ extern int nindices; extern int narrays; @@ -232,8 +228,4 @@ return (array->empty_bucket->elems[0]); } -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* __sarray_INCLUDE_GNU */ Index: objc-private/runtime.h =================================================================== --- objc-private/runtime.h (revision 168140) +++ objc-private/runtime.h (working copy) @@ -48,10 +48,6 @@ #include /* so noone else will get system versions */ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - extern BOOL __objc_add_class_to_hash (Class); /* (objc-class.c) */ extern void __objc_init_class_tables (void); /* (objc-class.c) */ extern void __objc_init_dispatch_tables (void); /* (objc-dispatch.c) */ @@ -65,8 +61,8 @@ extern void class_add_method_list (Class, struct objc_method_list *); /* Registering instance methods as class methods for root classes */ -extern void __objc_register_instance_methods_to_class(Class); -extern struct objc_method * search_for_method_in_list(struct objc_method_list * list, SEL op); +extern void __objc_register_instance_methods_to_class (Class); +extern struct objc_method * search_for_method_in_list (struct objc_method_list * list, SEL op); extern void __objc_update_classes_with_methods (struct objc_method *method_a, struct objc_method *method_b); /* class.c */ @@ -80,8 +76,4 @@ BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */ extern void __objc_generate_gc_type_description (Class); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __objc_private_runtime_INCLUDE_GNU */ Index: objc-private/hash.h =================================================================== --- objc-private/hash.h (revision 168140) +++ objc-private/hash.h (working copy) @@ -30,10 +30,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - /* * This data structure is used to hold items * stored in a hash table. Each node holds @@ -202,10 +198,4 @@ return ! strcmp ((const char *) k1, (const char *) k2); } - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - #endif /* not __hash_INCLUDE_GNU */ Index: objc-private/protocols.h =================================================================== --- objc-private/protocols.h (revision 168140) +++ objc-private/protocols.h (working copy) @@ -25,10 +25,6 @@ #ifndef __objc_private_protocols_INCLUDE_GNU #define __objc_private_protocols_INCLUDE_GNU -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - /* This function needs to be called at startup by init.c. */ void __objc_protocols_init (void); @@ -39,8 +35,4 @@ void __objc_protocols_add_protocol (const char *name, Protocol *object); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __objc_private_protocols_INCLUDE_GNU */ Index: objc-private/accessors.h =================================================================== --- objc-private/accessors.h (revision 168140) +++ objc-private/accessors.h (working copy) @@ -25,16 +25,8 @@ #ifndef __objc_private_accessors_INCLUDE_GNU #define __objc_private_accessors_INCLUDE_GNU -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - /* This function needs to be called at startup by init.c. */ void __objc_accessors_init (void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __objc_private_accessors_INCLUDE_GNU */ Index: objc-private/objc-list.h =================================================================== --- objc-private/objc-list.h (revision 168140) +++ objc-private/objc-list.h (working copy) @@ -27,10 +27,6 @@ #ifndef __GNU_OBJC_LIST_H #define __GNU_OBJC_LIST_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - struct objc_list { void *head; struct objc_list *tail; @@ -92,8 +88,4 @@ } } -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __GNU_OBJC_LIST_H */ Index: objc-private/objc-sync.h =================================================================== --- objc-private/objc-sync.h (revision 168140) +++ objc-private/objc-sync.h (working copy) @@ -25,17 +25,9 @@ #ifndef __objc_private_objc_sync_INCLUDE_GNU #define __objc_private_objc_sync_INCLUDE_GNU -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - /* This function needs to be called at startup before @synchronized() can be used. */ void __objc_sync_init (void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* not __objc_private_objc_sync_INCLUDE_GNU */ Index: ChangeLog =================================================================== --- ChangeLog (revision 168147) +++ ChangeLog (working copy) @@ -1,3 +1,15 @@ +2010-12-22 Nicola Pero + + * objc-private/accessors.h: Removed 'extern "C"' guards. This + file is never compiled with C++. + * objc-private/hash.h: Same change. + * objc-private/objc-list.h: Same change. + * objc-private/objc-sync.h: Same change. + * objc-private/protocols.h: Same change. + * objc-private/runtime.h: Same change. + * objc-private/sarray.h: Same change. + * objc-private/selector.h: Same change. + 2010-12-21 Nicola Pero PR libobjc/18764