diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /lib/ipcomm.cpp | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'lib/ipcomm.cpp')
| -rw-r--r-- | lib/ipcomm.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ipcomm.cpp b/lib/ipcomm.cpp index d845a604..6f65dcae 100644 --- a/lib/ipcomm.cpp +++ b/lib/ipcomm.cpp @@ -3,6 +3,8 @@ #include <QSharedMemory> #include <QSystemSemaphore> +#include "../commons.h" + // Multiple instances: KK1D, 17 Jul 2013 QSharedMemory mem_jt9; @@ -16,17 +18,13 @@ extern "C" { bool detach_jt9_(); bool lock_jt9_(); bool unlock_jt9_(); - char* address_jt9_(); + struct jt9com * address_jt9_(); int size_jt9_(); // Multiple instances: wrapper for QSharedMemory::setKey() bool setkey_jt9_(char* mykey, int mykey_len); bool acquire_jt9_(); bool release_jt9_(); - - extern struct { - char c[10]; - } jt9com_; } bool attach_jt9_() {return mem_jt9.attach();} @@ -34,7 +32,7 @@ bool create_jt9_(int nsize) {return mem_jt9.create(nsize);} bool detach_jt9_() {return mem_jt9.detach();} bool lock_jt9_() {return mem_jt9.lock();} bool unlock_jt9_() {return mem_jt9.unlock();} -char* address_jt9_() {return (char*)mem_jt9.constData();} +struct jt9com * address_jt9_() {return reinterpret_cast<struct jt9com *>(mem_jt9.data());} int size_jt9_() {return (int)mem_jt9.size();} // Multiple instances: |
