From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Lisp object that refers to a C struct Date: Thu, 18 Oct 2012 02:45:38 +0900 Message-ID: <87obk156wt.fsf@uwakimon.sk.tsukuba.ac.jp> References: <83ehkz4edw.fsf@gnu.org> <83bog33wdr.fsf@gnu.org> <837gqq49j7.fsf@gnu.org> <83r4ox3frd.fsf@gnu.org> <87r4ox62kr.fsf@uwakimon.sk.tsukuba.ac.jp> <83mwzl2j4e.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 1350495950 9361 80.91.229.3 (17 Oct 2012 17:45:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2012 17:45:50 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 17 19:45:57 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 1TOXgo-0006Mk-PI for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2012 19:45:54 +0200 Original-Received: from localhost ([::1]:40734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXgh-0004eu-LY for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2012 13:45:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXgf-0004em-4u for emacs-devel@gnu.org; Wed, 17 Oct 2012 13:45:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOXgd-0003sb-QN for emacs-devel@gnu.org; Wed, 17 Oct 2012 13:45:44 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:41353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOXgb-0003rI-NJ; Wed, 17 Oct 2012 13:45:41 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id EA7569708E6; Thu, 18 Oct 2012 02:45:38 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id AD5A21A308D; Thu, 18 Oct 2012 02:45:38 +0900 (JST) In-Reply-To: <83mwzl2j4e.fsf@gnu.org> X-Mailer: VM undefined under 21.5 (beta32) "habanero" b0d40183ac79 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 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:154387 Archived-At: Eli Zaretskii writes: > I don't follow: what do you mean "somebody passes me a random > integer"? [...] > So if they pass me the integer that happens to reference a live watch, > they can only do that through the "remove" API, in which case the > watch will stop. You got it. > Why not? If a luser asked to shut down a watch, and just "happened" > to specify a live one, she gets what she asked for. It's not like > Emacs _needs_ those watches for some of its internal workings. It doesn't now, no. > > So really you want this to be entirely internal somehow. The only > > way to do that is to have an opaque type that you can only get a > > pointer to from the watch constructor. > > I don't think we have opaque data types in Emacs. Of course we do. Starting with `cons'.