On 04/30/14 02:42, Shuai Meng wrote:
Thank you.
Even if res is NULL (meaning that the return value is not used by
the script), the semantic of the code needs to be the same as if it
was used. It's just an optimization and optimizations can't change
semantics. For example:
call CBool("blah")
needs to return an error and you need to perform the conversion to
recognize the error. An other example why this is wrong is if you
try to convert an object. In such case, default value getter needs
to be called (and it's called by VariantChangeType in this case).
Jacek