Improved bridge. Fixed I/O problem in function template

This commit is contained in:
hbristow
2013-06-29 00:19:08 -07:00
parent 53c9c40eba
commit 53a7fbf74b
2 changed files with 164 additions and 26 deletions

View File

@@ -35,7 +35,7 @@ void mexFunction(int nlhs, mxArray* plhs[],
conditionalError(nlhs <= {{ fun.rtp|void|not + fun.req|outputs|length + fun.opt|outputs|length}}, "Too many output arguments specified");
// setup
std::vector<Bridge> inputs(plhs, plhs+nrhs);
std::vector<Bridge> inputs(prhs, prhs+nrhs);
{% set noutputs = fun.rtp|void|not + fun.req|outputs|length + fun.opt|outputs|length %}
{%- if noutputs %}
std::vector<Bridge> outputs({{noutputs}});