diff options
| author | Michael Palimaka <kensington@gentoo.org> | 2012-07-12 03:26:57 +1000 |
|---|---|---|
| committer | Michael Palimaka <kensington@gentoo.org> | 2012-07-12 03:26:57 +1000 |
| commit | 4fdfe5d4647b2f536ea2c55404a089e3af7b1946 (patch) | |
| tree | 1b59ca721714414b55728c69e3dd56f92f427b58 | |
| parent | 7e7194224d1e7b0541d50eaeaad5d65e6b29e732 (diff) | |
| download | kde-4fdfe5d4647b2f536ea2c55404a089e3af7b1946.tar.gz kde-4fdfe5d4647b2f536ea2c55404a089e3af7b1946.tar.bz2 kde-4fdfe5d4647b2f536ea2c55404a089e3af7b1946.zip | |
[kde-base/pykde4] Fix problem with plugin not loading due to trailing newlines. Patch by Franz Fellner <alpine.art.de@googlemail.com>.
(Portage version: 2.1.11.5/git/Linux x86_64, unsigned Manifest commit)
| -rw-r--r-- | kde-base/pykde4/files/kpythonpluginfactorywrapper.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c b/kde-base/pykde4/files/kpythonpluginfactorywrapper.c index 3915a0d122b..067c042ef15 100644 --- a/kde-base/pykde4/files/kpythonpluginfactorywrapper.c +++ b/kde-base/pykde4/files/kpythonpluginfactorywrapper.c @@ -34,10 +34,18 @@ static void init() { char buf[VERSION_LEN + 1]; memset(buf, 0, VERSION_LEN + 1); get_python_version(buf); + char *s = buf; + while(*s != '\0') { + if(*s == '\n') { + *s = '\0'; + break; + } + ++s; + } int length = strlen(FORMAT) + strlen(buf) + 1; char *name = malloc(length + 1); snprintf(name, length, FORMAT, buf); - void *handle = dlopen(name, RTLD_NOW); + handle = dlopen(name, RTLD_NOW); free(name); wrapped_qt_plugin_instance = dlsym(handle, "qt_plugin_instance"); } |
