--- src/pyvorbiscodec.c	Tue May 13 10:17:13 2003
+++ src/pyvorbiscodec.c.new	Mon May 31 11:29:44 2004
@@ -9,6 +9,9 @@
 
 #define MIN(x,y) ((x) < (y) ? (x) : (y))
 
+PyObject *Py_VorbisError2;
+ogg_module_info *modinfo3;
+
 /**************************************************************
                          VorbisDSP Object
 **************************************************************/
@@ -180,9 +183,9 @@
   
   /* Returns a tuple of oggpackets (header, header_comm, header_code) */
   
-  pyheader = modinfo->ogg_packet_from_packet(&header);
-  pyheader_comm = modinfo->ogg_packet_from_packet(&header_comm);
-  pyheader_code = modinfo->ogg_packet_from_packet(&header_code);
+  pyheader = modinfo3->ogg_packet_from_packet(&header);
+  pyheader_comm = modinfo3->ogg_packet_from_packet(&header_comm);
+  pyheader_code = modinfo3->ogg_packet_from_packet(&header_code);
   if (pyheader == NULL || pyheader_comm == NULL || pyheader_code == NULL)
     goto error;
   
@@ -273,18 +276,18 @@
     snprintf(err_msg, sizeof(err_msg), 
 	     "Expected %d strings as arguments; found %d arguments",
 	     channels, PyTuple_Size(args));
-    PyErr_SetString(Py_VorbisError, err_msg);
+    PyErr_SetString(Py_VorbisError2, err_msg);
     return NULL;
   }
 
   len = string_size(args, channels);
   if (len == NON_STRING) {
-    PyErr_SetString(Py_VorbisError, 
+    PyErr_SetString(Py_VorbisError2, 
 		    "All arguments must be strings");
     return NULL;
   }
   if (len == DIFF_LENGTHS) {
-    PyErr_SetString(Py_VorbisError, 
+    PyErr_SetString(Py_VorbisError2, 
 		    "All arguments must have the same length.");
     return NULL;
   }
@@ -340,7 +343,7 @@
     return NULL;
 
   if (num_bytes % sample_width != 0) {
-    PyErr_SetString(Py_VorbisError,
+    PyErr_SetString(Py_VorbisError2,
 		    "Data is not a multiple of (2 * # of channels)");
     return NULL;
   }
@@ -384,12 +387,12 @@
 
   ret = vorbis_bitrate_flushpacket(PY_DSP(self), &op);
   if (ret == 1) 
-    return modinfo->ogg_packet_from_packet(&op);
+    return modinfo3->ogg_packet_from_packet(&op);
   else if (ret == 0) {
     Py_INCREF(Py_None);
     return Py_None;
   } else {
-    PyErr_SetString(Py_VorbisError, "Unknown return code from flushpacket");
+    PyErr_SetString(Py_VorbisError2, "Unknown return code from flushpacket");
     return NULL;
   }
 }
@@ -467,7 +470,7 @@
 
   ret = vorbis_analysis(&b_self->vb, NULL);
   if (ret < 0) {
-    PyErr_SetString(Py_VorbisError, "vorbis_analysis failure");
+    PyErr_SetString(Py_VorbisError2, "vorbis_analysis failure");
     return NULL;
   }
   Py_INCREF(Py_None);
@@ -482,7 +485,7 @@
     return NULL;
   ret = vorbis_bitrate_addblock(PY_BLOCK(self));
   if (ret < 0) {
-    PyErr_SetString(Py_VorbisError, "addblock failed");
+    PyErr_SetString(Py_VorbisError2, "addblock failed");
     return NULL;
   }
   Py_INCREF(Py_None);
