From: QT
Subject: ECL, which should be the type of WPARAM, unsigned-int or void 	pointer?
Date: 
Message-ID: <332b9e46-9aa8-4d54-851e-051093ea7afb@w39g2000prb.googlegroups.com>
I am investigating win32 example in ecl.
I can build  win32.lisp successfully, but when after executed do-test.
 It will raise an error say: xxxxxxx is not of type FIXNUM.

Then I found the root cause is WPARAM sometimes appear to a very large
number such as 3556842955, then it will not be considered as a
fixnum.

It seems ecl used last 2 bits of int as tag bit to distinguish
immediate and complex object.

But the meaning of WPARAM is dependent. sometimes it means immediate
and sometimes it means handles, which can be a full 32 bits data.

Anybody has idea for it$B!)(B

Thanks for your attention.

From: Pascal J. Bourguignon
Subject: Re: ECL, which should be the type of WPARAM, unsigned-int or void  pointer?
Date: 
Message-ID: <87fxkq4t76.fsf@informatimago.com>
QT <········@gmail.com> writes:

> I am investigating win32 example in ecl.
> I can build  win32.lisp successfully, but when after executed do-test.
>  It will raise an error say: xxxxxxx is not of type FIXNUM.
>
> Then I found the root cause is WPARAM sometimes appear to a very large
> number such as 3556842955, then it will not be considered as a
> fixnum.
>
> It seems ecl used last 2 bits of int as tag bit to distinguish
> immediate and complex object.
>
> But the meaning of WPARAM is dependent. sometimes it means immediate
> and sometimes it means handles, which can be a full 32 bits data.
>
> Anybody has idea for it?

I don't know anything about win32.lisp, but you could try to use
values of type (unsigned-byte 32) instead of fixnum.

You can create a uint32 type with:
   (deftype uint32 () (unsigned-byte 32))


-- 
__Pascal Bourguignon__
From: QT
Subject: Re: ECL, which should be the type of WPARAM, unsigned-int or void 	pointer?
Date: 
Message-ID: <cb6a54bf-fded-4802-9e44-8cfeb8e1ebe4@a12g2000pro.googlegroups.com>
On Dec 15, 12:28 am, ····@informatimago.com (Pascal J. Bourguignon)
wrote:
> QT <········@gmail.com> writes:
> > I am investigating win32 example in ecl.
> > I can build  win32.lisp successfully, but when after executed do-test.
> >  It will raise an error say: xxxxxxx is not of type FIXNUM.
>
> > Then I found the root cause is WPARAM sometimes appear to a very large
> > number such as 3556842955, then it will not be considered as a
> > fixnum.
>
> > It seems ecl used last 2 bits of int as tag bit to distinguish
> > immediate and complex object.
>
> > But the meaning of WPARAM is dependent. sometimes it means immediate
> > and sometimes it means handles, which can be a full 32 bits data.
>
> > Anybody has idea for it$B!)(B
>
> I don't know anything about win32.lisp, but you could try to use
> values of type (unsigned-byte 32) instead of fixnum.
>
> You can create a uint32 type with:
>    (deftype uint32 () (unsigned-byte 32))
>
> --
> __Pascal Bourguignon__

Thanks, I will try it.