<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=793526" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/b4n">@b4n</a>, no the current code works just fine, the hash key is the <a href="https://github.com/geany/geany/blob/97547edb52e34b8f78f44a13548a0fb55baf1a44/src/tagmanager/tm_workspace.c#L383">inode</a>, which is an <code>int</code> stored in the pointer, so <code>g_direct_equal()</code> is correct for the current system.  But it has to be changed to <code>g_str_equal()</code> if the key becomes the filename string.</p>
<p>Originally a list was <a href="https://github.com/geany/geany/blob/d6c16742b769947914b63a3a24e0b1440593d43d/tagmanager/tm_workspace.c#L187">used</a> but then it was <a href="https://github.com/geany/geany/blob/d6c16742b769947914b63a3a24e0b1440593d43d/tagmanager/tm_workspace.c#L201">de-duped</a>, so likely thats why it got changed to a hash but that change is copied from <a href="https://github.com/geany/geany/blob/d3dfe1dd1d7aa96be821ba175624843c65fe970b/ChangeLog#L10">Anjuta</a>, so who knows.</p>
<p>Not sure why duplicates are a problem, TM should handle multiple definitions of the same tagname? <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=793526" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/b4n">@b4n</a> TM-spurtese needed.</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=637990" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bmwiedemann">@bmwiedemann</a> did you try running <code>cpp</code> yourself?  Or you could just <code>cat</code> the files together if you don't want recursive inclusion, thats all Geany is doing internally.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1989#issuecomment-436746861">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ99vWabrLpfAhTel_dn3ahe4XkQ2ks5uszPagaJpZM4YQS08">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ8oBJ8THlWqZRrQCfGDlNZ1Ie68mks5uszPagaJpZM4YQS08.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #1989: @b4n, no the current code works just fine, the hash key is the [inode](https://github.com/geany/geany/blob/97547edb52e34b8f78f44a13548a0fb55baf1a44/src/tagmanager/tm_workspace.c#L383), which is an `int` stored in the pointer, so `g_direct_equal()` is correct for the current system.  But it has to be changed to `g_str_equal()` if the key becomes the filename string.\r\n\r\nOriginally a list was [used](https://github.com/geany/geany/blob/d6c16742b769947914b63a3a24e0b1440593d43d/tagmanager/tm_workspace.c#L187) but then it was [de-duped](https://github.com/geany/geany/blob/d6c16742b769947914b63a3a24e0b1440593d43d/tagmanager/tm_workspace.c#L201), so likely thats why it got changed to a hash but that change is copied from [Anjuta](https://github.com/geany/geany/blob/d3dfe1dd1d7aa96be821ba175624843c65fe970b/ChangeLog#L10), so who knows.\r\n\r\nNot sure why duplicates are a problem, TM should handle multiple definitions of the same tagname? @b4n TM-spurtese needed.\r\n\r\n@bmwiedemann did you try running `cpp` yourself?  Or you could just `cat` the files together if you don't want recursive inclusion, thats all Geany is doing internally."}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1989#issuecomment-436746861"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/1989#issuecomment-436746861",
"url": "https://github.com/geany/geany/pull/1989#issuecomment-436746861",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany] Make geany -g tags output reproducible (#1989)",
"sections": [
{
"text": "",
"activityTitle": "**elextr**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@elextr",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1989,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"geany/geany\",\n\"pullRequestId\": 1989\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany/pull/1989#issuecomment-436746861"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 406924604\n}"
}
],
"themeColor": "26292E"
}
]</script>