From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10681 invoked by alias); 8 Dec 2013 08:05:11 -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 10668 invoked by uid 89); 8 Dec 2013 08:05:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 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-pb0-f41.google.com Received: from Unknown (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 08 Dec 2013 08:05:09 +0000 Received: by mail-pb0-f41.google.com with SMTP id jt11so3526950pbb.28 for ; Sun, 08 Dec 2013 00:05:02 -0800 (PST) X-Received: by 10.69.31.1 with SMTP id ki1mr14009964pbd.124.1386489901927; Sun, 08 Dec 2013 00:05:01 -0800 (PST) Received: from sspiff.sspiff.org.gmail.com (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id ka3sm9325057pbc.32.2013.12.08.00.05.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2013 00:05:01 -0800 (PST) From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH] Add some const-ness to py-cmd.c Date: Sun, 08 Dec 2013 08:05:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00298.txt.bz2 Hi. When can we drop support for older Python versions? 2013-12-08 Doug Evans * python/py-cmd.c (struct cmdpy_completer): Add comment. (completers): Make const. diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index c0e9d96..c845c7c 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -32,13 +32,15 @@ /* Struct representing built-in completion types. */ struct cmdpy_completer { - /* Python symbol name. */ + /* Python symbol name. + This isn't a const char * for Python 2.4's sake. + PyModule_AddIntConstant only takes a char *, sigh. */ char *name; /* Completion function. */ completer_ftype *completer; }; -static struct cmdpy_completer completers[] = +static const struct cmdpy_completer completers[] = { { "COMPLETE_NONE", noop_completer }, { "COMPLETE_FILENAME", filename_completer },