emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lisp object that refers to a C struct


From: Stephen J. Turnbull
Subject: Re: Lisp object that refers to a C struct
Date: Thu, 18 Oct 2012 02:45:38 +0900

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'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]