From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8771 invoked by alias); 26 Oct 2015 18:36:28 -0000 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 Received: (qmail 8690 invoked by uid 89); 26 Oct 2015 18:36:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f177.google.com Received: from mail-yk0-f177.google.com (HELO mail-yk0-f177.google.com) (209.85.160.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 26 Oct 2015 18:36:26 +0000 Received: by ykek133 with SMTP id k133so11158405yke.2 for ; Mon, 26 Oct 2015 11:36:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.209.69 with SMTP id t66mr26309766ywd.95.1445884583900; Mon, 26 Oct 2015 11:36:23 -0700 (PDT) Received: by 10.13.203.208 with HTTP; Mon, 26 Oct 2015 11:36:23 -0700 (PDT) In-Reply-To: <562E6543.7040509@redhat.com> References: <1445831204-16588-1-git-send-email-simon.marchi@polymtl.ca> <1445831204-16588-6-git-send-email-simon.marchi@polymtl.ca> <562E5050.6010909@redhat.com> <562E6543.7040509@redhat.com> Date: Tue, 27 Oct 2015 02:02:00 -0000 Message-ID: Subject: Re: [PATCH c++ 06/12] Fix constness problem in ioscm_make_gdb_stdio_port From: Doug Evans To: Pedro Alves Cc: Simon Marchi , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00580.txt.bz2 On Mon, Oct 26, 2015 at 10:39 AM, Pedro Alves wrote: > On 10/26/2015 05:27 PM, Simon Marchi wrote: >> On 26 October 2015 at 12:09, Pedro Alves wrote: >>> WDYT? >> >> Sounds good to me. I wanted to avoid passing a string literal to >> something that wasn't explicitely const (since if it tries to modify >> the string, the program just crashes). But if we are sure that >> scm_mode_bits does not do that, we can keep the simpler code. >> >> Here's a ready to push patch (not guaranteed to be well-formatted, >> because gmail). >> >> >> From ff3fa55ca1cf6bd23de87eb26687ad48fb2b3806 Mon Sep 17 00:00:00 2001 >> From: Simon Marchi >> Date: Mon, 26 Oct 2015 13:26:51 -0400 >> Subject: [PATCH] guile: Simplify ioscm_make_gdb_stdio_port >> >> As pointed out by Pedro, it's clearer to do it this way. We can trust >> that scm_mode_bits won't try to modify our string, even though it takes >> a non-const char *. > > LGTM, though it's Doug's call. Fine by me.