~diresu/blender/blender-command-port

« back to all changes in this revision

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

  • Committer: Dietrich Bollmann
  • Date: 2009-07-26 14:27:44 UTC
  • mfrom: (184.1.1008)
  • Revision ID: dietrich@formgames.org-20090726142744-75hivjratygfz7q3
Update to state of blender repository from 2009-07-26 revision 21911 (launchpad: 1192).

Show diffs side-by-side

added added

removed removed

Lines of Context:
725
725
        return pylist;
726
726
}
727
727
 
728
 
/*
729
 
PyObject*       CValue::PyMake(PyObject* ignored,PyObject* args)
730
 
{
731
 
 
732
 
        //if (!PyArg_ParseTuple(args,"s:make",&name)) return NULL;
733
 
        Py_RETURN_NONE;//new CValue();
734
 
}
735
 
*/
736
 
 
737
 
#if (PY_VERSION_HEX >= 0x03000000)
738
 
static struct PyModuleDef CValue_module_def = {
739
 
        {}, /* m_base */
740
 
        "CValue",  /* m_name */
741
 
        0,  /* m_doc */
742
 
        0,  /* m_size */
743
 
        CValueMethods,  /* m_methods */
744
 
        0,  /* m_reload */
745
 
        0,  /* m_traverse */
746
 
        0,  /* m_clear */
747
 
        0,  /* m_free */
748
 
};
749
 
#endif
750
 
 
751
 
extern "C" {
752
 
        void initCValue(void)
753
 
        {
754
 
                PyObject *m;
755
 
                /* Use existing module where possible
756
 
                 * be careful not to init any runtime vars after this */
757
 
                m = PyImport_ImportModule( "CValue" );
758
 
                if(m) {
759
 
                        Py_DECREF(m);
760
 
                        //return m;
761
 
                }
762
 
                else {
763
 
                        PyErr_Clear();
764
 
                
765
 
#if (PY_VERSION_HEX >= 0x03000000)
766
 
                        PyModule_Create(&CValue_module_def);
767
 
#else
768
 
                        Py_InitModule("CValue",CValueMethods);
769
 
#endif
770
 
                }
771
 
        }
772
 
}
773
 
 
774
 
 
775
 
 
776
728
#endif //NO_EXP_PYTHON_EMBEDDING
777
729
 
778
730
///////////////////////////////////////////////////////////////////////////////////////////////