From fa4947b99c64db83fe47f18f73cc3aad326c40e4 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Mon, 5 Dec 2011 16:36:48 +0000 Subject: [PATCH] Fixed segfault issue with static functions --- wrap/StaticMethod.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wrap/StaticMethod.cpp b/wrap/StaticMethod.cpp index 3d380c1da..196ba639f 100644 --- a/wrap/StaticMethod.cpp +++ b/wrap/StaticMethod.cpp @@ -73,12 +73,11 @@ void StaticMethod::matlab_wrapper(const string& toolboxPath, ofs << "{\n"; // check arguments - // extra argument obj -> nargin-1 is passed ! - // example: checkArguments("equals",nargout,nargin-1,2); + // NOTE: for static functions, there is no object passed ofs << " checkArguments(\"" << full_name << "\",nargout,nargin," << args_.size() << ");\n"; // 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 // example: bool result = Point2::return_field(t);