RegisterNatives() requires conversion of function pointers to void *'s for assignment to the JNINativeMethod 'fnPtr' field, e.g. via reinterpret_cast as shown here:
(That particular example seems to be ill-formed in that it omits the template arguments - e.g. 'reinterpret_cast(nativeFoo)' - but I'm guessing that's just an error in the documentation.)
My understanding is that the behavior of converting a function pointer to void * in C++ is implementation-dependent, but that in some environments (such as POSIX, with which I believe Android is at least partly compliant) support may be guaranteed. I assume the functionality wouldn't be exposed this way if it wasn't reliable, but being paranoid (and since my code depends on it) I wanted to double-check.
Are there any guarantees in place for this? Is it assumed that Android will always be running on systems where these conversions will work as expected?