本文整理汇总了C++中PyDict::end方法的典型用法代码示例。如果您正苦于以下问题:C++ PyDict::end方法的具体用法?C++ PyDict::end怎么用?C++ PyDict::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyDict
的用法示例。
在下文中一共展示了PyDict::end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Decode
bool PyCachedCall::Decode(PySubStream **in_ss)
{
PySubStream *ss = *in_ss; //consume
*in_ss = NULL;
PySafeDecRef( result );
ss->DecodeData();
if(ss->decoded() == NULL) {
SysLog::Error("PyCachedCall","Unable to decode initial stream for PyCachedCall");
PyDecRef( ss );
return false;
}
if(!ss->decoded()->IsDict()) {
SysLog::Error("PyCachedCall","Cached call substream does not contain a dict: %s", ss->decoded()->TypeString());
PyDecRef( ss );
return false;
}
PyDict *po = (PyDict *) ss->decoded();
PyDict::const_iterator cur, end;
cur = po->begin();
end = po->end();
for(; cur != end; cur++) {
if(!cur->first->IsString())
continue;
PyString *key = (PyString *) cur->first;
if( key->content() == "lret" )
result = cur->second->Clone();
}
PyDecRef( ss );
return(result != NULL);
}