<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821#c24">Comment # 24</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821">bug 64821</a>
from <span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=86682" name="attach_86682" title="[PATCH v8 09/15] glib: Private function _poppler_link_mapping_new_from_annot_link()">attachment 86682</a> <a href="attachment.cgi?id=86682&action=edit" title="[PATCH v8 09/15] glib: Private function _poppler_link_mapping_new_from_annot_link()">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=64821&attachment=86682'>[review]</a>
[PATCH v8 09/15] glib: Private function
_poppler_link_mapping_new_from_annot_link()
Review of <span class=""><a href="attachment.cgi?id=86682" name="attach_86682" title="[PATCH v8 09/15] glib: Private function _poppler_link_mapping_new_from_annot_link()">attachment 86682</a> <a href="attachment.cgi?id=86682&action=edit" title="[PATCH v8 09/15] glib: Private function _poppler_link_mapping_new_from_annot_link()">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=64821&attachment=86682'>[review]</a>:
-----------------------------------------------------------------
::: glib/poppler-page.cc
@@ +1158,5 @@
<span class="quote">> + PopplerLinkMapping *mapping;
> + double width, height;
> +
> + g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
> + g_return_val_if_fail (link != NULL, NULL);</span >
Do not use g_return macros in private methods, This is called only internally.
@@ +1160,5 @@
<span class="quote">> +
> + g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
> + g_return_val_if_fail (link != NULL, NULL);
> +
> + g_assert (page_num >= 0);</span >
This is impossible to fail, it's called from a PopplerPage passing its index.
@@ +1161,5 @@
<span class="quote">> + g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
> + g_return_val_if_fail (link != NULL, NULL);
> +
> + g_assert (page_num >= 0);
> + g_assert (page_num < poppler_document_get_n_pages (document));</span >
Ditto.
@@ +1242,4 @@
<span class="quote">> /* Create the mapping */
> + PopplerLinkMapping *mapping = _poppler_link_mapping_new_from_annot_link (page->document,
> + page->index,
> + links->getLink (i));</span >
Better split this in two lines.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>