From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11918 invoked by alias); 11 Jan 2013 15:27:05 -0000 Received: (qmail 11823 invoked by uid 22791); 11 Jan 2013 15:27:02 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO blade.wire.rat) (80.177.220.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Jan 2013 15:26:48 +0000 Received: by blade.wire.rat (Postfix, from userid 500) id B0994264263; Fri, 11 Jan 2013 15:26:46 +0000 (GMT) Date: Fri, 11 Jan 2013 15:27:00 -0000 From: Gary Benson To: Tom Tromey Cc: Eli Zaretskii , Yao Qi , gdb-patches@sourceware.org Subject: Re: [obv] Make 'disable_display' static. Message-ID: <20130111152646.GA10124@blade.wire.rat> Mail-Followup-To: Tom Tromey , Eli Zaretskii , Yao Qi , gdb-patches@sourceware.org References: <1357870430-19757-1-git-send-email-yao@codesourcery.com> <838v80gn16.fsf@gnu.org> <87d2xbu6l3.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d2xbu6l3.fsf@fleche.redhat.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00229.txt.bz2 Tom Tromey wrote: > In fact I think it is better to have the discussion around exporting > objects than around making them static. The default ought to be > static, as much as possible, to reduce the size of a module's API. I agree. Aside from what Tom said, making functions static marks them as local. If I touch some code using a static function I tend to look into it a bit more--how many times is it used, can I refactor it, might I change the parameters to save work, that kind of thing. I tend not to do this kind of investigation for external functions unless I have a very compelling reason. Cheers, Gary -- http://gbenson.net/