daikini/matlab-ruby — pull request #3 by morrifeldman (2012-11-20 17:34:07+00:00)
Title: Replace typemap with typedefs for mwSize and mwIndex in the interface file

The matlab API now needs mwSize and mwIndex to be defined. I'm not sure
why they are not getting defined simply by including "matrix.h" and
"engine.h" Nonetheless, without these typedefs you will get a runtime error with newish versions of matlab. I believe Matlab > 7.3 requires this change. Tested with Matlab 2011a.

I originally used a typemap for mwSize to get around this problem, but I think using a typedef is a better solution. mwSize is needed for the non-scalar matlab types e.g. mxCreateNumericMatrix. mwIndex is needed for cell arrays and structure arrays.