Fixed segfault issue with static functions

release/4.3a0
Alex Cunningham 2011-12-05 16:36:48 +00:00
parent 3050dc2dde
commit fa4947b99c
1 changed files with 2 additions and 3 deletions

View File

@ -73,12 +73,11 @@ void StaticMethod::matlab_wrapper(const string& toolboxPath,
ofs << "{\n"; ofs << "{\n";
// check arguments // check arguments
// extra argument obj -> nargin-1 is passed ! // NOTE: for static functions, there is no object passed
// example: checkArguments("equals",nargout,nargin-1,2);
ofs << " checkArguments(\"" << full_name << "\",nargout,nargin," << args_.size() << ");\n"; ofs << " checkArguments(\"" << full_name << "\",nargout,nargin," << args_.size() << ");\n";
// unwrap arguments, see Argument.cpp // unwrap arguments, see Argument.cpp
args_.matlab_unwrap(ofs,1); args_.matlab_unwrap(ofs,0); // We start at 0 because there is no self object
// call method // call method
// example: bool result = Point2::return_field(t); // example: bool result = Point2::return_field(t);