From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Allow specifying services as symbols? Date: Wed, 20 Oct 2010 13:52:11 +0200 Message-ID: References: <49549.130.55.132.18.1287523965.squirrel@webmail.lanl.gov> <8739s19648.fsf@stupidchicken.com> <87fww1je0d.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1287575551 3917 80.91.229.12 (20 Oct 2010 11:52:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2010 11:52:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 13:52:27 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8XDR-0005Cy-4e for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 13:52:21 +0200 Original-Received: from localhost ([127.0.0.1]:57920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8XDQ-0008B8-Lm for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 07:52:20 -0400 Original-Received: from [140.186.70.92] (port=50311 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8XDL-0008Ay-9l for emacs-devel@gnu.org; Wed, 20 Oct 2010 07:52:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8XDK-0008R7-Ao for emacs-devel@gnu.org; Wed, 20 Oct 2010 07:52:15 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:56324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8XDK-0008R0-3H for emacs-devel@gnu.org; Wed, 20 Oct 2010 07:52:14 -0400 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 111D41C00252; Wed, 20 Oct 2010 13:52:12 +0200 (CEST) Original-Received: from hase.home (ppp-88-217-97-2.dynamic.mnet-online.de [88.217.97.2]) by mail.mnet-online.de (Postfix) with ESMTP id ACDC81C0046E; Wed, 20 Oct 2010 13:52:11 +0200 (CEST) X-Yow: As a FAD follower, my BEVERAGE choices are rich and fulfilling! In-Reply-To: <87fww1je0d.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 20 Oct 2010 06:32:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131876 Archived-At: Ted Zlatanov writes: > @@ -3303,6 +3304,11 @@ > Otherwise, use getservbyname to lookup the service. */ > if (!NILP (host)) > { > + /* Take a symbol as the service and convert it to a string. */ > + if (!NILP (service) && !EQ (service, Qt) && SYMBOLP (service)) > + { > + service = Fsymbol_name (service); > + } > > /* SERVICE can either be a string or int. > Convert to a C string for later use by getaddrinfo. */ Why not just move the hunk down to where service is checked for being a string? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."