From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19830 invoked by alias); 19 Jan 2014 17:34:52 -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 19820 invoked by uid 89); 19 Jan 2014 17:34:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 Jan 2014 17:34:51 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MZN00J00ST3AY00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sun, 19 Jan 2014 19:34:47 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZN00JU1STZ1R80@a-mtaout22.012.net.il>; Sun, 19 Jan 2014 19:34:47 +0200 (IST) Date: Sun, 19 Jan 2014 17:34:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH v1 02/36] Guile extension language: doc additions In-reply-to: To: Doug Evans Cc: ludo@gnu.org, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83txczj2o2.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <52b9da59.64ab440a.0b0b.7e1c@mx.google.com> <83ha9w68av.fsf@gnu.org> <87sit4kb1t.fsf@gnu.org> <83eh4ow78t.fsf@gnu.org> <87k3egez8e.fsf@gnu.org> <87mwitovvh.fsf@gnu.org> <83wqhvj4bw.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00719.txt.bz2 > Date: Sun, 19 Jan 2014 09:19:45 -0800 > From: Doug Evans > Cc: Ludovic Courtès , > "gdb-patches@sourceware.org" > > For C-like languages, a value is a string if it is a pointer to or an > array of characters or ints of type @code{wchar_t}, @code{char16_t}, > or @code{char32_t}. The string is assumed to be terminated > by a zero of the appropriate width. However if the optional length > argument is given, the string will be converted to that given length, > and will include any embedded zeros that the string may contain. The only problem with this text is that it seems to cover _only_ C-like languages. It says nothing about the other languages. How about this: For C-like languages, a value is a string if it is a pointer to or an array of characters or ints of type @code{wchar_t}, @code{char16_t}, or @code{char32_t}. For other languages ... [say here how string values are distinguished in other languages]. If the string is terminated by a zero of the appropriate width, it will be converted up to that zero. For strings that are not zero-terminated (which includes strings in non C-like languages), you must specify the length for conversion.