I was running into a python crash when running 'eventtest.py'.  Because I started running into it in the audio portion, I finally decided to track it down.  The attached patch fixes the crash I was having.  Although it doesn't print out an error message that is very descriptive.  (App.eventtest should return a value but doesn't)

Also, I'm about 90% done with the audio.  The only thing left to finish is the event at the end of a song.  I'm planning on having it complete by Sunday night.  Which leads to my question.  How is the best way to get this out there.  I can keep submitting in patch form.  I can post a tarball on the web, or I can commit directly to CVS.  Right now I don't have CVS access, but I submitted a request to join the group on Savannah.

Thanks,
Tyler
Index: src/python/python.h
===================================================================
--- src/python/python.h	(revision 2)
+++ src/python/python.h	(working copy)
@@ -267,8 +267,9 @@
     template <> inline
     int retrieve_instance<int, int>(PyObject * pyinstance)
     { 
-        return PyInt_AsLong(pyinstance);
+        int retval =  PyInt_AsLong(pyinstance);
         show_traceback();
+        return retval;
     }
 
     /** 
@@ -281,8 +282,9 @@
     template <> inline
     bool retrieve_instance<bool, bool>(PyObject * pyinstance)
     { 
-        return (bool)PyInt_AsLong(pyinstance);
+        bool retval = (bool)PyInt_AsLong(pyinstance);
         show_traceback();
+        return retval;
     }
 
     /** 
@@ -295,8 +297,9 @@
     template <> inline
     const char * retrieve_instance<const char *, const char *>(PyObject * pyinstance)
     {
-        return PyString_AsString(pyinstance);
+        const char * retval = PyString_AsString(pyinstance);
         show_traceback();
+        return retval;
     }
 
     /** 
@@ -309,8 +312,9 @@
     template <> inline
     std::string retrieve_instance<std::string, std::string>(PyObject * pyinstance)
     { 
-        return std::string(PyString_AsString(pyinstance));
+        const std::string &retval = std::string(PyString_AsString(pyinstance));
         show_traceback();
+        return retval;
     }
     //@}
 
_______________________________________________
Adonthell-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/adonthell-devel

Reply via email to