From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Lisp object that refers to a C struct Date: Thu, 18 Oct 2012 10:52:21 +0200 Message-ID: References: <83ehkz4edw.fsf@gnu.org> <83bog33wdr.fsf@gnu.org> <837gqq49j7.fsf@gnu.org> <83r4ox3frd.fsf@gnu.org> <83ipa92i95.fsf@gnu.org> <83bog03jyf.fsf@gnu.org> <507F2C74.4070107@cs.ucla.edu> <83391c2xjq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1350550406 8762 80.91.229.3 (18 Oct 2012 08:53:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2012 08:53:26 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 18 10:53:34 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TOlr5-0003Pp-V0 for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2012 10:53:28 +0200 Original-Received: from localhost ([::1]:46720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOlqy-00025B-TQ for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2012 04:53:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOlqs-00022e-JC for emacs-devel@gnu.org; Thu, 18 Oct 2012 04:53:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOlqm-0007kX-QJ for emacs-devel@gnu.org; Thu, 18 Oct 2012 04:53:14 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:40522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOlqg-0007il-Ir; Thu, 18 Oct 2012 04:53:02 -0400 Original-Received: by mail-wg0-f49.google.com with SMTP id gg4so5333521wgb.30 for ; Thu, 18 Oct 2012 01:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=y68F4fcXTG0VyV14zPbbmN1O6tiiDjxAmVyThHsL+iA=; b=pa7bbW0vLpj+ONSgAmLdr2dLfr+/IHFGSXaPociXtWhrZbUgkLV8cNNAaldtf6FnVe 3Lwhl3QLp0U/WrtrS27VAYC+8pS107r+xXa0Fh9qPIroO2NvRchEXw9k7vLoZVhygpzG 9pRoPcCFq7FFOdXVWKpCNxyF2DkdUs1LNYFmnLGJf3P9nqFd8pqnRS61XHcS8lwFHelk 5y9UWJxSuZbSrAgptVc8gc1DsB5GSapZZQxeXnWW1JsAY5cSzuRnGDXxxjumFNTWANHy xx8UG6l4Bq02A+5KhYeY3krFq59v9Ym38BMj+ZTQ+ZbUz87pL8FfUGTwWHpEv7g4IB22 jh4Q== Original-Received: by 10.216.195.209 with SMTP id p59mr11152255wen.138.1350550381469; Thu, 18 Oct 2012 01:53:01 -0700 (PDT) Original-Received: by 10.223.155.132 with HTTP; Thu, 18 Oct 2012 01:52:21 -0700 (PDT) In-Reply-To: <83391c2xjq.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154404 Archived-At: On Thu, Oct 18, 2012 at 6:50 AM, Eli Zaretskii wrote: > No, because, like Stephen says, the descriptor is first validated > against a list of known ones. In that case, wouldn't it be better to have the integer be an index into a table, like Stefan suggested? It's faster to check that it is in range than compare it with an arbitrarily long list of known pointers. Juanma