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: Lisp object that refers to a C struct Date: Thu, 18 Oct 2012 18:09:46 -0400 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> <83wqyo1129.fsf@gnu.org> <83sj9b1z1i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1350598196 20541 80.91.229.3 (18 Oct 2012 22:09:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2012 22:09:56 +0000 (UTC) Cc: lekktu@gmail.com, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 19 00:10:02 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 1TOyHv-0004is-Pi for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2012 00:09:59 +0200 Original-Received: from localhost ([::1]:43417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOyHo-00072i-Gc for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2012 18:09:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOyHm-00072b-10 for emacs-devel@gnu.org; Thu, 18 Oct 2012 18:09:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOyHl-0007fD-0w for emacs-devel@gnu.org; Thu, 18 Oct 2012 18:09:49 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:26815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOyHj-0007ex-JI; Thu, 18 Oct 2012 18:09:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCoeh/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202117208" Original-Received: from 76-10-135-161.dsl.teksavvy.com (HELO pastel.home) ([76.10.135.161]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Oct 2012 18:09:46 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9E79759525; Thu, 18 Oct 2012 18:09:46 -0400 (EDT) In-Reply-To: <83sj9b1z1i.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Oct 2012 19:16:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:154429 Archived-At: > It doesn't. I meant the need to manage the table itself, grow it when > needed, etc. To me "table" doesn't imply "array". It's just some kind of data-structure that keeps the elements at hand. It can be a list, an array, a tree, a has-table, you name it. >> (BTW, is this table usable by Lisp, e.g. can they get the list of >> current file-watchers?). > Yes, it's an alist. But it currently isn't exposed to Lisp, neither > as a variable nor via an API. It could be, of course. But since > R=FCdiger didn't, and since we didn't discuss in detail how this feature > will be used from Lisp, I didn't want to introduce APIs whose > necessity is not clear. Note that if we use integers instead of a new type, we can't free those structs when the Lisp code loses the last reference to the file-watcher. > Call w32_valid_pointer_p, and in addition verify that the struct > pointed to by it has the correct magic signature. Why is that needed? Can you give a precise description of your alist? Stefan