Re: Euphoria 4.1 problem - as relates to tinewg

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...

I would not have removed these from std/dll.e. Your comment in the commit implies that users could just go to the demo to get them.

Agreed. They could even just include it directly. Though maybe it makes sense to have a std/include/w32api/w32dllconst.ew instead ?

mattlewis said...

But these are extremely common Windows types. Having them there means that we've already figured out what Windows wants when it wants a HANDLE or a LONG_PTR. This just puts a larger burden on the euphoria programmer to have to figure out the Windows type system and how that translates into euphoria.

I think the consensus was that we had done it wrong in the first place.

ghaberek said...

C_HANDLE is just a PVOID type, a.k.a. void*.

All pointers are unsigned, correct? (I think we can all agree that they are not signed.) I believe C_HANDLE and C_HWND should be of type C_POINTER, and C_POINTER should be a 32-bit or 64-bit unsigned value depending on the architecture. It's cast internally to (uint64_t) so that should be true. Although I may be over-simplifying things based on my lack of knowledge on architecture-specific problems.

I do think we'll need Matt to chime in here to confirm this is a simple mistake or explain any further reasoning he had for the change to signed values. I'm not even sure what C_LONG_PTR is really for or why you would want to interpret pointers as signed values.

mattlewis said...

What's the benefit of taking them out?

It's not clear that they should live in std/dll.e because that is meant to be cross platform but these constants are specific to a single platform.

Also, since we got the types wrong, it was better to pull them out than to leave the broken types in and cause additional user confusion (such as the one that started this thread!)

mattlewis said...

Shoot...I didn't realize this was in the works. I just got the commit email.

Sorry...been so busy...err...the last few years, I guess between work and Cub Scouts and other stuff that I haven't had much time for euphoria.

That's actually a good thing! grin

mattlewis said...

Just had a hard drive failure and

That's not a good thing. Sorry to hear it.

mattlewis said...

I'm having to rebuild and reconstruct some euphoria stuff, so maybe the spark will be relit!

This, on the other hand, is some of the best news I've heard all year!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu