~attente/glib/gbytesicon

« back to all changes in this revision

Viewing changes to docs/reference/gobject/html/ch01s02.html

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2012-11-28 14:38:35 UTC
  • mfrom: (172.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20121128143835-at37o4ozls05rkgf
Tags: 2.34.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
</tr></table>
22
22
<div class="sect1">
23
23
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
24
 
<a name="idp5845712"></a>Exporting a C API</h2></div></div></div>
 
24
<a name="idp9959552"></a>Exporting a C API</h2></div></div></div>
25
25
<p>
26
26
      C APIs are defined by a set of functions and global variables which are usually exported from a 
27
27
      binary. C functions have an arbitrary number of arguments and one return value. Each function is thus
91
91
        reads the original function signature.</p></li>
92
92
<li class="listitem"><p>The solution used by GLib is to use the GType library which holds at runtime a description of
93
93
        all the objects manipulated by the programmer. This so-called <span class="emphasis"><em>dynamic type</em></span>
94
 
        <a href="#ftn.idp78464" class="footnote"><sup class="footnote"><a name="idp78464"></a>[1]</sup></a>
 
94
        <a href="#ftn.idp81488" class="footnote"><sup class="footnote"><a name="idp81488"></a>[1]</sup></a>
95
95
        library is then used by special generic glue code to automatically convert function parameters and
96
96
        function calling conventions between different runtime domains.</p></li>
97
97
</ul></div>
100
100
      boundaries is written once: the figure below states this more clearly.
101
101
      </p>
102
102
<div class="figure">
103
 
<a name="idp80464"></a><p class="title"><b>Figure 1. </b></p>
 
103
<a name="idp83488"></a><p class="title"><b>Figure 1. </b></p>
104
104
<div class="figure-contents"><div class="mediaobject" align="center"><img src="glue.png" align="middle"></div></div>
105
105
</div>
106
106
<p><br class="figure-break">
118
118
    </p>
119
119
<div class="footnotes">
120
120
<br><hr style="width:100; align:left;">
121
 
<div id="ftn.idp78464" class="footnote"><p><a href="#idp78464" class="para"><sup class="para">[1] </sup></a>
 
121
<div id="ftn.idp81488" class="footnote"><p><a href="#idp81488" class="para"><sup class="para">[1] </sup></a>
122
122
            There are numerous different implementations of dynamic type systems: all C++ 
123
123
            compilers have one, Java and .NET have one too. A dynamic type system allows you
124
124
            to get information about every instantiated object at runtime. It can be implemented