diff --git a/intern/audaspace/intern/AUD_PyInit.cpp b/intern/audaspace/intern/AUD_PyInit.cpp index b65d2740f32..f184f61f4ae 100644 --- a/intern/audaspace/intern/AUD_PyInit.cpp +++ b/intern/audaspace/intern/AUD_PyInit.cpp @@ -34,11 +34,11 @@ extern void *BKE_sound_get_factory(void *sound); static PyObject *AUD_getSoundFromPointer(PyObject *self, PyObject *args) { - long int lptr; + PyObject* lptr = NULL; - if (PyArg_Parse(args, "l:_sound_from_pointer", &lptr)) { + if (PyArg_Parse(args, "O:_sound_from_pointer", &lptr)) { if (lptr) { - AUD_Sound *sound = BKE_sound_get_factory((void *)lptr); + AUD_Sound* sound = BKE_sound_get_factory(PyLong_AsVoidPtr(lptr)); if (sound) { Sound *obj = (Sound *)Sound_empty();