[pulseaudio-commits] r1573 - in /branches/lennart/src/pulsecore: sink.c source.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Aug 4 17:08:28 PDT 2007


Author: lennart
Date: Sun Aug  5 02:08:27 2007
New Revision: 1573

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1573&root=3Dpulseaudio&vi=
ew=3Drev
Log:
typesafe casts

Modified:
    branches/lennart/src/pulsecore/sink.c
    branches/lennart/src/pulsecore/source.c

Modified: branches/lennart/src/pulsecore/sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sink.c?rev=3D1573&root=3Dpulseaudio&r1=3D1572&r2=3D1573&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/sink.c (original)
+++ branches/lennart/src/pulsecore/sink.c Sun Aug  5 02:08:27 2007
@@ -667,7 +667,7 @@
     switch ((pa_sink_message_t) code) {
         =

         case PA_SINK_MESSAGE_ADD_INPUT: {
-            pa_sink_input *i =3D userdata;
+            pa_sink_input *i =3D PA_SINK_INPUT(userdata);
             pa_hashmap_put(s->thread_info.inputs, PA_UINT32_TO_PTR(i->inde=
x), pa_sink_input_ref(i));
 =

             /* Since the caller sleeps in pa_sink_input_put(), we can
@@ -690,7 +690,7 @@
         }
 =

         case PA_SINK_MESSAGE_REMOVE_INPUT: {
-            pa_sink_input *i =3D userdata;
+            pa_sink_input *i =3D PA_SINK_INPUT(userdata);
 =

             /* Since the caller sleeps in pa_sink_input_disconnect(),
              * we can safely access data outside of thread_info even

Modified: branches/lennart/src/pulsecore/source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
source.c?rev=3D1573&root=3Dpulseaudio&r1=3D1572&r2=3D1573&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/source.c (original)
+++ branches/lennart/src/pulsecore/source.c Sun Aug  5 02:08:27 2007
@@ -390,13 +390,13 @@
 =

     switch ((pa_source_message_t) code) {
         case PA_SOURCE_MESSAGE_ADD_OUTPUT: {
-            pa_source_output *o =3D userdata;
+            pa_source_output *o =3D PA_SOURCE_OUTPUT(userdata);
             pa_hashmap_put(s->thread_info.outputs, PA_UINT32_TO_PTR(o->ind=
ex), pa_source_output_ref(o));
             return 0;
         }
 =

         case PA_SOURCE_MESSAGE_REMOVE_OUTPUT: {
-            pa_source_output *o =3D userdata;
+            pa_source_output *o =3D PA_SOURCE_OUTPUT(userdata);
             if (pa_hashmap_remove(s->thread_info.outputs, PA_UINT32_TO_PTR=
(o->index)))
                 pa_source_output_unref(o);
             =





More information about the pulseaudio-commits mailing list