[Github-comments] [geany/geany] Gi signals (#1038)

Colomban Wendling notifications at xxxxx
Thu Jun 23 12:43:35 UTC 2016


> @@ -3250,6 +3250,7 @@ void scintilla_release_resources(void) {
>  static void *copy_(void *src) { return src; }
>  static void free_(void *doc) { }
>  
> +GEANY_API_SYMBOL
>  GType scnotification_get_type(void) {
>  	static gsize type_id = 0;

It might be because [`g_once_init_leave()`](https://developer.gnome.org/glib/unstable/glib-Threads.html#g-once-init-leave) expects a `gsize` value, and if that API expects a pointer to a `gsize`-sized value, it is a lot safer to use a real `gsize` as the pointer and have the cast happen by value, instead of dereferencing a pointer to a `GType`-sized value as if it was a `gsize`-sized one.

It's kinda odd `g_once_init_*()` API claims a `void*` pointer though, so I don't know.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1038/files/6b5a47d05f575b321ff158044420864ee9e59889#r68226909
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160623/ab64b5ef/attachment.html>


More information about the Github-comments mailing list