[Bf-blender-cvs] [157cc54ed52] master: Fix T63899: Can't get sound.factory on Windows

Jörg Müller noreply at git.blender.org
Sat Apr 27 00:14:03 CEST 2019


Commit: 157cc54ed52192ef6994bcc6a975c4399503ac25
Author: Jörg Müller
Date:   Sat Apr 27 00:13:43 2019 +0200
Branches: master
https://developer.blender.org/rB157cc54ed52192ef6994bcc6a975c4399503ac25

Fix T63899: Can't get sound.factory on Windows

===================================================================

M	intern/audaspace/intern/AUD_PyInit.cpp

===================================================================

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();



More information about the Bf-blender-cvs mailing list