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: Thu, 18 Oct 2012 13:09:50 +0200

> Date: Thu, 18 Oct 2012 00:20:11 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> 
> On 10/17/2012 09:50 PM, Eli Zaretskii wrote:
> >> Won't this have problems on platforms where
> >> > (EMACS_INT) pwatch < MOST_NEGATIVE_FIXNUM,
> >> > or where MOST_POSITIVE_FIXNUM < (EMACS_INT) pwatch?
> 
> > Given what XLI does, I don't see how this could happen
> 
> To be honest I haven't followed all the back-and-forth on this,
> but in general it's not safe to convert a pointer to
> an Emacs fixnum, as this can lose information: the payload
> of an Emacs fixnum is typically narrower than a pointer.

A pointer that is properly aligned has no problem with this.  After
all, that's how we produce every Lisp object out of a pointer.



reply via email to

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