GObjects are nice for language inteop with GI indeed, but they aren't as cheap

That's a good point, it should be cheap because for the symbol tree code, all the TMTags have to be wrapped by GeanySymbol first and it would be best to have the overhead as small as possible. If we wanted, we could change GeanySymbol to something like

typedef struct GeanySymbol
{
	ExternalSymbol *ext;
	TMTag *tag;

	gint refcount;
} GeanySymbol;

where ExternalSymbol would contain all the other members so GeanySymbol with the TMTag "backend" would be smaller and would not have to zero-fill so many members.

GBoxed works for non-C. You just have to add a non-C-friendly allocation/constructor because there's no generic g_boxed_new().

For GeanySymbol, this is hidden behind the two constructors:

GeanySymbol *geany_symbol_new_from_tag(TMTag *tag);
GeanySymbol *geany_symbol_new(gchar *name, gchar *detail, gchar *scope, gchar *file,
	TMParserType lang, glong kind, gulong line, gulong pos, guint icon);

so I believe it should be satisfied already.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3910/c2179365178@github.com>