From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How to make a new pseudovector type? Date: Mon, 18 Jul 2011 10:19:33 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310999318 29361 80.91.229.12 (18 Jul 2011 14:28:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2011 14:28:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 18 16:28:34 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QiooC-0006Hu-M4 for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2011 16:28:32 +0200 Original-Received: from localhost ([::1]:45998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiooB-0002MJ-PQ for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2011 10:28:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiofZ-0000Ev-Ux for emacs-devel@gnu.org; Mon, 18 Jul 2011 10:19:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QiofX-0005mv-IE for emacs-devel@gnu.org; Mon, 18 Jul 2011 10:19:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:45840 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QiofX-0005mq-75 for emacs-devel@gnu.org; Mon, 18 Jul 2011 10:19:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQHAKtAJE5MCqt8/2dsb2JhbABUmHWOfniIfMIThjwEnyeEMA X-IronPort-AV: E=Sophos;i="4.67,222,1309752000"; d="scan'208";a="126497952" Original-Received: from 76-10-171-124.dsl.teksavvy.com (HELO ceviche.home) ([76.10.171.124]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 18 Jul 2011 10:19:34 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C97A76660D; Mon, 18 Jul 2011 10:19:33 -0400 (EDT) In-Reply-To: (joakim@verona.se's message of "Mon, 18 Jul 2011 15:55:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:142109 Archived-At: >>> In the xwidget branch I use PVEC_OTHER = 0x400000 from enum pvec_type >>> to represent an xwidget. >> Don't: create a new PVEC_XWIDGET instead. > Cool, but the bitmask is fully utilized. Can I expand the bitmask? Of course. > (I need 2 types.) if so, why is it so small to begin with? It's made as large as needed. Actually, it largely doesn't need to be a bitmask. Last time I looked it's only used at one or two places to make it marginally quicker to check if something is one of some particular subset of the possible pseudo-vectors. Stefan