mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
Revert unauthorized changes.
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com> * gmain.[ch]: Revert unauthorized changes.
This commit is contained in:
parent
8f7579774c
commit
70a7a7654e
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
@ -1,3 +1,7 @@
|
||||
Tue Dec 12 15:18:10 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gmain.[ch]: Revert unauthorized changes.
|
||||
|
||||
2000-12-12 Elliot Lee <sopwith@redhat.com>
|
||||
|
||||
* gmain.c, gmain.h (g_main_context_new, g_main_context_destroy):
|
||||
|
57
glib/gmain.c
57
glib/gmain.c
@ -485,9 +485,9 @@ g_poll (GPollFD *fds,
|
||||
|
||||
#endif /* !HAVE_POLL */
|
||||
|
||||
/* Called to clean up, usually when a thread terminates
|
||||
/* Called to clean up when a thread terminates
|
||||
*/
|
||||
void
|
||||
static void
|
||||
g_main_context_destroy (GMainContext *context)
|
||||
{
|
||||
GSource *source;
|
||||
@ -528,19 +528,30 @@ g_main_context_destroy (GMainContext *context)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_context_new:
|
||||
* @thread: a #GThread (may be NULL)
|
||||
* g_main_context_get:
|
||||
* @thread: a #GThread
|
||||
*
|
||||
* This will create a main-loop context. The context will need to be destroyed
|
||||
* via g_main_context_destroy.
|
||||
* Retrieves the main loop context for a particular thread. This
|
||||
* will create the main context for the thread if none previously
|
||||
* existed. The context will exist until the thread terminates.
|
||||
*
|
||||
* Return value: a new main loop context.
|
||||
* Return value: the main loop context for @thread.
|
||||
**/
|
||||
GMainContext *
|
||||
g_main_context_new(GThread *thread)
|
||||
g_main_context_get (GThread *thread)
|
||||
{
|
||||
static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
|
||||
GMainContext *context;
|
||||
|
||||
g_return_val_if_fail (thread != NULL, NULL);
|
||||
|
||||
if (g_thread_supported ())
|
||||
context = g_static_private_get_for_thread (&private_key, thread);
|
||||
else
|
||||
context = default_main_context;
|
||||
|
||||
if (!context)
|
||||
{
|
||||
context = g_new0 (GMainContext, 1);
|
||||
|
||||
#ifdef G_THREADS_ENABLED
|
||||
@ -591,36 +602,6 @@ g_main_context_new(GThread *thread)
|
||||
}
|
||||
#endif
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_context_get:
|
||||
* @thread: a #GThread
|
||||
*
|
||||
* Retrieves the main loop context for a particular thread. This
|
||||
* will create the main context for the thread if none previously
|
||||
* existed. The context will exist until the thread terminates.
|
||||
*
|
||||
* Return value: the main loop context for @thread.
|
||||
**/
|
||||
GMainContext *
|
||||
g_main_context_get (GThread *thread)
|
||||
{
|
||||
static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
|
||||
GMainContext *context;
|
||||
|
||||
g_return_val_if_fail (thread != NULL, NULL);
|
||||
|
||||
if (g_thread_supported ())
|
||||
context = g_static_private_get_for_thread (&private_key, thread);
|
||||
else
|
||||
context = default_main_context;
|
||||
|
||||
if (!context)
|
||||
{
|
||||
context = g_main_context_new (thread);
|
||||
|
||||
if (g_thread_supported ())
|
||||
g_static_private_set_for_thread (&private_key, thread,
|
||||
context,
|
||||
|
@ -143,9 +143,6 @@ GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *conte
|
||||
|
||||
/* Low level functions for implementing custom main loops.
|
||||
*/
|
||||
GMainContext *g_main_context_new (GThread *thread);
|
||||
void g_main_context_destroy (GMainContext *context);
|
||||
|
||||
gboolean g_main_context_prepare (GMainContext *context,
|
||||
gint *priority);
|
||||
gint g_main_context_query (GMainContext *context,
|
||||
|
57
gmain.c
57
gmain.c
@ -485,9 +485,9 @@ g_poll (GPollFD *fds,
|
||||
|
||||
#endif /* !HAVE_POLL */
|
||||
|
||||
/* Called to clean up, usually when a thread terminates
|
||||
/* Called to clean up when a thread terminates
|
||||
*/
|
||||
void
|
||||
static void
|
||||
g_main_context_destroy (GMainContext *context)
|
||||
{
|
||||
GSource *source;
|
||||
@ -528,19 +528,30 @@ g_main_context_destroy (GMainContext *context)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_context_new:
|
||||
* @thread: a #GThread (may be NULL)
|
||||
* g_main_context_get:
|
||||
* @thread: a #GThread
|
||||
*
|
||||
* This will create a main-loop context. The context will need to be destroyed
|
||||
* via g_main_context_destroy.
|
||||
* Retrieves the main loop context for a particular thread. This
|
||||
* will create the main context for the thread if none previously
|
||||
* existed. The context will exist until the thread terminates.
|
||||
*
|
||||
* Return value: a new main loop context.
|
||||
* Return value: the main loop context for @thread.
|
||||
**/
|
||||
GMainContext *
|
||||
g_main_context_new(GThread *thread)
|
||||
g_main_context_get (GThread *thread)
|
||||
{
|
||||
static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
|
||||
GMainContext *context;
|
||||
|
||||
g_return_val_if_fail (thread != NULL, NULL);
|
||||
|
||||
if (g_thread_supported ())
|
||||
context = g_static_private_get_for_thread (&private_key, thread);
|
||||
else
|
||||
context = default_main_context;
|
||||
|
||||
if (!context)
|
||||
{
|
||||
context = g_new0 (GMainContext, 1);
|
||||
|
||||
#ifdef G_THREADS_ENABLED
|
||||
@ -591,36 +602,6 @@ g_main_context_new(GThread *thread)
|
||||
}
|
||||
#endif
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_main_context_get:
|
||||
* @thread: a #GThread
|
||||
*
|
||||
* Retrieves the main loop context for a particular thread. This
|
||||
* will create the main context for the thread if none previously
|
||||
* existed. The context will exist until the thread terminates.
|
||||
*
|
||||
* Return value: the main loop context for @thread.
|
||||
**/
|
||||
GMainContext *
|
||||
g_main_context_get (GThread *thread)
|
||||
{
|
||||
static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
|
||||
GMainContext *context;
|
||||
|
||||
g_return_val_if_fail (thread != NULL, NULL);
|
||||
|
||||
if (g_thread_supported ())
|
||||
context = g_static_private_get_for_thread (&private_key, thread);
|
||||
else
|
||||
context = default_main_context;
|
||||
|
||||
if (!context)
|
||||
{
|
||||
context = g_main_context_new (thread);
|
||||
|
||||
if (g_thread_supported ())
|
||||
g_static_private_set_for_thread (&private_key, thread,
|
||||
context,
|
||||
|
3
gmain.h
3
gmain.h
@ -143,9 +143,6 @@ GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *conte
|
||||
|
||||
/* Low level functions for implementing custom main loops.
|
||||
*/
|
||||
GMainContext *g_main_context_new (GThread *thread);
|
||||
void g_main_context_destroy (GMainContext *context);
|
||||
|
||||
gboolean g_main_context_prepare (GMainContext *context,
|
||||
gint *priority);
|
||||
gint g_main_context_query (GMainContext *context,
|
||||
|
Loading…
Reference in New Issue
Block a user