C
C++Liliput
Hi,
I have a set of APIs that currently have a void return type. I want
to change this to int because I am wrapping around these APIs in JNI
and want to throw exceptions under certain error conditions. Since
that is possible only if I return an int (that denotes an error
condition), my question is this - does changing the return type of a
function from void to int break any backward compatibility with the
older clients of the API? It doesn't look like it since the older
clients can continue to use the new APIs in the void context. Are
there any other pitfalls to this change?
Thanks
Aveek
I have a set of APIs that currently have a void return type. I want
to change this to int because I am wrapping around these APIs in JNI
and want to throw exceptions under certain error conditions. Since
that is possible only if I return an int (that denotes an error
condition), my question is this - does changing the return type of a
function from void to int break any backward compatibility with the
older clients of the API? It doesn't look like it since the older
clients can continue to use the new APIs in the void context. Are
there any other pitfalls to this change?
Thanks
Aveek