--- a/Symbian3/SDK/Source/GUID-006C503D-1E52-450D-A4DA-8C19B141E09F.dita Fri Jul 16 17:23:46 2010 +0100
+++ b/Symbian3/SDK/Source/GUID-006C503D-1E52-450D-A4DA-8C19B141E09F.dita Tue Jul 20 12:00:49 2010 +0100
@@ -15,7 +15,7 @@
where C and C++ (and Symbian C++ as well) codes will be used together. The
open source community implements a vast number of libraries that export C
APIs to the user of such libraries.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
-<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-11-1-1-5-1-3-1-7-1-4-1-4-1-3-1"> <title>When
+<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-13-1-1-5-1-3-1-7-1-4-1-4-1-3-1"> <title>When
and why to use C linkage</title> <p>While porting such applications,
if developers have to intermix C and C++ code, they then have to depend on
C++ language features like extern "C" for giving C linkage to some set of
@@ -32,7 +32,7 @@
It applies when the developer tries to use C APIs by including corresponding
headers. To avoid name mangling, the developer should mention explicitly that
those APIs are C APIs, by using the extern "C" keyword. </p> </section>
-<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-11-1-1-5-1-3-1-7-1-4-1-4-1-3-2"> <title>Syntax
+<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-13-1-1-5-1-3-1-7-1-4-1-4-1-3-2"> <title>Syntax
of extern C</title> <p>The syntax of extern "C" is shown below: </p><codeblock xml:space="preserve">extern "C" declaration ;
</codeblock><p>The declaration (or definition) that immediately follows extern
"C" has the C linkage. </p><codeblock xml:space="preserve">extern "C" {
@@ -41,7 +41,7 @@
...
}</codeblock><p>Everything between the curly braces has C linkage, unless
declared otherwise. </p> </section>
-<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-11-1-1-5-1-3-1-7-1-4-1-4-1-3-3"> <title>How
+<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-13-1-1-5-1-3-1-7-1-4-1-4-1-3-3"> <title>How
to use extern C</title> <p>While writing header files with C functions
which will be included by both C and C++ source files, the user must use extern
"C" properly. See the example below: </p><codeblock xml:space="preserve">/*File: GoodCHeader.h */
@@ -83,7 +83,7 @@
int ret = Function2(10);
}
</codeblock> </section>
-<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-11-1-1-5-1-3-1-7-1-4-1-4-1-3-4"> <title>Mixing
+<section id="GUID-88635D46-AEF6-4E8E-969D-D3E56941F289-GENID-1-10-1-13-1-1-5-1-3-1-7-1-4-1-4-1-3-4"> <title>Mixing
C and C++ features using extern "C"</title> <p>The developer
can use all the features of C++ except templates within C by giving those
functions extern "C" linkage. See the example below:</p><codeblock xml:space="preserve">#include <iostream>