Update of /cvsroot/pure-data/externals/grill/py/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9250/source
Modified Files: pyargs.cpp pyprefix.h pysymbol.cpp pysymbol.h Log Message: - a bit more functions for the symbol type - exporting symbol functions corrected argument passing to class methods updated for OSX adjust pd and py files for correct argument passing
Index: pysymbol.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pysymbol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pysymbol.cpp 11 Jan 2005 04:59:27 -0000 1.1 --- pysymbol.cpp 19 Jan 2005 04:58:36 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- */
+ #include "pyprefix.h" #include "pysymbol.h"
Index: pyprefix.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pyprefix.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyprefix.h 11 Jan 2005 04:59:27 -0000 1.1 --- pyprefix.h 19 Jan 2005 04:58:36 -0000 1.2 *************** *** 9,14 **** */
! #ifndef __PREFIX_H ! #define __PREFIX_H
#define FLEXT_ATTRIBUTES 1 --- 9,14 ---- */
! #ifndef __PYPREFIX_H ! #define __PYPREFIX_H
#define FLEXT_ATTRIBUTES 1
Index: pysymbol.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pysymbol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pysymbol.h 11 Jan 2005 04:59:27 -0000 1.1 --- pysymbol.h 19 Jan 2005 04:58:36 -0000 1.2 *************** *** 9,13 **** */
! #include "pyprefix.h"
typedef struct { --- 9,37 ---- */
! #ifndef __PYSYMBOL_H ! #define __PYSYMBOL_H ! ! #include <flext.h> ! ! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) ! #error You need at least flext version 0.5.0 ! #endif ! ! #if FLEXT_OS == FLEXT_OS_MAC ! #include <Python/Python.h> ! #else ! #include <Python.h> ! #endif ! ! ! #ifdef _MSC_VER ! #ifdef PY_EXPORTS ! #define PY_EXPORT __declspec(dllexport) ! #else ! #define PY_EXPORT __declspec(dllimport) ! #endif ! #else ! #define PY_EXPORT ! #endif
typedef struct { *************** *** 17,28 **** } pySymbol;
! extern PyTypeObject pySymbol_Type;
! extern pySymbol *pySymbol__; ! extern pySymbol *pySymbol_bang; ! extern pySymbol *pySymbol_list; ! extern pySymbol *pySymbol_symbol; ! extern pySymbol *pySymbol_float; ! extern pySymbol *pySymbol_int;
--- 41,52 ---- } pySymbol;
! PY_EXPORT extern PyTypeObject pySymbol_Type;
! PY_EXPORT extern pySymbol *pySymbol__; ! PY_EXPORT extern pySymbol *pySymbol_bang; ! PY_EXPORT extern pySymbol *pySymbol_list; ! PY_EXPORT extern pySymbol *pySymbol_symbol; ! PY_EXPORT extern pySymbol *pySymbol_float; ! PY_EXPORT extern pySymbol *pySymbol_int;
*************** *** 31,35 ****
! PyObject *pySymbol_FromSymbol(const t_symbol *sym);
inline const t_symbol *pySymbol_AS_SYMBOL(PyObject *op) --- 55,69 ----
! PY_EXPORT PyObject *pySymbol_FromSymbol(const t_symbol *sym); ! ! inline PyObject *pySymbol_FromString(const char *str) ! { ! return pySymbol_FromSymbol(flext::MakeSymbol(str)); ! } ! ! inline PyObject *pySymbol_FromString(PyObject *str) ! { ! return pySymbol_FromSymbol(flext::MakeSymbol(PyString_AsString(str))); ! }
inline const t_symbol *pySymbol_AS_SYMBOL(PyObject *op) *************** *** 56,57 **** --- 90,92 ---- }
+ #endif
Index: pyargs.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/py/source/pyargs.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pyargs.cpp 11 Jan 2005 04:59:27 -0000 1.11 --- pyargs.cpp 19 Jan 2005 04:58:36 -0000 1.12 *************** *** 52,57 **** int ix; PyObject *tmp; ! if(!withself || argc < (any?1:2)) tmp = pArgs,ix = pix; ! else tmp = PyTuple_New(argc+(any?1:0)),ix = 0;
if(any) --- 52,59 ---- int ix; PyObject *tmp; ! // if(!withself || argc < (any?1:2)) ! tmp = pArgs,ix = pix; ! // else ! // tmp = PyTuple_New(argc+(any?1:0)),ix = 0;
if(any)