[Top][All Lists]
[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.
- Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/15
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/15
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/15
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/16
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/16
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/16
- Re: Lisp object that refers to a C struct,
Eli Zaretskii <=
- Re: Lisp object that refers to a C struct, Stephen J. Turnbull, 2012/10/17
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/17
- Re: Lisp object that refers to a C struct, Stephen J. Turnbull, 2012/10/17
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/17
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/17
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/17
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/17
- Re: Lisp object that refers to a C struct, Paul Eggert, 2012/10/17
- Re: Lisp object that refers to a C struct, Stefan Monnier, 2012/10/17
- Re: Lisp object that refers to a C struct, Stephen J. Turnbull, 2012/10/17