[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: |
Stephen J. Turnbull |
Subject: |
Re: Lisp object that refers to a C struct |
Date: |
Wed, 17 Oct 2012 15:21:40 +0900 |
Eli Zaretskii writes:
> > What happens if someone passes you this same integer some time after
> > you've freed the C struct?
More interesting, what happens if somebody chooses "I feel lucky" and
passes you a random integer that happens to be a "live" watch?
ISTM it fails safe (ie, doesn't crash). But it's not good. 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.
All-I-need-to-know-about-ABCs-I-learned-in-kindergarten-ly y'rs,
- 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 <=
- 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
- Re: Lisp object that refers to a C struct, Eli Zaretskii, 2012/10/18