@elextr 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
+

True, I omitted that Geany will still walk the per extension list until it 
finds an extension that accepts its request, but at least its only walking a 
list of the extensions that offer that feature, I would expect most extensions 
(other than LSP) will only offer one or two features.

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

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

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

Reply via email to