Пример #1
0
PythonDictionary::PythonDictionary (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a dictionary
}
Пример #2
0
void
PythonDictionary::SetItemForKey (const PythonString &key, const PythonObject &value)
{
    if (m_py_obj && key && value)
        PyDict_SetItem(m_py_obj, key.GetPythonObject(), value.GetPythonObject());
}
Пример #3
0
void
PythonList::AppendItem (const PythonObject &object)
{
    if (m_py_obj && object)
        PyList_Append(m_py_obj, object.GetPythonObject());
}
Пример #4
0
void
PythonList::SetItemAtIndex (uint32_t index, const PythonObject & object)
{
    if (m_py_obj && object)
        PyList_SetItem(m_py_obj, index, object.GetPythonObject());
}
Пример #5
0
PythonList::PythonList (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a list
}
Пример #6
0
PythonInteger::PythonInteger (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a integer type
}
Пример #7
0
PythonString::PythonString (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a string
}