mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Support new marshal types from Python 3.4
This commit is contained in:
parent
6ecbcfb564
commit
176a049a68
9 changed files with 131 additions and 27 deletions
|
|
@ -155,9 +155,18 @@ void PycModule::loadFromFile(const char* filename)
|
|||
m_code = LoadObject(&in, this).cast<PycCode>();
|
||||
}
|
||||
|
||||
PycRef<PycString> PycModule::getIntern(int ref)
|
||||
PycRef<PycString> PycModule::getIntern(int ref) const
|
||||
{
|
||||
std::list<PycRef<PycString> >::const_iterator it = m_interns.begin();
|
||||
for (int i=0; i<ref; i++, it++) /* move forward to ref */ ;
|
||||
while (ref--)
|
||||
++it;
|
||||
return *it;
|
||||
}
|
||||
|
||||
PycRef<PycObject> PycModule::getRef(int ref) const
|
||||
{
|
||||
std::list<PycRef<PycObject> >::const_iterator it = m_refs.begin();
|
||||
while (ref--)
|
||||
++it;
|
||||
return *it;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue