~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to source/gameengine/Expressions/Value.cpp

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
// Clear all properties
341
341
//
342
342
void CValue::ClearProperties()
343
 
{               
 
343
{
344
344
        // Check if we have any properties
345
345
        if (m_pNamedPropertyArray == NULL)
346
346
                return;
406
406
                std::map<STR_String,CValue*>::iterator it;
407
407
                for (it= m_pNamedPropertyArray->begin(); (it != m_pNamedPropertyArray->end()); it++)
408
408
                {
409
 
                        if (count++==inIndex)
 
409
                        if (count++ == inIndex)
410
410
                        {
411
411
                                result = (*it).second;
412
412
                                break;
530
530
        { NULL }        //Sentinel
531
531
};
532
532
 
533
 
PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef)
 
533
PyObject *CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF *attrdef)
534
534
{
535
535
        CValue * self = static_cast<CValue *> (self_v);
536
536
        return PyUnicode_From_STR_String(self->GetName());
537
537
}
538
538
 
539
 
CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix)
 
539
CValue* CValue::ConvertPythonToValue(PyObject *pyobj, const char *error_prefix)
540
540
{
541
541
 
542
542
        CValue* vallie = NULL;
551
551
                Py_ssize_t numitems = PyList_GET_SIZE(pyobj);
552
552
                for (i=0;i<numitems;i++)
553
553
                {
554
 
                        PyObject* listitem = PyList_GetItem(pyobj,i); /* borrowed ref */
 
554
                        PyObject *listitem = PyList_GetItem(pyobj,i); /* borrowed ref */
555
555
                        CValue* listitemval = ConvertPythonToValue(listitem, error_prefix);
556
556
                        if (listitemval)
557
557
                        {
597
597
 
598
598
}
599
599
 
600
 
PyObject* CValue::ConvertKeysToPython(void)
 
600
PyObject *CValue::ConvertKeysToPython(void)
601
601
{
602
602
        if (m_pNamedPropertyArray)
603
603
        {
636
636
void CValue::SetValue(CValue* newval)
637
637
638
638
        // no one should get here
639
 
        assertd(newval->GetNumber() == 10121969);       
 
639
        assertd(newval->GetNumber() == 10121969);
640
640
}