[Geany-Devel] Segmentation fault when auto-close plug-in is enable [patch]

Thomas Martitz thomas.martitz at xxxxx
Thu Oct 24 07:23:12 UTC 2013


Am 24.10.2013 04:09, schrieb Matthew Brush:
> On 13-10-23 11:36 AM, Thomas Martitz wrote:
>> [snip]
>
> Regarding that pattern we discussed previously and used in this 
> AutoClose code for attaching data to a document, I'd be interested 
> whether you or anyone thinks this branch (last/top two commits) would 
> be useful to plugins:
>
> https://github.com/codebrainz/geany/commits/document-datalist
>
> IMO it'd be better to make GeanyDocument an actual GObject and get the 
> data lists for "free", but at least this is sort of a step in the same 
> direction.
>

I agree with that.

I also agree with your general idea of per-document data lists. However, 
I'm not seeing the point of the new code you added because each doc has 
already a ScintillaObject, which is a GObject. I would suggest that the 
document_set_data() and friends wrap around 
g_object_set_data(doc->editor->sci). This way things are prepared for 
when GeanyDocument becomes a GObject but without the need to duplicate 
the glib interface in Geany.

Unless I missed anything that requires the datalist in GeanyDocument 
directly?

Best regards.


More information about the Devel mailing list