June 25, 2004 Variadic arguments and object references. | ||||
---|---|---|---|---|
| ||||
When passing object references into a function that accepts variadic arguments, it has to be explicitly cast as whatever the function is going to convert it to during extraction. If not, then, due to vtable layouts and so forth, the pointer will likely be off a bit, and the program will segfault when it tries to use the object. The only thing I can suggest is that object references be implicitly cast to Object when passed to a variadic function. -- andy |
June 27, 2004 Re: Variadic arguments and object references. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andy Friesen | Can you give an example? "Andy Friesen" <andy@ikagames.com> wrote in message news:cbg88i$f4i$1@digitaldaemon.com... > When passing object references into a function that accepts variadic arguments, it has to be explicitly cast as whatever the function is going to convert it to during extraction. If not, then, due to vtable layouts and so forth, the pointer will likely be off a bit, and the program will segfault when it tries to use the object. > > The only thing I can suggest is that object references be implicitly cast to Object when passed to a variadic function. > > -- andy |
Copyright © 1999-2021 by the D Language Foundation