<p><a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> you could use the hated foreach macro then.</p>

<p>There is an argument to be made that given the semantics of the pointers in <code>documents_array</code> could be dangerous, since they can point to differing documents during their lifetime, it might be better to remove the array from the API instead, and leave the recommended <code>document_find_by_id()</code> as the only access.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/964#issuecomment-196136269">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJzwS0Vu5q6VUmlzWqSTIMA08sJEzks5ptOcKgaJpZM4HvvHU.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/964#issuecomment-196136269"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>