Exemplo n.º 1
0
PythonDictionary::PythonDictionary (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a dictionary
}
Exemplo n.º 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());
}
Exemplo n.º 3
0
void
PythonList::AppendItem (const PythonObject &object)
{
    if (m_py_obj && object)
        PyList_Append(m_py_obj, object.GetPythonObject());
}
Exemplo n.º 4
0
void
PythonList::SetItemAtIndex (uint32_t index, const PythonObject & object)
{
    if (m_py_obj && object)
        PyList_SetItem(m_py_obj, index, object.GetPythonObject());
}
Exemplo n.º 5
0
PythonList::PythonList (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a list
}
Exemplo n.º 6
0
PythonInteger::PythonInteger (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a integer type
}
Exemplo n.º 7
0
PythonString::PythonString (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a string
}