~ubuntu-branches/ubuntu/hardy/glib2.0/hardy-updates

« back to all changes in this revision

Viewing changes to docs/reference/gobject/html/howto-gobject-chainup.html

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2009-03-12 16:46:11 UTC
  • mfrom: (67.1.7 hardy-proposed)
  • Revision ID: james.westby@ubuntu.com-20090312164611-31v55ts0v0j0u06k
Tags: 2.16.6-0ubuntu1.1
* SECURITY UPDATE: possible arbitrary code execution when processing large
  Base64 strings
  - debian/patches/91_CVE-2008-4316.patch: update glib/gbase64.c to properly
    verify the string length and set the length of the output buffer.
  - CVE-2008-4316

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Chaining up</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GObject Reference Manual">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
7
<link rel="home" href="index.html" title="GObject Reference Manual">
8
8
<link rel="up" href="howto-gobject.html" title="How to define and implement a new GObject">
9
9
<link rel="prev" href="howto-gobject-methods.html" title="Object methods">
10
10
<link rel="next" href="howto-interface.html" title="How to define and implement interfaces">
11
 
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="preface" href="pr01.html" title="Introduction">
14
 
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Concepts">
 
14
<link rel="part" href="pt01.html" title="Part I. Concepts">
15
15
<link rel="chapter" href="chapter-intro.html" title="Background">
16
16
<link rel="chapter" href="chapter-gtype.html" title="The GLib Dynamic Type System">
17
17
<link rel="chapter" href="chapter-gobject.html" title="The GObject base class">
18
18
<link rel="chapter" href="chapter-signal.html" title="The GObject messaging system">
19
19
<link rel="reference" href="rn01.html" title="API Reference">
20
20
<link rel="reference" href="rn02.html" title="Tools Reference">
21
 
<link rel="part" href="pt02.html" title="Part&#160;IV.&#160;Tutorial">
 
21
<link rel="part" href="pt02.html" title="Part IV. Tutorial">
22
22
<link rel="chapter" href="howto-gobject.html" title="How to define and implement a new GObject">
23
23
<link rel="chapter" href="howto-interface.html" title="How to define and implement interfaces">
24
24
<link rel="chapter" href="howto-signals.html" title="How to create and use signals">
25
 
<link rel="part" href="pt03.html" title="Part&#160;V.&#160;Related Tools">
 
25
<link rel="part" href="pt03.html" title="Part V. Related Tools">
26
26
<link rel="chapter" href="tools-gob.html" title="GObject builder">
27
27
<link rel="chapter" href="tools-ginspector.html" title="Graphical inspection of GObjects">
28
28
<link rel="chapter" href="tools-refdb.html" title="Debugging reference count problems">
79
79
      To explicitly chain up to the implementation of the virtual method in the parent class, 
80
80
      you first need a handle to the original parent class structure. This pointer can then be used to 
81
81
      access the original class function pointer and invoke it directly.
82
 
      <sup>[<a name="id3002256" href="#ftn.id3002256" class="footnote">13</a>]</sup>
 
82
      <sup>[<a name="id2844974" href="#ftn.id2844974" class="footnote">13</a>]</sup>
83
83
    </p>
84
 
<p>The function <code class="function"><a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a></code> is used to access the original parent 
 
84
<p>The function <code class="function"><a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent" title="g_type_class_peek_parent ()">g_type_class_peek_parent</a></code> is used to access the original parent 
85
85
    class structure. Its input is a pointer to the class of the derived object and it returns a pointer
86
86
    to the original parent class structure. The code below shows how you could use it:
87
87
</p>
101
101
</pre>
102
102
<p>
103
103
   A lot of people who use this idiom in GTK+ store the parent class structure pointer in a global static 
104
 
   variable to avoid the costly call to <code class="function"><a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a></code> for each function call.
 
104
   variable to avoid the costly call to <code class="function"><a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent" title="g_type_class_peek_parent ()">g_type_class_peek_parent</a></code> for each function call.
105
105
   Typically, the class_init callback initializes the global static variable. <code class="filename">gtk/gtkhscale.c</code>
106
106
   does this.
107
107
  </p>
108
108
<div class="footnotes">
109
109
<br><hr width="100" align="left">
110
 
<div class="footnote"><p><sup>[<a name="ftn.id3002256" href="#id3002256" class="para">13</a>] </sup>
 
110
<div class="footnote"><p><sup>[<a name="ftn.id2844974" href="#id2844974" class="para">13</a>] </sup>
111
111
          The <span class="emphasis"><em>original</em></span> adjective used in this sentence is not innocuous. To fully 
112
112
          understand its meaning, you need to recall how class structures are initialized: for each object type,
113
113
          the class structure associated to this object is created by first copying the class structure of its 
119
119
        </p></div>
120
120
</div>
121
121
</div>
 
122
<div class="footer">
 
123
<hr>
 
124
          Generated by GTK-Doc V1.10</div>
122
125
</body>
123
126
</html>