Committing another patch from Michael which avoids the deluge of warnings from the SWIG wrappers.