Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > cf6f59be68798bbcbd7abe8a4e574b5c > files > 4

libtunepimp-0.5.3-10mdv2009.1.src.rpm

diff -Naur libtunepimp-0.5.3/lib/plugins.cpp libtunepimp-0.5.3.new/lib/plugins.cpp
--- libtunepimp-0.5.3/lib/plugins.cpp	2006-11-18 11:52:33.000000000 +0100
+++ libtunepimp-0.5.3.new/lib/plugins.cpp	2008-06-13 22:10:44.320195645 +0200
@@ -33,6 +33,8 @@
 #include <dirent.h>
 #include "../libltdl/ltdl.h"
 #include "plugins.h"
+#include <cstdlib>
+#include <cstdio>
 
 #include <map>
 using namespace std;
@@ -103,12 +105,12 @@
        strcat(init_func, "InitPlugin");
 
        /* Opened plugin ok, now locate our entry function */
-       init_function = (Plugin *(*)(void))lt_dlsym((lt_dlhandle_struct *)info.handle, init_func);
+       init_function = (Plugin *(*)(void))lt_dlsym((lt_dlhandle)info.handle, init_func);
        if (init_function == NULL)
        {
            if (printDebugInfo)
                fprintf(stderr, "Cannot find entry point in %s (%s).\n", file, lt_dlerror());
-           lt_dlclose((lt_dlhandle_struct *)info.handle);
+           lt_dlclose((lt_dlhandle)info.handle);
            continue;
        }
 
@@ -116,7 +118,7 @@
        info.methods = (*init_function)();
        if (info.methods == NULL)
        {
-           lt_dlclose((lt_dlhandle_struct *)info.handle);
+           lt_dlclose((lt_dlhandle)info.handle);
            if (printDebugInfo)
                fprintf(stderr, "Cannot retrieve supported methods from %s.\n", file);
            continue;
@@ -150,7 +152,7 @@
                   fprintf(stderr, "  [Plugin %s has already been loaded. "
                        "Skipping.]\n", info.file);
                info.methods->shutdown();
-               lt_dlclose((lt_dlhandle_struct *)info.handle);
+               lt_dlclose((lt_dlhandle)info.handle);
                break;
            }
        }
@@ -173,7 +175,7 @@
        if ((*i).handle)
        {
            (*i).methods->shutdown();
-           lt_dlclose((lt_dlhandle_struct *)(*i).handle);
+           lt_dlclose((lt_dlhandle)(*i).handle);
            (*i).handle = NULL;
        }
    }