1. Euphoria 4.1 problem - as relates to tinewg
- Posted by jessedavis Apr 28, 2016
- 3657 views
Original euphoria: "4.1.0 development (6300:57179171dbed, 2015-02-02 14:18:53)" on Windows 7 pro
See http://openeuphoria.org/forum/129577.wc#129577 as it relates to this.
Using Euphoria 4.1.0 I cannot get the following to work. It returns atoms that don't appear to point to anything useful.
include tinewg.exw include tinEWG_const.ew include std/console.e include std/pretty.e include euphoria/info.e global atom font_15 = NewFont("Courier New",15,True,False,False) global atom font_18 = NewFont("Courier New",18,True,False,False) global atom font_24 = NewFont("Courier New",24,True,False,False) sequence fonts = {font_15,font_18,font_24} pretty_print(1,fonts,{2}) puts(1,"\n\n") printf(1,"Version: %d \n",version()) any_key() abort(1)
This code produces
{-1828056919,-838201182,-1240854361} Version: 40100
Using Euphoria 4.00.04 the above code does work properly.
{2030702338,185208919,420089942} Version: 40004
Both the SWITCH problem and this problem seem to relate to memory storage issues; however, I'm only guessing.
Thanks in advance,
jd
2. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by andi49 Apr 29, 2016
- 3619 views
Hallo
can you please tell the version of tinewg you use?
(there is a public constant TINVERSION)
the most recent version is here: https://bitbucket.org/andiwagner/tinewg
and the revision for Eu4.1, like this:
Euphoria Interpreter v4.1.0 development 32-bit Windows, Using System Memory Revision Date: 2015-10-08 00:27:52, Id: 6386:16462e686646
Thank you
Andreas
Edit: I can confirm that with the above EU4.1 negative results are produced.
Eu4.0.x seems okay.
Hm, I'am not sure why this function should return a negative result?
-- myCreateFont=link_c_func(gdi32,"CreateFontA",{C_INT,C_INT,C_INT,C_INT,C_INT,C_POINTER,C_POINTER,C_POINTER,C_POINTER, -- C_POINTER,C_POINTER,C_POINTER,C_POINTER,C_POINTER},C_HANDLE)
BTW: I do not use Eu4.1 regulary.
Edit2: On the other side, this seems not to affect the function ...
3. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jessedavis Apr 30, 2016
- 3535 views
Thanks for responding. In answer to your question:
public constant TINVERSION=#091 "4.1.0 development (6300:57179171dbed, 2015-02-02 14:18:53)"
I don't remember where I got tinewg from; however, it was downloaded about a week ago when I was working on the SWITCH problem (I have officially given up on this one!).
In answer to the negative values, the subroutine SetFont() (SendMesage() has the same problem with negative numbers) has a problem every time there is a negative integer fed to it. I assume that NewFont() is returning a pointer to the spot where the font resides; but, I'm just guessing at present.
I'm not sure how I ended up with ver. 4.1. I always use the stable version. While chasing this one I did notice that the version # in the file name does not always correspond to what's in the file as produce by the version() routine.
Regards, jd
4. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by andi49 Apr 30, 2016
- 3536 views
Hallo
Thanks for responding. In answer to your question:
public constant TINVERSION=#091 "4.1.0 development (6300:57179171dbed, 2015-02-02 14:18:53)"
I don't remember where I got tinewg from; however, it was downloaded about a week ago when I was working on the SWITCH problem (I have officially given up on this one!).
In answer to the negative values, the subroutine SetFont() (SendMesage() has the same problem with negative numbers) has a problem every time there is a negative integer fed to it. I assume that NewFont() is returning a pointer to the spot where the font resides; but, I'm just guessing at present.
I'm not sure how I ended up with ver. 4.1. I always use the stable version. While chasing this one I did notice that the version # in the file name does not always correspond to what's in the file as produce by the version() routine.
Regards, jd
I pushed a simple change to https://bitbucket.org/andiwagner/tinewg
I changed the return value from CreateFontA from C_HANDLE to C_UINT it's not correct from the view of the Win32 Api, but you may give it a try.
If you use tinewg for a EuWinGui replacement then you like to know that the new Version 97 now also supports
SetCueBanner() for Cuebanner in Edit Controls
ShowBallon()
HideBallon() for Ballontips on Edit Controls
Also LoadPic() now can load the picture fileformats from GDI+ (.jpg,.tiff,.png etc)
Andreas
5. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jessedavis Apr 30, 2016
- 3502 views
Thanks for the reply.
I will give version 97 a try. The project seems to be coming along nicely. I have enjoyed using it.
Thanks again,
jd
6. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by LarryMiller Apr 30, 2016
- 3524 views
In Euphoria 4.0 C_HANDLE is defined as C_UINT, an unsigned 32 bit value. In Euphoria 4.1 C_HANDLE is defined as C_LONG_PTR. In a 32 bit OS this is defined as C_LONG, a signed 32 bit value. This is the problem.
In 32 bit Windows C_HANDLE needs to be equal to C_UINT as some handle, such as font handles, can be greater then a singed 32 bit value permits. Such a value would be interpreted as a negative number.
I will leave the solution of this problem to the developers.
I was using Euphoria 4.1 for a time but reverted back to 4.0 because of some unexplained problems. This may have been it.
7. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by ChrisB (moderator) May 01, 2016
- 3481 views
Hi
And this may be why some dlls do not work with eu 4.1 that did work with 4.05 (and vice versa)
Chris
8. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jmduro May 01, 2016
- 3473 views
Something could be derivated from my Structures Management library to resolve this problem.
Example for C_LONG
public function allocate_C_LONG(atom p) integer lg ifdef EU4_0 then lg = 4 elsifdef EU4_1 then ifdef BITS32 then -- 32-bit lg = 4 elsifdef BITS64 then -- 64-bit lg = 8 end ifdef end ifdef p = allocate(lg) return p end function ----------------------------------------------------------------------------- public procedure write_C_LONG(atom p, atom value) -- printf(f_debug, "writeStructure(%d, %s, %s)\n", {p, sprint(def), sprint(values)}) ifdef EU4_0 then putInt32(p, value) elsifdef EU4_1 then ifdef BITS32 then -- 32-bit putInt32(p, value) elsifdef BITS64 then -- 64-bit putInt64(p, value) end ifdef end ifdef end procedure ----------------------------------------------------------------------------- public function read_C_LONG(atom p) sequence result = {} ifdef EU4_0 then result = getSInt32(p) elsifdef EU4_1 then ifdef BITS32 then -- 32-bit result = getSInt32(p) elsifdef BITS64 then -- 64-bit result = getSInt64(p) end ifdef end ifdef return result end function
Jean-Marc
9. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) May 01, 2016
- 3442 views
In Euphoria 4.0 C_HANDLE is defined as C_UINT, an unsigned 32 bit value. In Euphoria 4.1 C_HANDLE is defined as C_LONG_PTR. In a 32 bit OS this is defined as C_LONG, a signed 32 bit value. This is the problem.
In 32 bit Windows C_HANDLE needs to be equal to C_UINT as some handle, such as font handles, can be greater then a singed 32 bit value permits. Such a value would be interpreted as a negative number.
I will leave the solution of this problem to the developers.
We specifically have a C_ULONG and even a C_ULONGLONG type. The C_LONG_PTR could be changed to point to those versions instead of the signed C_LONG/C_LONGLONG types. This is very trivial.
However, this more or less is the way things were originally: http://scm.openeuphoria.org/hg/euphoria/file/a36bb177d0ef/include/std/dll.e
Matt Lewis specifically changed this type to make it signed: http://scm.openeuphoria.org/hg/euphoria/annotate/4799252e3ba5/include/std/dll.e
I do not recall the specific reasons that this was done, but Matt usually knows what he's doing when it comes to things like this.
10. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by andi49 May 01, 2016
- 3451 views
Hallo
[...]
I do not recall the specific reasons that this was done, but Matt usually knows what he's doing when it comes to things like this.
Please, don't get me wrong. But this sounds a little like:
http://www.memecenter.com/search/trust%20me%20im%20an%20engineer
So far, i do not really work on tinewg regulary, but i remember that i stopped using Eu4.1 around 2013 (the last release for the Designer)
I really can't remember everthing why i did this and my english is really not good enough to explain it.
I see it like this:
Win32 Api handles need to be 32bit unsigned (check MSDN for this).
It worked for decades using signed ints.
With Windows Vista ASLR came alive, but was disabled on default. See: https://en.wikipedia.org/wiki/Address_space_layout_randomization
As far as i know it stayed disabled for every 32bit Windows OS on a machine having less than 4G Ram.
Until Windows 8 in 2012 and Win 8.1 in 2013.
Nowadays ASLR is everywhere (okay, not on WinXP and mostly not on Vista).
ASLR gives you a good chance having pointers and handles above the 2gig limit (this was never true before).
So Eu4.1 has unsigned pointers but signed handles!?
In the example (SetFont/Createfont) i pass a signed handle via sendmessage in (unsigned)wparam (wparam is unsigned in dll.e), maybe not the best you can do.
All the above is okay for Eu4.1 64bit but may crash on new 32bit Window Versions.
Maybe Eu4.1 on Win32 needs some more testing. Becouse i think WIn32 will be here for a few more years
Andreas
11. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) May 01, 2016
- 3483 views
Hallo
[...]
I do not recall the specific reasons that this was done, but Matt usually knows what he's doing when it comes to things like this.
Please, don't get me wrong. But this sounds a little like:
http://www.memecenter.com/search/trust%20me%20im%20an%20engineer
Trust me, I'm a programmer.
So far, i do not really work on tinewg regulary, but i remember that i stopped using Eu4.1 around 2013 (the last release for the Designer)
I really can't remember everthing why i did this and my english is really not good enough to explain it.
Hmm. Perhaps try explaining what you can remember in your native language and let the rest of us worry about how to interpret it??
I see it like this:
Win32 Api handles need to be 32bit unsigned (check MSDN for this).
I guess I need a more direct link. I did check, but the only reference I could find doesn't explicitly specify this:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
It worked for decades using signed ints.
All the above is okay for Eu4.1 64bit but may crash on new 32bit Window Versions.
Maybe Eu4.1 on Win32 needs some more testing. Becouse i think WIn32 will be here for a few more years
Normally, I'd let mattlewis explain himself. But he's been gone for a few months now - which is very unusual for him. So this time, I wouldn't hold my breath waiting for his response. Perhaps someone else with sufficient knowledge (ghaberek?) can fill in for him.
Unfortunately, unless mattlewis comes back or a member of the dev team can confidently state that this deliberate 3 year old code change is wrong, this is not likely to get fixed.
C_HANDLE is a Windoze specific concept that one wouldn't use on nix. Hence my minimal knowledge on it.
In the example (SetFont/Createfont) i pass a signed handle via sendmessage in (unsigned)wparam (wparam is unsigned in dll.e), maybe not the best you can do.
Edit2: On the other side, this seems not to affect the function ...
That said, I wonder if this could be part of the problem for others. It's not so much that Euphoria is treating the value of the HANDLE incorrectly (passing it from C to Eu as a signed value), but that the value is being translated back and forth to the C code in an inconsistent way (e.g. treating it as signed when it comes in from C to Eu, but then treating it as unsigned when it is passed back from Eu to C).
Things always get ugly when you have to treat pointers as ints or vice versa.
12. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by ghaberek (admin) May 01, 2016
- 3448 views
Normally, I'd let mattlewis explain himself. But he's been gone for a few months now - which is very unusual for him. So this time, I wouldn't hold my breath waiting for his response. Perhaps someone else with sufficient knowledge (ghaberek?) can fill in for him.
Unfortunately, unless mattlewis comes back or a member of the dev team can confidently state that this deliberate 3 year old code change is wrong, this is not likely to get fixed.
C_HANDLE is a Windoze specific concept that one wouldn't use on nix. Hence my minimal knowledge on it.
C_HANDLE is just a PVOID type, a.k.a. void*.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx
typedef PVOID HANDLE; typedef void *PVOID;
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.
On a side note, should we ifdef the Windows-specific C types? Are they of any use on other platforms? I don't think so.
-Greg
13. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) May 03, 2016
- 3391 views
Edit2: On the other side, this seems not to affect the function ...
I guess this is the major sticking point.
Does anyone have any example code that can actually demonstrate where the 4.1 behavior here actually breaks something? Otherwise, it's simply just a display issue.
Which is not to say we shouldn't fix the display issue, but it may have a lower priority than the switch bug.
Forked into: Eu 4.1cf eu 4.05 - breaks down with SOME d
14. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by andi49 May 04, 2016
- 3375 views
Hallo
Edit2: On the other side, this seems not to affect the function ...
I guess this is the major sticking point.
Does anyone have any example code that can actually demonstrate where the 4.1 behavior here actually breaks something? Otherwise, it's simply just a display issue.
Which is not to say we shouldn't fix the display issue, but it may have a lower priority than the switch bug.
Let me say it like this: OE (OpenEuphoria) is a tool in my toolbox. I use it. I like it and i use it. I work only on win32 for now and my 4.0.6 does a good job on this.( 'better the devil you know than the devil you don't)
Don't get me wrong but i do not care about 4.1 anymore (only if somebody asks, like in this thread). It's about 4 years since the last stable release. So i think OE does not go anywhere. And like Win32(what i use now) it just will vanish. But no problem there is allways something new.
Andreas
15. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) May 04, 2016
- 3354 views
Hallo
Edit2: On the other side, this seems not to affect the function ...
I guess this is the major sticking point.
Does anyone have any example code that can actually demonstrate where the 4.1 behavior here actually breaks something?
Let me say it like this:
That's a no, then.
my 4.0.6 does a good job on this.( 'better the devil you know than the devil you don't)
That's a bit surprising as 4.0.6 hasn't been released yet either.
16. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by andi49 May 08, 2016
- 3297 views
Hallo
That's a bit surprising as 4.0.6 hasn't been released yet either.
Sounds you are a little proud off not releasing ? .....
Andreas
(forget it just a ...)
17. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 13, 2016
- 3226 views
Normally, I'd let mattlewis explain himself. But he's been gone for a few months now - which is very unusual for him. So this time, I wouldn't hold my breath waiting for his response.
Unfortunately, unless mattlewis comes back
Actually, he did come back - via email - a short time after this post. Since he has had a chance to respond but didn't, let's assume he agrees with everyone else who says the behavior is wrong and should be changed.
If my assumption here is wrong, I'm sure mattlewis will come back to correct me.
On a side note, should we ifdef the Windows-specific C types? Are they of any use on other platforms? I don't think so.
Agreed. If there are no objections within a week, I'll remove them.
That's a bit surprising as 4.0.6 hasn't been released yet either.
Sounds you are a little proud off not releasing ? .....
No. Just pointing out the (rather obvious) contradiction you made here.
18. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 20, 2016
- 3057 views
On a side note, should we ifdef the Windows-specific C types? Are they of any use on other platforms? I don't think so.
Agreed. If there are no objections within a week, I'll remove them.
Done. See http://scm.openeuphoria.org/hg/euphoria/rev/0e358f5722d3
19. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by mattlewis (admin) Jul 20, 2016
- 3049 views
Normally, I'd let mattlewis explain himself. But he's been gone for a few months now - which is very unusual for him. So this time, I wouldn't hold my breath waiting for his response.
Unfortunately, unless mattlewis comes back
Actually, he did come back - via email - a short time after this post. Since he has had a chance to respond but didn't, let's assume he agrees with everyone else who says the behavior is wrong and should be changed.
If my assumption here is wrong, I'm sure mattlewis will come back to correct me.
Shoot...I didn't realize this was in the works. I just got the commit email. 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.
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. What's the benefit of taking them out?
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. Just had a hard drive failure and I'm having to rebuild and reconstruct some euphoria stuff, so maybe the spark will be relit!
Matt
20. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by unsteady Jul 20, 2016
- 3040 views
Matt,
"the spark will be relit", I hope.
21. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 20, 2016
- 3091 views
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 ?
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.
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.
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!)
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!
Just had a hard drive failure and
That's not a good thing. Sorry to hear it.
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!
22. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by mattlewis (admin) Jul 20, 2016
- 3066 views
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 ?
That would be better than keeping them in a demo. Having the extra constants around seemed easier to me than making them only be available on certain platforms to accommodate lazy / sloppy devs, but either a separate file or an ifdef would be OK, so long as they're in the stdlib.
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.
WHARGARBLE! Yeah, if I got the types wrong, that should definitely be fixed. It's kind of hard to keep it all straight across all the platforms. And signed / unsigned often doesn't really matter (for instance, on 64-bit all pointers will be the same signed or unsigned) but it's marginally better to be pedantically correct than "it works" correct. (Semi-on topic, I was building the head of the trunk from scratch and getting failing errors on call_c tests - 64-bit Linux, so something in there has regressed...went back to the memstruct branch for now - haven't had a chance to investigate further.)
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.
I think that one is actually a signed integer that's the same size as a pointer, so signed is correct. It's a consequence of 64-bit Windows using a 32-bit long integer. Yes, the name is dumb, but it is what it is, and is another one of those backwards compatibility things that Microsoft introduced.
Matt
23. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 20, 2016
- 3071 views
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 ?
That would be better than keeping them in a demo. Having the extra constants around seemed easier to me than making them only be available on certain platforms to accommodate lazy / sloppy devs, but either a separate file or an ifdef would be OK, so long as they're in the stdlib.
Ok, I'll add a include/std/win32/w32dllconst.ew with the removed constants.
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.
WHARGARBLE! Yeah, if I got the types wrong, that should definitely be fixed. It's kind of hard to keep it all straight across all the platforms. And signed / unsigned often doesn't really matter (for instance, on 64-bit all pointers will be the same signed or unsigned) but it's marginally better to be pedantically correct than "it works" correct.
Ok, I'll change C_HANDLE/C_HWND to C_POINTER then while I'm at it.
(Semi-on topic, I was building the head of the trunk from scratch and getting failing errors on call_c tests - 64-bit Linux, so something in there has regressed...went back to the memstruct branch for now - haven't had a chance to investigate further.)
Ouch.
24. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 20, 2016
- 3083 views
Ok, I'll add a include/std/win32/w32dllconst.ew with the removed constants.
Ok, I'll change C_HANDLE/C_HWND to C_POINTER then while I'm at it.
Done. http://scm.openeuphoria.org/hg/euphoria/rev/5976874ba4ee
I do think we'll need Matt to chime in here to confirm...
Misquote - that wasn't me, that was ghaberek.
25. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by ne1uno Jul 31, 2016
- 2969 views
Ok, I'll add a include/std/win32/w32dllconst.ew with the removed constants.
Ok, I'll change C_HANDLE/C_HWND to C_POINTER then while I'm at it.
Done. http://scm.openeuphoria.org/hg/euphoria/rev/5976874ba4ee
this seems like a pretty drastic breaking change for little to no good reason except somehow a few windows declarations in dll.e offended a few (1) people? did I miss something?
any suggestions about how to work around this to support eu40, older eu41 and newer eu41? all of which people are going to continue to want to use.
include std/dll.e --can we have this? ifdef object(C_HANDLE) == OBJ_UNKNOWN then include std\win32\w32dllconst.ew end ifdef
26. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Jul 31, 2016
- 2962 views
this seems like a pretty drastic breaking change for little to no good reason except somehow a few windows declarations in dll.e offended a few (1) people?
Some of the definitions were wrong, and at the time no one could explain why we needed them.
did I miss something?
Yes, the whole conversation apparently.
any suggestions about how to work around this to support eu40, older eu41 and newer eu41?
I like your example. I think it's a workable solution.
include std/dll.e -- newer dll.e defines NO_CHANDLE -- older ones which have C_HANDLE do not define it ifdef not NO_CHANDLE then include std\win32\w32dllconst.ew end ifdef
If there are no objections I'll add this in a week or so from now. I'm willing to consider a better name, of course.
all of which people are going to continue to want to use.
Actually, once the release comes out, I feel we should discourage people from using betas.
27. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by jimcbrown (admin) Aug 07, 2016
- 2857 views
I like your example. I think it's a workable solution.
include std/dll.e -- newer dll.e defines NO_CHANDLE -- older ones which have C_HANDLE do not define it ifdef not NO_CHANDLE then include std\win32\w32dllconst.ew end ifdef
If there are no objections I'll add this in a week or so from now. I'm willing to consider a better name, of course.
No one had a better suggestion, so this is what is now committed: http://scm.openeuphoria.org/hg/euphoria/rev/979ef64e0941
Discussion on this is still open however. If we want a different define (or if we want to move the constants back to std/dll.e ), it's not too late.
28. Re: Euphoria 4.1 problem - as relates to tinewg
- Posted by ne1uno Jan 20, 2017
- 2381 views
I like your example. I think it's a workable solution.
include std/dll.e -- newer dll.e defines NO_CHANDLE -- older ones which have C_HANDLE do not define it ifdef not NO_CHANDLE then include std\win32\w32dllconst.ew end ifdef
If there are no objections I'll add this in a week or so from now. I'm willing to consider a better name, of course.
No one had a better suggestion, so this is what is now committed: http://scm.openeuphoria.org/hg/euphoria/rev/979ef64e0941
Discussion on this is still open however. If we want a different define (or if we want to move the constants back to std/dll.e ), it's not too late.
the better suggestion was ifdef WIN32
the additional file now makes qualifying C_ defines with multiple namespaces intentional spaghetti code when before all you needed was dll:C_
please make std/dll.e great again