From 12d8576f4bab14b6da85957f156ee0360ab3446f Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 3 Jan 2008 16:21:04 +0000 Subject: cross-platform fixes enable compiled-only scripts (without .py) use PyGILState_\*() functionality (enabled with PY_USE_GIL) fixes for non-GIL usage improved symbol comparison buffer protocol adapted for Python 2.5 enable module packages (module/__init__.py[co]), now also for Max svn path=/trunk/; revision=9120 --- externals/grill/py/source/modmeth.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'externals/grill/py/source/modmeth.cpp') diff --git a/externals/grill/py/source/modmeth.cpp b/externals/grill/py/source/modmeth.cpp index 039eb6cc..b388f240 100644 --- a/externals/grill/py/source/modmeth.cpp +++ b/externals/grill/py/source/modmeth.cpp @@ -1,11 +1,13 @@ /* - py/pyext - python external object for PD and Max/MSP -Copyright (c)2002-2007 Thomas Grill (gr@grrrr.org) +Copyright (c)2002-2008 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. +$LastChangedRevision: 26 $ +$LastChangedDate: 2008-01-03 17:20:03 +0100 (Thu, 03 Jan 2008) $ +$LastChangedBy: thomas $ */ #include "pybase.h" @@ -38,7 +40,7 @@ PyMethodDef pybase::func_tbl[] = }; const char *pybase::py_doc = - "py/pyext - python external object for PD and Max/MSP, (C)2002-2007 Thomas Grill\n" + "py/pyext - python external object for PD and Max/MSP, (C)2002-2008 Thomas Grill\n" "\n" "This is the pyext module. Available function:\n" "_send(args...): Send a message to a send symbol\n" @@ -115,7 +117,7 @@ PyObject *pybase::py_blocksize(PyObject *self,PyObject *args) PyObject *pybase::py_searchpaths(PyObject *self,PyObject *args) { -#if FLEXT_SYS == FLEXT_SYS_PD && defined(PY_USE_INOFFICIAL) +#if FLEXT_SYS == FLEXT_SYS_PD && defined(PD_DEVEL_VERSION) && defined(PY_USE_INOFFICIAL) PyObject *ret = PyList_New(0); char *dir; for(int i = 0; (dir = namelist_get(sys_searchpath,i)) != NULL; ++i) @@ -129,7 +131,7 @@ PyObject *pybase::py_searchpaths(PyObject *self,PyObject *args) PyObject *pybase::py_helppaths(PyObject *self,PyObject *args) { -#if FLEXT_SYS == FLEXT_SYS_PD && defined(PY_USE_INOFFICIAL) +#if FLEXT_SYS == FLEXT_SYS_PD && defined(PD_DEVEL_VERSION) && defined(PY_USE_INOFFICIAL) PyObject *ret = PyList_New(0); char *dir; for(int i = 0; (dir = namelist_get(sys_helppath,i)) != NULL; ++i) -- cgit v1.2.1