From patchwork Sun Dec 19 14:57:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 76132 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 6578DB7082 for ; Mon, 20 Dec 2010 01:57:12 +1100 (EST) Received: (qmail 24000 invoked by alias); 19 Dec 2010 14:57:10 -0000 Received: (qmail 23989 invoked by uid 22791); 19 Dec 2010 14:57:09 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL, BAYES_40, SARE_SUB_ENC_UTF8, 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; Sun, 19 Dec 2010 14:57:05 +0000 Received: from eggs.gnu.org ([140.186.70.92]:49213) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PUKh2-000653-DB for gcc-patches@gnu.org; Sun, 19 Dec 2010 09:57:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUKh3-0000xy-LO for gcc-patches@gnu.org; Sun, 19 Dec 2010 09:57:03 -0500 Received: from smtp141.iad.emailsrvr.com ([207.97.245.141]:42844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUKh3-0000xj-H8 for gcc-patches@gnu.org; Sun, 19 Dec 2010 09:57:01 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp34.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id B08A73802E1 for ; Sun, 19 Dec 2010 09:57:00 -0500 (EST) Received: from dynamic9.wm-web.iad.mlsrvr.com (dynamic9.wm-web.iad1a.rsapps.net [192.168.2.216]) by smtp34.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 9C9683802C0 for ; Sun, 19 Dec 2010 09:57:00 -0500 (EST) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic9.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 78C97320088 for ; Sun, 19 Dec 2010 09:57:00 -0500 (EST) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Sun, 19 Dec 2010 15:57:00 +0100 (CET) Date: Sun, 19 Dec 2010 15:57:00 +0100 (CET) Subject: =?UTF-8?Q?libobjc:=20header=20cleanup=20for=20new=20API=20(9)?= From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1292770620.493427194@192.168.2.227> 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 This patch declares in objc/runtime.h a function (class_ivar_set_gcinvisible) that existed in the old API and should still exist in the new API (at least until we review GC if we want to), but that I had forgotten to declare. It also removes a #define in sendmsg.c that had been added as a temporary hack during the header reorganization and is no longer needed. Committed. Thanks Index: sendmsg.c =================================================================== --- sendmsg.c (revision 168050) +++ sendmsg.c (working copy) @@ -44,10 +44,6 @@ #include /* For assert */ #include /* For strlen */ -/* Temporarily while we include objc/objc-api.h instead of objc-private/module-abi-8.h. */ -#define _CLS_IN_CONSTRUCTION 0x10L -#define CLS_IS_IN_CONSTRUCTION(cls) __CLS_ISINFO(cls, _CLS_IN_CONSTRUCTION) - /* This is how we hack STRUCT_VALUE to be 1 or 0. */ #define gen_rtx(args...) 1 #define gen_rtx_MEM(args...) 1 @@ -331,7 +327,8 @@ return get_imp (class_, selector); } -/* Given a method, return its implementation. */ +/* Given a method, return its implementation. This has been replaced + by method_getImplementation() in the modern API. */ IMP method_get_imp (struct objc_method * method) { Index: ChangeLog =================================================================== --- ChangeLog (revision 168051) +++ ChangeLog (working copy) @@ -1,5 +1,11 @@ 2010-12-19 Nicola Pero + * objc/runtime.h (class_ivar_set_gcinvisible): Declare. + * sendmsg.c (_CLS_IN_CONSTRUCTION, CLS_IS_IN_CONSTRUCTION): Do not + define. Updated comments. + +2010-12-19 Nicola Pero + * objc/encoding.h: Updated comments. * objc/runtime.h: Updated comments. (objc_setGetUnknownClassHandler): Mark with objc_EXPORT. Index: objc/runtime.h =================================================================== --- objc/runtime.h (revision 168051) +++ objc/runtime.h (working copy) @@ -962,6 +962,15 @@ objc_EXPORT void objc_free(void *mem); +/** Implementation: the following functions are in gc.c. */ + +/* Mark the instance variable as inaccessible to the garbage + collector. */ +objc_EXPORT void class_ivar_set_gcinvisible (Class _class, + const char* ivarname, + BOOL gcInvisible); + + /** Implementation: the following functions are in encoding.c. */ /* Traditional GNU Objective-C Runtime functions that are currently