use swig macro