[0.3.x] fix: workitem 13815, printing type of variadic function

git-svn-id: https://pykd.svn.codeplex.com/svn@90906 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2016-01-12 15:25:35 +00:00 committed by Mikhail I. Izmestev
parent ea0781cc4b
commit ff0d434b29
2 changed files with 13 additions and 5 deletions

View File

@ -755,7 +755,9 @@ BOOST_PYTHON_MODULE( pykd )
"Return flag: type is function" ) "Return flag: type is function" )
.def( "isConstant", TypeInfoAdapter::isConstant, .def( "isConstant", TypeInfoAdapter::isConstant,
"Return flag: type is constant" ) "Return flag: type is constant" )
.def("isVtbl", TypeInfoAdapter::isVtbl, .def( "isVtbl", TypeInfoAdapter::isVtbl,
"Return true if no type is specified" )
.def( "isNoType", TypeInfoAdapter::isNoType,
"Return true if type is virtual table" ) "Return true if type is virtual table" )
.def( "getCallingConvention", TypeInfoAdapter::getCallingConvention, .def( "getCallingConvention", TypeInfoAdapter::getCallingConvention,
"Returns an indicator of a methods calling convention: callingConvention" ) "Returns an indicator of a methods calling convention: callingConvention" )
@ -764,9 +766,9 @@ BOOST_PYTHON_MODULE( pykd )
.def( "__str__", TypeInfoAdapter::str, .def( "__str__", TypeInfoAdapter::str,
"Return type as a printable string" ) "Return type as a printable string" )
.def( "__getattr__", TypeInfoAdapter::getElementByName ) .def( "__getattr__", TypeInfoAdapter::getElementByName )
.def("__len__", TypeInfoAdapter::getElementCount ) .def( "__len__", TypeInfoAdapter::getElementCount )
.def("__getitem__", TypeInfoAdapter::getElementByIndex ) .def( "__getitem__", TypeInfoAdapter::getElementByIndex )
.def("__dir__", TypeInfoAdapter::getElementDir) .def( "__dir__", TypeInfoAdapter::getElementDir )
; ;
python::class_<kdlib::TypedVar, kdlib::TypedVarPtr, python::bases<kdlib::NumBehavior>, boost::noncopyable >("typedVar", python::class_<kdlib::TypedVar, kdlib::TypedVarPtr, python::bases<kdlib::NumBehavior>, boost::noncopyable >("typedVar",

View File

@ -193,7 +193,13 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
AutoRestorePyState pystate; AutoRestorePyState pystate;
return typeInfo.isVtbl(); return typeInfo.isVtbl();
} }
static bool isNoType(kdlib::TypeInfo &typeInfo)
{
AutoRestorePyState pystate;
return typeInfo.isNoType();
}
static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType ) static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType )
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;