[evince/gnome-3-30] libdocument: Add transfer annotation for ev_document_get_info
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-30] libdocument: Add transfer annotation for ev_document_get_info
- Date: Sat, 27 Apr 2019 03:34:01 +0000 (UTC)
commit a81a7b9774a05e5256b2459570713dde4aabcd7a
Author: Dylan McCall <dylan dylanmccall ca>
Date: Thu Apr 4 16:19:26 2019 -0700
libdocument: Add transfer annotation for ev_document_get_info
The GIR annotation currently defaults to transfer-ownership="full",
which results in a double-free when using this function through GIR.
Change this to "transfer none" to let GIR know that it should not free
the returned EvDocumentInfo.
Closes #1125
libdocument/ev-document.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c
index d793fd25..9b2c323f 100644
--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -858,6 +858,14 @@ _ev_document_get_info (EvDocument *document)
return klass->get_info (document);
}
+/**
+ * ev_document_get_info:
+ * @document: a #EvDocument
+ *
+ * Returns the #EvDocumentInfo for the document.
+ *
+ * Returns: (transfer none): a #EvDocumentInfo
+ */
EvDocumentInfo *
ev_document_get_info (EvDocument *document)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]