Using Michael's suggestion for shrinking code size of SWIG wrappers