• Thomas Martitz's avatar
    plugins: separate geany_plugin_set_data() dual-use · 437837d3
    Thomas Martitz yazdı
    It was found that because geany_plugin_set_data() could be used by both
    plugin's init() and geany_load_module(), that it introduced some uncertainty
    as to when to call the free_func. init() callers might expect the call
    around the same time as cleanup() is called, while geany_load_module()
    callers expected the call at module unload time.
    
    It was indeed called at module unload time. But that means that init() callers
    cannot call it again reliably after in a init()->cleanup()->init() flow (when
    toggling the plugin) without fully unloading the plugin (which is what we do
    currently but that's we would want to change).
    
    With the separation we can actually destroy the data depending on where
    it was set and do everything unambigiously.
    437837d3
pluginutils.c 18.3 KB