Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-06-16 17:17:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-16 17:17:41 +0400
commit84749aa3ff39af08cdccfea462fb4a6a266ca7b8 (patch)
tree63954fcd3eb073fe8e057974f750c641b6d17bfd /source/blender/python/api2_2x/Sound.c
parent3e490c020324dcd4d7a3a3acd62f48d3fd781afc (diff)
Python API, more METH_VARARGS to METH_O
Diffstat (limited to 'source/blender/python/api2_2x/Sound.c')
-rw-r--r--source/blender/python/api2_2x/Sound.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Sound.c b/source/blender/python/api2_2x/Sound.c
index 350d04e5a63..66da43e6fad 100644
--- a/source/blender/python/api2_2x/Sound.c
+++ b/source/blender/python/api2_2x/Sound.c
@@ -59,7 +59,7 @@
/* Python API function prototypes for the Sound module. */
/*****************************************************************************/
static PyObject *M_Sound_Get( PyObject * self, PyObject * args );
-static PyObject *M_Sound_Load( PyObject * self, PyObject * args );
+static PyObject *M_Sound_Load( PyObject * self, PyObject * value );
/************************************************************************/
/* The following string definitions are used for documentation strings. */
@@ -82,7 +82,7 @@ returns None if not found.";
/*****************************************************************************/
struct PyMethodDef M_Sound_methods[] = {
{"Get", M_Sound_Get, METH_VARARGS, M_Sound_Get_doc},
- {"Load", M_Sound_Load, METH_VARARGS, M_Sound_Load_doc},
+ {"Load", M_Sound_Load, METH_O, M_Sound_Load_doc},
{NULL, NULL, 0, NULL}
};
@@ -265,13 +265,13 @@ static PyObject *M_Sound_Get( PyObject * self, PyObject * args )
/* Description: Receives a string and returns the Sound object */
/* whose filename matches the string. */
/*****************************************************************************/
-static PyObject *M_Sound_Load( PyObject * self, PyObject * args )
+static PyObject *M_Sound_Load( PyObject * self, PyObject * value )
{
- char *fname;
+ char *fname = PyString_AsString(value);
bSound *snd_ptr;
BPy_Sound *snd;
- if( !PyArg_ParseTuple( args, "s", &fname ) )
+ if( !fname )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected string argument" ) );