Blame docs/reference/glib/html/glib-changes.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>Changes to GLib: GLib Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GLib Reference Manual">
Packit ae235b
<link rel="up" href="glib.html" title="GLib Overview">
Packit ae235b
<link rel="prev" href="glib-running.html" title="Running GLib Applications">
Packit ae235b
<link rel="next" href="glib-resources.html" title="Mailing lists and bug reports">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Changes to GLib

Packit ae235b

Changes to GLib —

Packit ae235b
Incompatible changes made between successing versions of GLib
Packit ae235b

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Incompatible changes from 2.0 to 2.2

Packit ae235b
Packit ae235b

Packit ae235b
GLib changed the seeding algorithm for the pseudo-random number
Packit ae235b
generator Mersenne Twister, as used by GRand
Packit ae235b
and GRandom. This was necessary, because some
Packit ae235b
seeds would yield very bad pseudo-random streams. Also the
Packit ae235b
pseudo-random integers generated by
Packit ae235b
g_rand*_int_range() will have a
Packit ae235b
slightly better equal distribution with the new version of GLib.
Packit ae235b

Packit ae235b

Packit ae235b
Further information can be found at the website of the Mersenne
Packit ae235b
Twister random number generator at http://www.math.keio.ac.jp/~matumoto/emt.html.
Packit ae235b

Packit ae235b

Packit ae235b
The original seeding and generation algorithms, as found in GLib
Packit ae235b
2.0.x, can be used instead of the new ones by setting the environment
Packit ae235b
variable G_RANDOM_VERSION to the value of '2.0'. Use
Packit ae235b
the GLib-2.0 algorithms only if you have sequences of numbers generated
Packit ae235b
with Glib-2.0 that you need to reproduce exactly.  
Packit ae235b

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Incompatible changes from 1.2 to 2.0

Packit ae235b
    Packit ae235b
  • Packit ae235b

    Packit ae235b
    The event loop functionality GMain has extensively 
    Packit ae235b
    been revised to support multiple separate main loops in separate threads. 
    Packit ae235b
    All sources (timeouts, idle functions, etc.) are associated with a 
    Packit ae235b
    GMainContext.
    Packit ae235b

    Packit ae235b

    Packit ae235b
    Compatibility functions exist so that most application code dealing with
    Packit ae235b
    the main loop will continue to work. However, code that creates new custom 
    Packit ae235b
    types of sources will require modification.
    Packit ae235b

    Packit ae235b

    Packit ae235b
    The main changes here are:
    Packit ae235b
    Packit ae235b
      

    Packit ae235b
      Packit ae235b
    • Packit ae235b
         Sources are now exposed as GSource *, rather than simply as 
      Packit ae235b
         numeric ids.
      Packit ae235b
        

      Packit ae235b
    • Packit ae235b
         New types of sources are created by structure "derivation" from 
      Packit ae235b
         GSource, so the source_data 
      Packit ae235b
         parameter to the GSource virtual functions has been
      Packit ae235b
         replaced with a GSource *.
      Packit ae235b
        

      Packit ae235b
    • Packit ae235b
         Sources are first created, then later added to a specific 
      Packit ae235b
         GMainContext. 
      Packit ae235b
        

      Packit ae235b
    • Packit ae235b
         Dispatching has been modified so both the callback and data are passed
      Packit ae235b
         in to the dispatch() virtual function.
      Packit ae235b
        

      Packit ae235b
      Packit ae235b

      Packit ae235b
        To go along with this change, the vtable for 
      Packit ae235b
        GIOChannel has changed and
      Packit ae235b
        add_watch() has been replaced by 
      Packit ae235b
        create_watch().
      Packit ae235b

      Packit ae235b
      Packit ae235b
    • Packit ae235b

      Packit ae235b
      g_list_foreach() and 
      Packit ae235b
      g_slist_foreach() have been changed so they
      Packit ae235b
      are now safe against removal of the current item, not the next item.
      Packit ae235b

      Packit ae235b

      Packit ae235b
      It's not recommended to mutate the list in the callback to these
      Packit ae235b
      functions in any case.
      Packit ae235b

      Packit ae235b
      Packit ae235b
    • Packit ae235b
      GDate now works in UTF-8, not in the current locale. 
      Packit ae235b
      If you want to use it with the encoding of the locale, you need to convert 
      Packit ae235b
      strings using g_locale_to_utf8() first.
      Packit ae235b

      Packit ae235b
    • Packit ae235b

      Packit ae235b
      g_strsplit() has been fixed to:
      Packit ae235b
      Packit ae235b
        

      Packit ae235b
        Packit ae235b
      • Packit ae235b
           include trailing empty tokens, rather than stripping them
        Packit ae235b
          

        Packit ae235b
      • Packit ae235b
           split into a maximum of max_tokens tokens, rather 
        Packit ae235b
           than max_tokens + 1
        Packit ae235b
          

        Packit ae235b
        Packit ae235b

        Packit ae235b
        Packit ae235b
          Code depending on either of these bugs will need to be fixed.
        Packit ae235b

        Packit ae235b
        Packit ae235b
      • Packit ae235b
        Deprecated functions that got removed:
        Packit ae235b
        g_set_error_handler(), 
        Packit ae235b
        g_set_warning_handler(),
        Packit ae235b
        g_set_message_handler(), use 
        Packit ae235b
        g_log_set_handler() instead.
        Packit ae235b

        Packit ae235b
        Packit ae235b
        Packit ae235b
        Packit ae235b
        Packit ae235b

        Generated by GTK-Doc V1.27
        Packit ae235b
        </body>
        Packit ae235b
        </html>