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: Eli Zaretskii
Subject: Re: Lisp object that refers to a C struct
Date: Wed, 17 Oct 2012 06:05:10 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Tue, 16 Oct 2012 17:43:26 -0400
> 
> > pure overhead, with no benefits at all.  To do everything I need with
> > the watcher struct, all I need is a pointer to it, which can easily be
> > disguised as a Lisp integer.  (This is how the code actually works
> > now.)
> 
> What happens if someone passes you this same integer some time after
> you've freed the C struct?

It won't be found in the list of watches, so the command to remove
that watch will say "Invalid watch descriptor", and Lisp-level code
will not find the corresponding Lisp data structure.



reply via email to

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