Update of /cvsroot/pure-data/externals/grill/py/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3748/source
Modified Files: pybuffer.cpp pysymbol.cpp Log Message: fixed rich comparison method in Symbol class fix for OSX small cosmetic fixes enable compiled-only scripts (without .py) small changes for numpy support fix for numpy headers on OS X fix for numpy added xcode 2.4 project added pyext._list and pyext._tuple to convert input lists to Python sequence objects fix numpy et al enable module packages (module/__init__.py[co]), now also for Max
Index: pysymbol.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pysymbol.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pysymbol.cpp 12 Dec 2005 13:55:28 -0000 1.5 --- pysymbol.cpp 20 Jan 2007 14:27:22 -0000 1.6 *************** *** 74,79 **** return PyBool_FromLong(ret); } ! Py_INCREF(Py_NotImplemented); ! return Py_NotImplemented; }
--- 74,79 ---- return PyBool_FromLong(ret); } ! Py_INCREF(Py_NotImplemented); ! return Py_NotImplemented; }
*************** *** 220,226 **** { if(PyType_Ready(&pySymbol_Type) < 0) ! FLEXT_ASSERT(false); ! else ! Py_INCREF(&pySymbol_Type);
// initialize predefined objects --- 220,226 ---- { if(PyType_Ready(&pySymbol_Type) < 0) ! return; ! ! Py_INCREF(&pySymbol_Type);
// initialize predefined objects *************** *** 234,254 ****
! PyObject *pySymbol_FromSymbol(const t_symbol *sym) ! { ! pySymbol *op; ! if(sym == flext::sym__) ! Py_INCREF(op = pySymbol__); ! else if(sym == flext::sym_bang) ! Py_INCREF(op = pySymbol_bang); ! else if(sym == flext::sym_list) ! Py_INCREF(op = pySymbol_list); ! else if(sym == flext::sym_symbol) ! Py_INCREF(op = pySymbol_symbol); ! else if(sym == flext::sym_float) ! Py_INCREF(op = pySymbol_float); ! else if(sym == flext::sym_int) ! Py_INCREF(op = pySymbol_int); ! else ! op = symbol_newsym(sym); ! return (PyObject *)op; ! } --- 234,254 ----
! PyObject *pySymbol_FromSymbol(const t_symbol *sym) ! { ! pySymbol *op; ! if(sym == flext::sym__) ! Py_INCREF(op = pySymbol__); ! else if(sym == flext::sym_bang) ! Py_INCREF(op = pySymbol_bang); ! else if(sym == flext::sym_list) ! Py_INCREF(op = pySymbol_list); ! else if(sym == flext::sym_symbol) ! Py_INCREF(op = pySymbol_symbol); ! else if(sym == flext::sym_float) ! Py_INCREF(op = pySymbol_float); ! else if(sym == flext::sym_int) ! Py_INCREF(op = pySymbol_int); ! else ! op = symbol_newsym(sym); ! return (PyObject *)op; ! }
Index: pybuffer.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pybuffer.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pybuffer.cpp 3 Aug 2006 16:33:37 -0000 1.10 --- pybuffer.cpp 20 Jan 2007 14:27:22 -0000 1.11 *************** *** 1,791 **** ! /* ! ! py/pyext - python script object for PD and Max/MSP ! ! Copyright (c)2002-2005 Thomas Grill (gr@grrrr.org) ! For information on usage and redistribution, and for a DISCLAIMER OF ALL ! WARRANTIES, see the file, "license.txt," in this distribution. ! ! */ ! [...1555 lines suppressed...] ! if(PyErr_Occurred()) ! // catch import error ! PyErr_Clear(); ! else { ! // numarray support ok ! #ifdef PY_NUMARRAY ! numtype = sizeof(t_sample) == 4?tFloat32:tFloat64; ! #else ! numtype = sizeof(t_sample) == 4?PyArray_FLOAT:PyArray_DOUBLE; ! #endif ! post(""); ! post("Python array support enabled"); ! } ! #endif ! ! if(PyType_Ready(&pySamplebuffer_Type) < 0) ! FLEXT_ASSERT(false); ! else ! Py_INCREF(&pySamplebuffer_Type); ! }