KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/gtk-doc/html/glib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/gtk-doc/html/glib/glib-changes.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Changes to GLib</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib.html" title="GLib Overview">
<link rel="prev" href="glib-running.html" title="Running GLib Applications">
<link rel="next" href="glib-resources.html" title="Mailing lists and bug reports">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="glib-running.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-resources.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" lang="en">
<a name="glib-changes"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Changes to GLib</span></h2>
<p>Changes to GLib &#8212; 
Incompatible changes made between successing versions of GLib
</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" lang="en">
<a name="id2844117"></a><h2>Incompatible changes from 2.0 to 2.2</h2>
<div class="itemizedlist"><ul type="disc"><li>
<p>
GLib changed the seeding algorithm for the pseudo-random number
generator Mersenne Twister, as used by <span class="structname">GRand</span>
and <span class="structname">GRandom</span>. This was necessary, because some
seeds would yield very bad pseudo-random streams. Also the
pseudo-random integers generated by
<code class="function">g_rand*_int_range()</code> will have a
slightly better equal distribution with the new version of GLib.
</p>
<p>
Further information can be found at the website of the Mersenne
Twister random number generator at <a href="http://www.math.keio.ac.jp/~matumoto/emt.html" target="_top">http://www.math.keio.ac.jp/~matumoto/emt.html</a>.
</p>
<p>
The original seeding and generation algorithms, as found in GLib
2.0.x, can be used instead of the new ones by setting the environment
variable <code class="envar">G_RANDOM_VERSION</code> to the value of '2.0'. Use
the GLib-2.0 algorithms only if you have sequences of numbers generated
with Glib-2.0 that you need to reproduce exactly.  
</p>
</li></ul></div>
</div>
<div class="refsect1" lang="en">
<a name="id2844216"></a><h2>Incompatible changes from 1.2 to 2.0</h2>
<p>
The <a href="http://developer.gnome.org/dotplan/porting/" target="_top">GNOME 2.0
porting guide</a> on <a href="http://developer.gnome.org" target="_top">http://developer.gnome.org</a>
has some more detailed discussion of porting from 1.2 to 2.0.
See the section on GLib.
</p>
<div class="itemizedlist"><ul type="disc">
<li>
<p>
The event loop functionality <span class="structname">GMain</span> has extensively 
been revised to support multiple separate main loops in separate threads. 
All sources (timeouts, idle functions, etc.) are associated with a 
<span class="structname">GMainContext</span>.
</p>
<p>
Compatibility functions exist so that most application code dealing with
the main loop will continue to work. However, code that creates new custom 
types of sources will require modification.
</p>
<p>
The main changes here are:

  </p>
<div class="itemizedlist"><ul type="circle">
<li><p>
   Sources are now exposed as <span class="type">GSource *</span>, rather than simply as 
   numeric ids.
  </p></li>
<li><p>
   New types of sources are created by structure "derivation" from 
   <span class="structname">GSource</span>, so the <code class="literal">source_data</code> 
   parameter to the <span class="structname">GSource</span> virtual functions has been
   replaced with a <span class="type">GSource *</span>.
  </p></li>
<li><p>
   Sources are first created, then later added to a specific 
   <span class="structname">GMainContext</span>. 
  </p></li>
<li><p>
   Dispatching has been modified so both the callback and data are passed
   in to the <code class="function">dispatch()</code> virtual function.
  </p></li>
</ul></div>
<p>
  To go along with this change, the vtable for 
  <span class="structname">GIOChannel</span> has changed and
  <code class="function">add_watch()</code> has been replaced by 
  <code class="function">create_watch()</code>.
</p>
</li>
<li>
<p>
<code class="function">g_list_foreach()</code> and 
<code class="function">g_slist_foreach()</code> have been changed so they
are now safe against removal of the current item, not the next item.
</p>
<p>
It's not recommended to mutate the list in the callback to these
functions in any case.
</p>
</li>
<li><p>
<span class="structname">GDate</span> now works in UTF-8, not in the current locale. 
If you want to use it with the encoding of the locale, you need to convert 
strings using <code class="function">g_locale_to_utf8()</code> first.
</p></li>
<li>
<p>
<code class="function">g_strsplit()</code> has been fixed to:

  </p>
<div class="itemizedlist"><ul type="circle">
<li><p>
   include trailing empty tokens, rather than stripping them
  </p></li>
<li><p>
   split into a maximum of <code class="literal">max_tokens</code> tokens, rather 
   than <code class="literal">max_tokens + 1</code>
  </p></li>
</ul></div>
<p>

  Code depending on either of these bugs will need to be fixed.
</p>
</li>
<li><p>
Deprecated functions that got removed:
<code class="function">g_set_error_handler()</code>, 
<code class="function">g_set_warning_handler()</code>,
<code class="function">g_set_message_handler()</code>, use 
<code class="function">g_log_set_handler()</code> instead.
</p></li>
</ul></div>
</div>
</div>
</body>
</html>

Anon7 - 2021