Thread overview |
---|
August 25, 2007 object.Object to void* | ||||
---|---|---|---|---|
| ||||
Greetings. After upgrading dmd to v1.018, I am getting this error, C:\cygwin\home\us319318\source\d\jic\libs\COM\Object.d(326): Error: cannot implicitly convert expression (value) of type object.Object to void* which worked fine with version 1.009. Here is the code that is causing this problem, static VARIANT opCall(Object value) { VARIANT v; return v.vt = VT_BYREF, v.byref = value, v; } How can I fix this? Sorry if this has been posted before, but I could not find this in digitalmars site. thanks, jic |
August 25, 2007 Re: object.Object to void* | ||||
---|---|---|---|---|
| ||||
Posted in reply to jicman | > v.byref = value,
v.byref = cast(void*) value,
I think you forgot to cast the value.
|
August 25, 2007 Re: object.Object to void* | ||||
---|---|---|---|---|
| ||||
Posted in reply to jicman | jicman wrote:
> Greetings.
>
> After upgrading dmd to v1.018, I am getting this error,
>
> C:\cygwin\home\us319318\source\d\jic\libs\COM\Object.d(326): Error: cannot implicitly convert expression (value) of type object.Object to void*
>
> which worked fine with version 1.009. Here is the code that is causing this problem,
>
> static VARIANT opCall(Object value) {
> VARIANT v;
> return v.vt = VT_BYREF,
> v.byref = value,
> v;
> }
>
> How can I fix this? Sorry if this has been posted before, but I could not find this in digitalmars site.
According to the changelog, this conversion stopped being implicit in 1.007, so it shouldn't work with 1.009 either. Either cast or compile with -v1 or -d (can't remember which one it is).
|
August 25, 2007 Re: object.Object to void* | ||||
---|---|---|---|---|
| ||||
Posted in reply to mandel | == Quote from mandel (mandel@foobar.com)'s article
> > v.byref = value,
> v.byref = cast(void*) value,
> I think you forgot to cast the value.
Thanks.
|
August 25, 2007 Re: object.Object to void* | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | == Quote from torhu's article
> According to the changelog, this conversion stopped being implicit in 1.007, so it shouldn't work with 1.009 either. Either cast or compile with -v1 or -d (can't remember which one it is).
1.007, 1.009, 1.018, tomato, toh-mah-toh... :-) Kidding. Ok, thanks, casting it worked.
thanks.
|
Copyright © 1999-2021 by the D Language Foundation