digitalmars.D - [bindings/win32] Migration from typedef
- Vladimir Panteleev (4/4) Dec 21 2011 Now that typedef is deprecated in D2, how should libraries that
- Jacob Carlborg (6/10) Dec 21 2011 I was hoping that D2 would allow typedefs in a version statement, but
- Andrej Mitrovic (2/2) Dec 22 2011 I'd like to know this too. Currently wxd won't link if I change a
- Gerrit Wichert (10/12) Jan 10 2012 I've had the same problems here on my linux box + some others.
- Vladimir Panteleev (9/13) Jan 06 2012 Here's a proposed patch:
- Vladimir Panteleev (3/18) Jan 08 2012 Committed (revision 372).
Now that typedef is deprecated in D2, how should libraries that support both D1 and D2 adjust? Should it be simply changed to an alias, or replaced with a string mixin hack? What's the impact of changing typedefs to aliases in a widely-used library?
Dec 21 2011
On 2011-12-21 23:56, Vladimir Panteleev wrote:Now that typedef is deprecated in D2, how should libraries that support both D1 and D2 adjust? Should it be simply changed to an alias, or replaced with a string mixin hack? What's the impact of changing typedefs to aliases in a widely-used library?I was hoping that D2 would allow typedefs in a version statement, but that's not the case. D2 still recognizes "typedef" so it's not the same problem as with D1 and the new D2 keywords. -- /Jacob Carlborg
Dec 21 2011
I'd like to know this too. Currently wxd won't link if I change a typedef to an alias due to multiple definitions.
Dec 22 2011
On 22.12.2011 12:28, Andrej Mitrovic wrote:I'd like to know this too. Currently wxd won't link if I change a typedef to an alias due to multiple definitions.I've had the same problems here on my linux box + some others. But i've just finished fixing them and DMD 2.057actually successfully builds the little testing app i'm developing to become more acquainted with D. It is tested under Linux 32 bit only (OpenSuse 11.4 + Open Suse 12.1/64 using -m32) but i think it should also work on Windows. if you want to give it a try, checkout the 'dmd257linux' branch from https://github.com/gwichert/wxd Gerrit
Jan 10 2012
On Wednesday, 21 December 2011 at 22:56:36 UTC, Vladimir Panteleev wrote:Now that typedef is deprecated in D2, how should libraries that support both D1 and D2 adjust? Should it be simply changed to an alias, or replaced with a string mixin hack? What's the impact of changing typedefs to aliases in a widely-used library?Here's a proposed patch: http://dump.thecybershadow.net/3c5de02d8929799da17b3dbeabfa3576/typedef.diff The TypeDef template is defined in basetsd.d (third file in diff). Seems to work with D1 and D2. Perhaps we should wait for the upcoming TypeDef library type in Phobos for D2? I'll commit it if there are no objections/suggestions...
Jan 06 2012
On Saturday, 7 January 2012 at 05:22:47 UTC, Vladimir Panteleev wrote:On Wednesday, 21 December 2011 at 22:56:36 UTC, Vladimir Panteleev wrote:Committed (revision 372).Now that typedef is deprecated in D2, how should libraries that support both D1 and D2 adjust? Should it be simply changed to an alias, or replaced with a string mixin hack? What's the impact of changing typedefs to aliases in a widely-used library?Here's a proposed patch: http://dump.thecybershadow.net/3c5de02d8929799da17b3dbeabfa3576/typedef.diff The TypeDef template is defined in basetsd.d (third file in diff). Seems to work with D1 and D2. Perhaps we should wait for the upcoming TypeDef library type in Phobos for D2? I'll commit it if there are no objections/suggestions...
Jan 08 2012