[evince/1125-annotation-for-ev_document_get_info] libdocument: Add transfer annotation for ev_document_get_info
- From: Jason Crain <jcrain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/1125-annotation-for-ev_document_get_info] libdocument: Add transfer annotation for ev_document_get_info
- Date: Sun, 14 Apr 2019 14:26:06 +0000 (UTC)
commit 0a0897ab64207e43d08e64a2825ba193a960d037
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]