Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 931559445c72d9a53541289330ddb5157c94daf5 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/931559445c72d9a53541289330ddb5157c94daf5 Author: Nicolas Cellier <[hidden email]> Date: 2016-07-08 (Fri, 08 Jul 2016) Changed paths: M platforms/win32/vm/sqWin32Main.c Log Message: ----------- Replace another (UINT) cast by (usqIntptr_t) for LLP64 compatibility (UINT) would not work on LP64 anyway, it would truncate the pointer. |
Reading https://msdn.microsoft.com/en-us/library/windows/desktop/bb773352(v=vs.85).aspx
Wouldn't either way work? The struct field is a UINT ID number, not a pointer, so truncating the pointer to use as id would be as good as putting a 64bit pointer in the struct, and then overwriting the last bits by subsequently setting uFlags, as long as they both consistently yield the same value in uID field based on hInstance. |
In reply to this post by Eliot Miranda-3
On Fri, Jul 8, 2016 at 5:44 PM, GitHub <[hidden email]> wrote: > > Branch: refs/heads/Cog > Home: https://github.com/OpenSmalltalk/opensmalltalk-vm > Commit: 931559445c72d9a53541289330ddb5157c94daf5 > https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/931559445c72d9a53541289330ddb5157c94daf5 > Author: Nicolas Cellier <[hidden email]> > Date: 2016-07-08 (Fri, 08 Jul 2016) > > Changed paths: > M platforms/win32/vm/sqWin32Main.c > > Log Message: > ----------- > Replace another (UINT) cast by (usqIntptr_t) for LLP64 compatibility Just curious, why not put the "sq" at the front? It would seem to better categorise application specific types. cheers -ben > > (UINT) would not work on LP64 anyway, it would truncate the pointer. > > > |
In reply to this post by Henrik Sperre Johansen
Yes, maybe it would have worked, I don't know. 2016-07-08 14:46 GMT+02:00 Henrik Sperre Johansen <[hidden email]>:
|
In reply to this post by Ben Coman
2016-07-08 16:27 GMT+02:00 Ben Coman <[hidden email]>:
I'm following existing pattern: sqInt usqInt sqLong usqLong ... It's better both for uniformity and also because the pattern is exploited by special handling in CodeGenerator (int types beginning with $u...) > |
Free forum by Nabble | Edit this page |