2005-12-30 Alp Toker <alp@atoker.com>

* Thread.cs: Add GLib.Thread.Supported, should be checked to avoid doing
  Thread.Init() twice (Mono runtime initialises GLib threads itself, MS
  runtime doesn't)
  * glue/thread.c: g_thread_supported() is a macro, so needs glue
  * glue/Makefile.am:
  * glue/makefile.win32: Update makefiles with new glue file.


svn path=/trunk/gtk-sharp/; revision=54926
This commit is contained in:
Alp Toker 2005-12-30 12:14:59 +00:00
parent 48883136c5
commit 21cd2dfc14
5 changed files with 52 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2005-12-30 Alp Toker <alp@atoker.com>
* Thread.cs: Add GLib.Thread.Supported, should be checked to avoid doing
Thread.Init() twice (Mono runtime initialises GLib threads itself, MS
runtime doesn't)
* glue/thread.c: g_thread_supported() is a macro, so needs glue
* glue/Makefile.am:
* glue/makefile.win32: Update makefiles with new glue file.
2005-12-21 Lluis Sanchez Gual <lluis@novell.com>
* generator/FieldBase.cs: Properly convert marshalled value

View file

@ -35,5 +35,15 @@ namespace GLib
{
g_thread_init (IntPtr.Zero);
}
[DllImport("glibsharpglue-2")]
static extern bool glibsharp_g_thread_supported ();
public static bool Supported
{
get {
return glibsharp_g_thread_supported ();
}
}
}
}

View file

@ -10,7 +10,8 @@ libglibsharpglue_2_la_SOURCES = \
type.c \
unichar.c \
value.c \
valuearray.c
valuearray.c \
thread.c
# Adding a new glue file?
# Please remember to update makefile.win32

View file

@ -12,6 +12,7 @@ GLUE_OBJS = \
unichar.o \
value.o \
valuearray.o \
thread.o \
win32dll.o
all: glibsharpglue-2.dll

30
glib/glue/thread.c Normal file
View file

@ -0,0 +1,30 @@
/* list.c : Glue to access fields in GList.
*
* Author: Alp Toker <alp@atoker.com>
*
* Copyright (c) 2005 Alp Toker
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the Lesser GNU General
* Public License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <glib/gthread.h>
gboolean
glibsharp_g_thread_supported ()
{
return g_thread_supported ();
}