From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29139 invoked by alias); 13 Nov 2007 19:23:23 -0000 Received: (qmail 29130 invoked by uid 22791); 13 Nov 2007 19:23:22 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.183) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 Nov 2007 19:23:20 +0000 Received: by wa-out-1112.google.com with SMTP id l35so2302942waf for ; Tue, 13 Nov 2007 11:23:19 -0800 (PST) Received: by 10.114.154.1 with SMTP id b1mr320672wae.1194981798908; Tue, 13 Nov 2007 11:23:18 -0800 (PST) Received: by 10.114.95.9 with HTTP; Tue, 13 Nov 2007 11:23:18 -0800 (PST) Message-ID: Date: Tue, 13 Nov 2007 19:23:00 -0000 From: "Rob Quill" To: gdb-patches@sourceware.org, drow@false.org Subject: Re: Remove deprecated_set_value_type In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071113124021.GB22747@caradoc.them.org> 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: 2007-11/txt/msg00251.txt.bz2 On 13/11/2007, Rob Quill wrote: > On 13/11/2007, Daniel Jacobowitz wrote: > > On Tue, Nov 13, 2007 at 10:01:11AM +0000, Rob Quill wrote: > > > Hi, > > > > > > This patch removes the deprecated_set_value_type() function from > > > value.c, value.h and all other places which use it. > > > > > > I also plan to try and remove the other deprecated functions from value.c > > > > Sorry, but you've missed the point. It was deprecated because you're > > not supposed to bang on a value's type after it is created (or at > > least, that's the hope). And struct value was moved from the header > > to the C file in order to stop other places from poking at it. > > > > So this is going the wrong direction :-( > > > > > -/* This is being used to change the type of an existing value, that > > > - code should instead be creating a new value with the changed type > > > - (but possibly shared content). */ > > > > As that says. Is it a correct solution to add a function something like copy_val_except_type, which copies all the fields from a value struct except the type? So an new value is created of the right type, then cop_val_except_type is called, which would replace the other fields. Thanks for your help, Rob