@cwendling commented on this pull request.


> + */
+#define CALL_PROVIDED(f, doc, ext)                                             
                                                \
+       G_STMT_START {                                                          
                                                                \
+               for (GList *node = all_extensions; node; node = node->next)     
                        \
+               {                                                               
                                                                                
\
+                       PluginExtensionEntry *entry = node->data;               
                                        \
+                                                                               
                                                                                
\
+                       if (entry->extension->f && entry->extension->f(doc, 
entry->data))       \
+                               return (ext) ? entry->extension == (ext) : 
TRUE;                                \
+                                                                               
                                                                                
\
+                       if ((ext) && entry->extension == (ext))                 
                                        \
+                               return FALSE;                                   
                                                                \
+               }                                                               
                                                                                
\
+               return FALSE;                                                   
                                                                \
+       } G_STMT_END
+

> But as you say, for now its not critical, but what would be a Geany 
> discussion without a little premature optimisation 😁?

Hehe :grin: But really here I think it's best to keep it a bit simpler.  If 
this *really* becomes an issue, I'm sure you'll come up with an optimized 
implementation :smile: 
It shouldn't have to change the interface as well, so it can wait.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#discussion_r1651464856
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3849/review/[email protected]>

Reply via email to