[0.3.x] fixed : issue # 14029 ( call function with "void" return type raises exception )

git-svn-id: https://pykd.svn.codeplex.com/svn@91093 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\ussrhero_cp 2017-01-06 21:41:07 +00:00 committed by Mikhail I. Izmestev
parent 8a31949d19
commit 8361ab5243
2 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3 #define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 1 #define PYKD_VERSION_SUBVERSION 1
#define PYKD_VERSION_BUILDNO 8 #define PYKD_VERSION_BUILDNO 9
#define __VER_STR2__(x) #x #define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x) #define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -161,7 +161,7 @@ python::list TypeInfoAdapter::getElementDir(kdlib::TypeInfo &typeInfo)
python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args) python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args)
{ {
kdlib::NumVariant retVal; kdlib::TypedValue retVal;
size_t argCount = python::len(args); size_t argCount = python::len(args);
@ -186,7 +186,6 @@ python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args)
kdlib::NumVariant var= NumVariantAdaptor::convertToVariant(args[i]); kdlib::NumVariant var= NumVariantAdaptor::convertToVariant(args[i]);
argLst.push_back( var ); argLst.push_back( var );
} }
{ {
@ -194,7 +193,12 @@ python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args)
retVal = funcobj->call(argLst); retVal = funcobj->call(argLst);
} }
return NumVariantAdaptor::convertToPython(retVal); if ( retVal.getType()->isVoid() )
{
return python::object();
}
return NumVariantAdaptor::convertToPython(retVal);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////