1. 29 Apr, 2001 1 commit
    • Tim Janik's avatar
      made hook ids a gulong. · abc5cbbe
      Tim Janik authored
      Sun Apr 29 00:37:34 2001  Tim Janik  <timj@gtk.org>
      
              * ghook.[hc]: made hook ids a gulong.
      
      Sat Apr 28 23:39:42 2001  Tim Janik  <timj@gtk.org>
      
              * gsignal.[hc]: made signal handler and emission hook ids gulongs.
              (signal_handlers_foreach_matched_R): only invoke callback for handlers
              that are not disconnected (id>0).
              (signal_emit_R): prevent invocation of signal handlers during the
              emission they were connected within.
      
              * glib-mkenums: publically installed perl-script to parse C code
              enums and generate descriptions thereof.
              * glib-mkenums.1: assorted man page.
      abc5cbbe
  2. 08 Mar, 2001 1 commit
    • Tim Janik's avatar
      destruction cleanup. there's one ->finalize_hook member in the hooklist · 61733223
      Tim Janik authored
      Thu Mar  8 16:23:34 2001  Tim Janik  <timj@gtk.org>
      
              * ghook.[hc]: destruction cleanup. there's one
              ->finalize_hook member in the hooklist now that gets
              called when a hook should be destroyed, that's it.
              that function is guarranteed to be called only when
              all ref_counts to the hook vanished, thus also when
              the hook is not in call.
      
      Thu Mar  8 16:35:48 2001  Tim Janik  <timj@gtk.org>
      
              * gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
      
              * gsignal.[hc]: fixed accumulator invocation, implemented emission
              hooks. and no, neither of these callbacks are called via a closure,
              language bindings can wrap the accumulator and emission hook
              interface, they already get parameters marshalled into a GValue array.
              (g_signal_connect): removed this function as its C specific, doesn't
              cover the swapped argument, is too close to its broken original
              gtk_signal_connect() and creates demand for _swapped, _after and
              _swapped_after variants <brrr>.
              (g_signal_connectc): convenience macro to connect a C handler
              func with data, like the old g_signal_connect() plus swapped
              argument.
      
              * gtype.h:
              * gboxed.c: added G_TYPE_VALUE boxed type.
      61733223
  3. 26 Jul, 2000 1 commit
  4. 17 Mar, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Sun Mar 14 17:50:35 1999 Tim Janik <timj@gtk.org> · 5f17e39e
      Sebastian Wilhelmi authored
      Wed Mar 17 01:46:28 1999  Tim Janik  <timj@gtk.org>
      
              * merges from glib-1-2:
      
      Sun Mar 14 17:50:35 1999  Tim Janik  <timj@gtk.org>
      
              * gmem.c (g_mem_chunk_*): changed a bunch of g_assert() statements
              to g_return_if_fail().
              (g_mem_profile):
              (g_mem_chunk_print):
              (g_mem_chunk_info): removed some extraneous "\n"s at the end of the log
              messages.
      
              * gtimer.c (g_timer_*): changed a bunch of g_assert() statements
              to g_return_if_fail().
              * grel.c (g_*): changed a bunch of g_assert() statements to
              g_return_if_fail() and added some extra ones to check relation != NULL.
      
      Tue Mar  9 23:25:50 1999  Tim Janik  <timj@gtk.org>
      
              * configure.in: check for working realloc (NULL,).
              * gmem.c (g_realloc): use malloc() for initial allocation on systems
              where realloc(NULL,) will not work (this is the case on SunOS, reported
              by Tom Geiger).
      
      Mon Mar  8 07:42:08 1999  Tim Janik  <timj@gtk.org>
      
              * ghook.c (g_hook_unref): when !hook_list->is_setup, wrap the
              flag around the call to g_hook_free() to avoid spurious
              warnings (happens during destruction phase).
      
      1999-03-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
              * gmem.c: Fixed a stupid cut'n'paste error of mine. Thanks to
              Friedrich Dominicus <Friedrich.Dominicus@inka.de>
      5f17e39e
  5. 24 Feb, 1999 1 commit
  6. 17 Jan, 1999 4 commits
    • Tim Janik's avatar
      added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop · 5c2fb376
      Tim Janik authored
      Sun Jan 17 14:13:52 1999  Tim Janik  <timj@gtk.org>
      
              * glib.h: added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop
              GHookList.hook_destroy function.
      
              * ghook.c (g_hook_destroy_link): don't really call hook_destroy if it
              is G_HOOK_DEFERRED_DESTROY. for the case where we invoke hook->destroy()
              we now clean up the hook completely afterwards, i.e. data, func and
              destroy are immediately set to NULL and hook_free can't play with that
              values anymore.
      
              * gmain.c (g_source_add): set hook_destroy to G_HOOK_DEFERRED_DESTROY,
              instead of using an ugly _noop() hack, this is to avoid an uneccessary
              function invokation. set hook_free to g_source_destroy_func, this way
              we always invoke the destroy notifiers for user_data and source_data
              after execution of dispatch(). thus, g_source_destroy_func() will always
              be called within the main_loop lock (this wasn't really assured
              before), and can release and reaquire the look around destroy notifier
              invokation.
      5c2fb376
    • Tim Janik's avatar
      fix yet another small glitch · 5f52b321
      Tim Janik authored
      5f52b321
    • Tim Janik's avatar
      reentrancy fixups · 37f659ec
      Tim Janik authored
      37f659ec
    • Tim Janik's avatar
      incremented version number to 1.1.13, bin age 0, interface age 0. · 08425ac4
      Tim Janik authored
      Sun Jan 17 05:12:17 1999  Tim Janik  <timj@gtk.org>
      
              * configure.in: incremented version number to 1.1.13, bin age 0,
              interface age 0.
      
              * glib.h: added hook_destroy member to struct _GHookList.
      
              * ghook.c (g_hook_destroy_link): if the hook_list defines a hook_destroy
              function, use that to marshal hook destruction notifiers.
      
              * gmain.c: removed g_source_free_func and added g_source_destroy_func,
              which marshalls the user_data and source_data destructors of sources
              outside of the main_loop lock.
              removed GIdleData struct since its single member callback can be passed
              as source_data directly.
              added a gboolean return value to all g_source_remove* functions,
              indicating whether the source could be removed, because these functions
              don't issue warnings upon unseccessful removals themselves. this way at
              least the caller gets a chance to warn upon failing removals.
              (g_main_iterate): set in_check_or_prepare around calls to check() or
              prepare().
              (g_main_pending): simply return FALSE if called from within check() or
              prepare().
              (g_main_iteration): issue a warning if called from within check() or
              prepare() and bail out with FALSE.
              (g_main_run): likewise.
              (g_source_remove_by_funcs_user_data): new function to remove sources by
              user data and function table.
              (g_idle_remove_by_data): new function to really remove idles only, since
              g_source_remove_by_user_data would remove timeouts or other sources as
              well.
      08425ac4
  7. 02 Jan, 1999 1 commit
    • Tim Janik's avatar
      avoid unneccessary extra hook referencing (the explicit hook referencing · 00e064d2
      Tim Janik authored
      Sat Jan  2 02:20:59 1999  Tim Janik  <timj@gtk.org>
      
              * ghook.c:
              (g_hook_list_invoke):
              (g_hook_list_invoke_check):
              (g_hook_list_marshal_check):
              (g_hook_list_marshal): avoid unneccessary extra hook referencing (the
              explicit hook referencing became unneccessarry with my changes from
              Mon Dec 21 21:48:29 1998).
      
              * gmain.c (g_main_iterate): fixed reference counting leaks with
              premature loop aborts.
      
      Fri Jan  1 22:47:44 1999  Tim Janik  <timj@gtk.org>
      
              * gscanner.c (g_scanner_unexp_token): handle G_TOKEN_IDENTIFIER_NULL
              as G_TOKEN_IDENTIFIER.
      00e064d2
  8. 22 Dec, 1998 1 commit
  9. 21 Dec, 1998 1 commit
    • Tim Janik's avatar
      there was a reference count race for hooks during invocation loops. since · 097c9b17
      Tim Janik authored
      Mon Dec 21 21:48:29 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * gmain.c: there was a reference count race for hooks during invocation
              loops. since all (known) hook loop implementations, do currently start
              out with g_hook_first_valid() and iterate with g_hook_next_valid(),
              g_hook_first_valid() will now return a referenced hook, and
              g_hook_next_valid() will "eat" that, and eventually transfer it to
              the next hook. <sigh> unfortunately this requires g_hook_next_valid()
              to take the hook_list as additional argument.
      
              * gmain.c (g_main_iterate): adjusted callers of g_hook_next_valid().
      097c9b17
  10. 15 Dec, 1998 1 commit
    • Owen Taylor's avatar
      This commit merges the glib-threads branch into the main · 931ea952
      Owen Taylor authored
      branch. See the ChangeLog for details of the changes.
      
      In brief overview:
      
       - The set of threading functions can be set
       - A default implementation is provided in -lgthread
       - All static data structures are locked using these
         functions if g_thread_init() is called.
      931ea952
  11. 30 Nov, 1998 1 commit
  12. 02 Nov, 1998 1 commit
  13. 31 Oct, 1998 1 commit
    • Tim Janik's avatar
      removed old G_ENUM(), G_FLAGS(), G_NV() and G_SV() macros. added macros · e8a920f8
      Tim Janik authored
      Sat Oct 31 05:08:26 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h: removed old G_ENUM(), G_FLAGS(), G_NV() and G_SV() macros.
              added macros G_STRUCT_OFFSET(), G_STRUCT_MEMBER_P() and
              G_STRUCT_MEMBER() for handling structure fields through their offsets.
              (struct _GHookList): added a hook_free function member, that can be used
              to free additional fields in derived hook structures.
              g_hook_free(): if hook_list->hook_free != NULL, call this function prior
              to freeing the hook. (this functionality should have been there in the
              first place, it just got forgotten as an implementation detail).
      e8a920f8
  14. 07 Oct, 1998 1 commit
    • Tim Janik's avatar
      removed the #pragma } statement after extern "C" {. use (c-set-offset · 43cc1dbf
      Tim Janik authored
      Wed Oct  7 05:31:24 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              removed the #pragma } statement after extern "C" {. use
              (c-set-offset 'inextern-lang 0) to fixup emacs cc-mode indentation.
      
              * glib.h:
              * ghook.c: API and code cleanups. changed the G_HOOK_ACTIVE and
              G_HOOK_IN_CALL enum vals to G_HOOK_FLAG_ACTIVE and G_HOOK_FLAG_IN_CALL.
              changed the G_HOOK_IS_ACTIVE() and G_HOOK_IS_IN_CALL() macros to
              G_HOOK_ACTIVE() and G_HOOK_IN_CALL().
              fixed the g_hook_find* functions, so they iterate over non-active
              hooks as well.
              (g_hook_first_valid):
              (g_hook_next_valid): added an extra argument gboolean may_be_in_call,
              which indicates whether G_HOOK_IN_CALL() hooks are considered valid
              or not. these two functions are meant as iterators for the hook list
              invocation, so they need to a) provide functionality to implement
              may_recurse bahaviour and b) only walk active hooks.
      43cc1dbf
  15. 02 Oct, 1998 1 commit
    • Tim Janik's avatar
      properly handle the first valid hook to call, it maybe IN_CALL already. · ba5aabfa
      Tim Janik authored
      Sat Oct  3 01:18:10 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * ghook.c:
              (g_hook_list_invoke):
              (g_hook_list_invoke):
              (g_hook_list_marshal): properly handle the first valid hook to call,
              it maybe IN_CALL already.
              (g_hook_list_marshal): minor name change.
      
      Fri Oct  2 23:21:21 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * ghook.c: renamed GHook.id to GHook.hook_id so we don't get troubles
              with ObjC which reserves "id" as a keyword (Raja R Harinath
              <harinath@cs.umn.edu>).
      ba5aabfa
  16. 30 Sep, 1998 1 commit
    • Tim Janik's avatar
      added ghook.c. · 48adba28
      Tim Janik authored
      Wed Sep 30 10:53:03 1998  Tim Janik  <timj@gtk.org>
      
              * Makefile.am: added ghook.c.
      
              * glib.h:
              * ghook.c: generic callback maintenance functions.
      
              * glib.h: define G_GNUC_UNUSED.
      48adba28