[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: |
Stefan Monnier |
Subject: |
Re: Lisp object that refers to a C struct |
Date: |
Wed, 17 Oct 2012 09:34:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
>> 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.
So the integer doesn't encode the pointer, instead it's an index into
a table of C structs. Like POSIX file-descriptors.
That would work, of course.
Stefan
- 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, 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, 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 <=
- 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
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/18
- Re: Lisp object that refers to a C struct, Paul Eggert, 2012/10/18
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/18
- Re: Lisp object that refers to a C struct, Paul Eggert, 2012/10/18