Fix return value of function in swig file to avoid compiler warning.