aboutsummaryrefslogtreecommitdiff
path: root/gpgme-vala/src
diff options
context:
space:
mode:
Diffstat (limited to 'gpgme-vala/src')
-rw-r--r--gpgme-vala/src/fix.c3
-rw-r--r--gpgme-vala/src/fix.h8
-rw-r--r--gpgme-vala/src/gpgme_fix.c12
-rw-r--r--gpgme-vala/src/gpgme_fix.h12
-rw-r--r--gpgme-vala/src/gpgme_helper.vala (renamed from gpgme-vala/src/gpgme-helper.vala)3
5 files changed, 25 insertions, 13 deletions
diff --git a/gpgme-vala/src/fix.c b/gpgme-vala/src/fix.c
deleted file mode 100644
index 76aff720..00000000
--- a/gpgme-vala/src/fix.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <fix.h>
-
-static GRecMutex gpgme_global_mutex = {0};
diff --git a/gpgme-vala/src/fix.h b/gpgme-vala/src/fix.h
deleted file mode 100644
index 15ecd3ac..00000000
--- a/gpgme-vala/src/fix.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef GPGME_FIX
-#define GPGME_FIX 1
-
-#include <glib.h>
-
-static GRecMutex gpgme_global_mutex;
-
-#endif \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme_fix.c b/gpgme-vala/src/gpgme_fix.c
new file mode 100644
index 00000000..2bc139e9
--- /dev/null
+++ b/gpgme-vala/src/gpgme_fix.c
@@ -0,0 +1,12 @@
+#include <gpgme_fix.h>
+
+static GRecMutex gpgme_global_mutex = {0};
+
+gpgme_key_t gpgme_key_ref_vapi (gpgme_key_t key) {
+ gpgme_key_ref(key);
+ return key;
+}
+gpgme_key_t gpgme_key_unref_vapi (gpgme_key_t key) {
+ gpgme_key_unref(key);
+ return key;
+} \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme_fix.h b/gpgme-vala/src/gpgme_fix.h
new file mode 100644
index 00000000..3daa7db0
--- /dev/null
+++ b/gpgme-vala/src/gpgme_fix.h
@@ -0,0 +1,12 @@
+#ifndef GPGME_FIX
+#define GPGME_FIX 1
+
+#include <glib.h>
+#include <gpgme.h>
+
+static GRecMutex gpgme_global_mutex;
+
+gpgme_key_t gpgme_key_ref_vapi (gpgme_key_t key);
+gpgme_key_t gpgme_key_unref_vapi (gpgme_key_t key);
+
+#endif \ No newline at end of file
diff --git a/gpgme-vala/src/gpgme-helper.vala b/gpgme-vala/src/gpgme_helper.vala
index d2f3f7e6..2a27ba3e 100644
--- a/gpgme-vala/src/gpgme-helper.vala
+++ b/gpgme-vala/src/gpgme_helper.vala
@@ -58,8 +58,7 @@ public static Gee.List<Key> get_keylist(string? pattern = null, bool secret_only
keys.add(key);
}
} catch (Error e) {
-// if (e.message != GPGError.ErrorCode.EOF.to_string()) throw e;
- if (e.message != "EOF") throw e;
+ if (e.code != GPGError.ErrorCode.EOF) throw e;
}
return keys;
}