Initialize SWE-GLib from each class init function
This is to satisfy #8. Also, this makes SWE-GLib available for GLib before 2.36, as gswe_init() also calls g_type_init(), which was necessary before GLib 2.36
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "swe-glib.h"
|
||||
#include "gswe-enumtypes.h"
|
||||
#include "@filename@"
|
||||
|
||||
@@ -31,6 +32,8 @@ GType
|
||||
{
|
||||
static volatile gsize g_define_type_id__volatile = 0;
|
||||
|
||||
gswe_init();
|
||||
|
||||
if (g_once_init_enter(&g_define_type_id__volatile)) {
|
||||
static const G@Type@Value values[] = {
|
||||
/*** END value-header ***/
|
||||
|
Reference in New Issue
Block a user