Revert "Revert "Auto upcast of pointer parameters to C++ routines.""

This reverts commit 07e0daa5aab716b38acf9041a8baec3816976579.
Revert "Revert "Fix a lint error.""

This reverts commit 6bcd2b18c56448502c69bbfc960a3044c8955fd8.