~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Doc/Manual/Extending.html

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
</head>
7
7
 
8
8
<body bgcolor="#ffffff">
9
 
<H1><a name="Extending"></a>34 Extending SWIG to support new languages</H1>
 
9
<H1><a name="Extending"></a>35 Extending SWIG to support new languages</H1>
10
10
<!-- INDEX -->
11
11
<div class="sectiontoc">
12
12
<ul>
73
73
 
74
74
 
75
75
 
76
 
<H2><a name="Extending_nn2"></a>34.1 Introduction</H2>
 
76
<H2><a name="Extending_nn2"></a>35.1 Introduction</H2>
77
77
 
78
78
 
79
79
<p>
89
89
you should probably look at one of SWIG's existing modules.
90
90
</p>
91
91
 
92
 
<H2><a name="Extending_nn3"></a>34.2 Prerequisites</H2>
 
92
<H2><a name="Extending_nn3"></a>35.2 Prerequisites</H2>
93
93
 
94
94
 
95
95
<p>
119
119
wrapper code are driven by C++ datatypes.
120
120
</p>
121
121
 
122
 
<H2><a name="Extending_nn4"></a>34.3 The Big Picture</H2>
 
122
<H2><a name="Extending_nn4"></a>35.3 The Big Picture</H2>
123
123
 
124
124
 
125
125
<p>
156
156
based on pattern matching and interact heavily with the underlying type system.
157
157
</p>
158
158
 
159
 
<H2><a name="Extending_nn5"></a>34.4 Execution Model</H2>
 
159
<H2><a name="Extending_nn5"></a>35.4 Execution Model</H2>
160
160
 
161
161
 
162
162
<p>
201
201
The next few sections briefly describe some of these stages.
202
202
</p>
203
203
 
204
 
<H3><a name="Extending_nn6"></a>34.4.1 Preprocessing</H3>
 
204
<H3><a name="Extending_nn6"></a>35.4.1 Preprocessing</H3>
205
205
 
206
206
 
207
207
<p>
232
232
...
233
233
/* Code insertion directives such as %wrapper %{ ... %} */
234
234
 
 
235
#define %begin       %insert("begin")
 
236
#define %runtime     %insert("runtime")
 
237
#define %header      %insert("header")
 
238
#define %wrapper     %insert("wrapper")
235
239
#define %init        %insert("init")
236
 
#define %wrapper     %insert("wrapper")
237
 
#define %header      %insert("header")
238
 
#define %runtime     %insert("runtime")
239
240
 
240
241
/* Access control directives */
241
242
 
281
282
construction of the wrapper code.
282
283
</p>
283
284
 
284
 
<H3><a name="Extending_nn7"></a>34.4.2 Parsing</H3>
 
285
<H3><a name="Extending_nn7"></a>35.4.2 Parsing</H3>
285
286
 
286
287
 
287
288
<p>
382
383
arguments).
383
384
</p>
384
385
 
385
 
<H3><a name="Extending_nn8"></a>34.4.3 Parse Trees</H3>
 
386
<H3><a name="Extending_nn8"></a>35.4.3 Parse Trees</H3>
386
387
 
387
388
 
388
389
<p>
448
449
<p>
449
450
The contents of each parse tree node consist of a collection of attribute/value
450
451
pairs.  Internally, the nodes are simply represented by hash tables.  A display of
451
 
the entire parse-tree structure can be obtained using <tt>swig -dump_tree</tt>. 
 
452
the entire parse-tree structure can be obtained using <tt>swig -debug-top &lt;n&gt;</tt>, where <tt>n</tt> is
 
453
the stage being processed. 
452
454
There are a number of other parse tree display options, for example, <tt>swig -debug-module &lt;n&gt;</tt> will
453
455
avoid displaying system parse information and only display the parse tree pertaining to the user's module at
454
456
stage <tt>n</tt> of processing.
636
638
</pre>
637
639
</div>
638
640
 
639
 
<H3><a name="Extending_nn9"></a>34.4.4 Attribute namespaces</H3>
 
641
<H3><a name="Extending_nn9"></a>35.4.4 Attribute namespaces</H3>
640
642
 
641
643
 
642
644
<p>
655
657
<tt>perl:foo</tt>.
656
658
</p>
657
659
 
658
 
<H3><a name="Extending_nn10"></a>34.4.5 Symbol Tables</H3>
 
660
<H3><a name="Extending_nn10"></a>35.4.5 Symbol Tables</H3>
659
661
 
660
662
 
661
663
<p>
746
748
</pre>
747
749
</div>
748
750
 
749
 
<H3><a name="Extending_nn11"></a>34.4.6 The %feature directive</H3>
 
751
<H3><a name="Extending_nn11"></a>35.4.6 The %feature directive</H3>
750
752
 
751
753
 
752
754
<p>
802
804
stored without any modifications.
803
805
</p>
804
806
 
805
 
<H3><a name="Extending_nn12"></a>34.4.7 Code Generation</H3>
 
807
<H3><a name="Extending_nn12"></a>35.4.7 Code Generation</H3>
806
808
 
807
809
 
808
810
<p>
924
926
The role of these functions is described shortly.
925
927
</p>
926
928
 
927
 
<H3><a name="Extending_nn13"></a>34.4.8 SWIG and XML</H3>
 
929
<H3><a name="Extending_nn13"></a>35.4.8 SWIG and XML</H3>
928
930
 
929
931
 
930
932
<p>
937
939
your mind as a model.
938
940
</p>
939
941
 
940
 
<H2><a name="Extending_nn14"></a>34.5 Primitive Data Structures</H2>
 
942
<H2><a name="Extending_nn14"></a>35.5 Primitive Data Structures</H2>
941
943
 
942
944
 
943
945
<p>
983
985
</pre>
984
986
</div>
985
987
 
986
 
<H3><a name="Extending_nn15"></a>34.5.1 Strings</H3>
 
988
<H3><a name="Extending_nn15"></a>35.5.1 Strings</H3>
987
989
 
988
990
 
989
991
<p>
1023
1025
</div>
1024
1026
 
1025
1027
<p>
1026
 
<b><tt>int Len(String_or_char *s)</tt></b>
 
1028
<b><tt>int Len(const String_or_char *s)</tt></b>
1027
1029
</p>
1028
1030
 
1029
1031
<div class="indent">
1031
1033
</div>
1032
1034
 
1033
1035
<p>
1034
 
<b><tt>char *Char(String_or_char *s)</tt></b>
 
1036
<b><tt>char *Char(const String_or_char *s)</tt></b>
1035
1037
</p>
1036
1038
 
1037
1039
<div class="indent">
1039
1041
</div>
1040
1042
 
1041
1043
<p>
1042
 
<b><tt>void Append(String *s, String_or_char *t)</tt></b>
 
1044
<b><tt>void Append(String *s, const String_or_char *t)</tt></b>
1043
1045
</p>
1044
1046
 
1045
1047
<div class="indent">
1047
1049
</div>
1048
1050
 
1049
1051
<p>
1050
 
<b><tt>void Insert(String *s, int pos, String_or_char *t)</tt></b>
 
1052
<b><tt>void Insert(String *s, int pos, const String_or_char *t)</tt></b>
1051
1053
</p>
1052
1054
 
1053
1055
<div class="indent">
1124
1126
 
1125
1127
</div>
1126
1128
 
1127
 
<H3><a name="Extending_nn16"></a>34.5.2 Hashes</H3>
 
1129
<H3><a name="Extending_nn16"></a>35.5.2 Hashes</H3>
1128
1130
 
1129
1131
 
1130
1132
<p>
1160
1162
</div>
1161
1163
 
1162
1164
<p>
1163
 
<b><tt>Object *Getattr(Hash *h, String_or_char *key)</tt></b>
 
1165
<b><tt>Object *Getattr(Hash *h, const String_or_char *key)</tt></b>
1164
1166
</p>
1165
1167
 
1166
1168
<div class="indent">
1169
1171
</div>
1170
1172
 
1171
1173
<p>
1172
 
<b><tt>int Setattr(Hash *h, String_or_char *key, Object_or_char *val)</tt></b>
 
1174
<b><tt>int Setattr(Hash *h, const String_or_char *key, const Object_or_char *val)</tt></b>
1173
1175
</p>
1174
1176
 
1175
1177
<div class="indent">
1183
1185
</div>
1184
1186
 
1185
1187
<p>
1186
 
<b><tt>int Delattr(Hash *h, String_or_char *key)</tt></b>
 
1188
<b><tt>int Delattr(Hash *h, const String_or_char *key)</tt></b>
1187
1189
</p>
1188
1190
 
1189
1191
<div class="indent">
1201
1203
</div>
1202
1204
 
1203
1205
 
1204
 
<H3><a name="Extending_nn17"></a>34.5.3 Lists</H3>
 
1206
<H3><a name="Extending_nn17"></a>35.5.3 Lists</H3>
1205
1207
 
1206
1208
 
1207
1209
<p>
1247
1249
</div>
1248
1250
 
1249
1251
<p>
1250
 
<b><tt>int *Setitem(List *x, int n, Object_or_char *val)</tt></b>
 
1252
<b><tt>int *Setitem(List *x, int n, const Object_or_char *val)</tt></b>
1251
1253
</p>
1252
1254
 
1253
1255
<div class="indent">
1269
1271
</div>
1270
1272
 
1271
1273
<p>
1272
 
<b><tt>void Append(List *x, Object_or_char *t)</tt></b>
 
1274
<b><tt>void Append(List *x, const Object_or_char *t)</tt></b>
1273
1275
</p>
1274
1276
 
1275
1277
<div class="indent">
1279
1281
</div>
1280
1282
 
1281
1283
<p>
1282
 
<b><tt>void Insert(String *s, int pos, Object_or_char *t)</tt></b>
 
1284
<b><tt>void Insert(String *s, int pos, const Object_or_char *t)</tt></b>
1283
1285
</p>
1284
1286
 
1285
1287
<div class="indent">
1290
1292
and is used to create a String object.
1291
1293
</div>
1292
1294
 
1293
 
<H3><a name="Extending_nn18"></a>34.5.4 Common operations</H3>
 
1295
<H3><a name="Extending_nn18"></a>35.5.4 Common operations</H3>
1294
1296
 
1295
1297
 
1296
1298
The following operations are applicable to all datatypes.
1345
1347
Gets the line number associated with <tt>x</tt>.
1346
1348
</div>
1347
1349
 
1348
 
<H3><a name="Extending_nn19"></a>34.5.5 Iterating over Lists and Hashes</H3>
 
1350
<H3><a name="Extending_nn19"></a>35.5.5 Iterating over Lists and Hashes</H3>
1349
1351
 
1350
1352
 
1351
1353
To iterate over the elements of a list or a hash table, the following functions are used:
1390
1392
 
1391
1393
</div>
1392
1394
 
1393
 
<H3><a name="Extending_nn20"></a>34.5.6 I/O</H3>
 
1395
<H3><a name="Extending_nn20"></a>35.5.6 I/O</H3>
1394
1396
 
1395
1397
 
1396
1398
Special I/O functions are used for all internal I/O.  These operations
1477
1479
</div>
1478
1480
 
1479
1481
<p>
1480
 
<b><tt>File *NewFile(const char *filename, const char *mode)</tt></b>
 
1482
<b><tt>File *NewFile(const char *filename, const char *mode, List *newfiles)</tt></b>
1481
1483
</p>
1482
1484
 
1483
1485
<div class="indent">
1484
1486
Create a File object using the <tt>fopen()</tt> library call.  This
1485
1487
file differs from <tt>FILE *</tt> in that it can be placed in the standard
1486
 
SWIG containers (lists, hashes, etc.).
 
1488
SWIG containers (lists, hashes, etc.). The <tt>filename</tt> is added to the 
 
1489
<tt>newfiles</tt> list if <tt>newfiles</tt> is non-zero and the file was created successfully.
1487
1490
</div>
1488
1491
 
1489
1492
<p>
1526
1529
 
1527
1530
</div>
1528
1531
 
1529
 
<H2><a name="Extending_nn21"></a>34.6 Navigating and manipulating parse trees</H2>
 
1532
<H2><a name="Extending_nn21"></a>35.6 Navigating and manipulating parse trees</H2>
1530
1533
 
1531
1534
 
1532
1535
Parse trees are built as collections of hash tables.   Each node is a hash table in which
1660
1663
the parent so that sibling nodes are unaffected.
1661
1664
</div>
1662
1665
 
1663
 
<H2><a name="Extending_nn22"></a>34.7 Working with attributes</H2>
 
1666
<H2><a name="Extending_nn22"></a>35.7 Working with attributes</H2>
1664
1667
 
1665
1668
 
1666
1669
<p>
1777
1780
function.
1778
1781
</div>
1779
1782
 
1780
 
<H2><a name="Extending_nn23"></a>34.8 Type system</H2>
 
1783
<H2><a name="Extending_nn23"></a>35.8 Type system</H2>
1781
1784
 
1782
1785
 
1783
1786
<p>
1786
1789
type theory is impossible here.   However, let's cover the highlights.
1787
1790
</p>
1788
1791
 
1789
 
<H3><a name="Extending_nn24"></a>34.8.1 String encoding of types</H3>
 
1792
<H3><a name="Extending_nn24"></a>35.8.1 String encoding of types</H3>
1790
1793
 
1791
1794
 
1792
1795
<p>
1887
1890
string concatenation.
1888
1891
</p>
1889
1892
 
1890
 
<H3><a name="Extending_nn25"></a>34.8.2 Type construction</H3>
 
1893
<H3><a name="Extending_nn25"></a>35.8.2 Type construction</H3>
1891
1894
 
1892
1895
 
1893
1896
<p>
1920
1923
</div>
1921
1924
 
1922
1925
<p>
1923
 
<b><tt>void SwigType_add_array(SwigType *ty, String_or_char *dim)</tt></b>
 
1926
<b><tt>void SwigType_add_array(SwigType *ty, const String_or_char *size)</tt></b>
1924
1927
</p>
1925
1928
 
1926
1929
<div class="indent">
1960
1963
</div>
1961
1964
 
1962
1965
<p>
1963
 
<b><tt>void SwigType_add_qualifier(SwigType *ty, String_or_char *q)</tt></b>
 
1966
<b><tt>void SwigType_add_qualifier(SwigType *ty, const String_or_char *q)</tt></b>
1964
1967
</p>
1965
1968
 
1966
1969
<div class="indent">
1969
1972
</div>
1970
1973
 
1971
1974
<p>
1972
 
<b><tt>void SwigType_add_memberpointer(SwigType *ty, String_or_char *cls)</tt></b>
 
1975
<b><tt>void SwigType_add_memberpointer(SwigType *ty, const String_or_char *cls)</tt></b>
1973
1976
</p>
1974
1977
 
1975
1978
<div class="indent">
2056
2059
<tt>ty</tt> is unmodified.
2057
2060
</div>
2058
2061
 
2059
 
<H3><a name="Extending_nn26"></a>34.8.3 Type tests</H3>
 
2062
<H3><a name="Extending_nn26"></a>35.8.3 Type tests</H3>
2060
2063
 
2061
2064
 
2062
2065
<p>
2143
2146
Checks if <tt>ty</tt> is a templatized type.
2144
2147
</div>
2145
2148
 
2146
 
<H3><a name="Extending_nn27"></a>34.8.4 Typedef and inheritance</H3>
 
2149
<H3><a name="Extending_nn27"></a>35.8.4 Typedef and inheritance</H3>
2147
2150
 
2148
2151
 
2149
2152
<p>
2245
2248
will consist only of primitive typenames.
2246
2249
</div>
2247
2250
 
2248
 
<H3><a name="Extending_nn28"></a>34.8.5 Lvalues</H3>
 
2251
<H3><a name="Extending_nn28"></a>35.8.5 Lvalues</H3>
2249
2252
 
2250
2253
 
2251
2254
<p>
2282
2285
</pre>
2283
2286
</div>
2284
2287
 
2285
 
<H3><a name="Extending_nn29"></a>34.8.6 Output functions</H3>
 
2288
<H3><a name="Extending_nn29"></a>35.8.6 Output functions</H3>
2286
2289
 
2287
2290
 
2288
2291
<p>
2290
2293
</p>
2291
2294
 
2292
2295
<p>
2293
 
<b><tt>String *SwigType_str(SwigType *ty, String_or_char *id = 0)</tt></b>
 
2296
<b><tt>String *SwigType_str(SwigType *ty, const String_or_char *id = 0)</tt></b>
2294
2297
</p>
2295
2298
 
2296
2299
<div class="indent">
2301
2304
</div>
2302
2305
 
2303
2306
<p>
2304
 
<b><tt>String *SwigType_lstr(SwigType *ty, String_or_char *id = 0)</tt></b>
 
2307
<b><tt>String *SwigType_lstr(SwigType *ty, const String_or_char *id = 0)</tt></b>
2305
2308
</p>
2306
2309
 
2307
2310
<div class="indent">
2310
2313
</div>
2311
2314
 
2312
2315
<p>
2313
 
<b><tt>String *SwigType_lcaststr(SwigType *ty, String_or_char *id = 0)</tt></b>
 
2316
<b><tt>String *SwigType_lcaststr(SwigType *ty, const String_or_char *id = 0)</tt></b>
2314
2317
</p>
2315
2318
 
2316
2319
<div class="indent">
2321
2324
</div>
2322
2325
 
2323
2326
<p>
2324
 
<b><tt>String *SwigType_rcaststr(SwigType *ty, String_or_char *id = 0)</tt></b>
 
2327
<b><tt>String *SwigType_rcaststr(SwigType *ty, const String_or_char *id = 0)</tt></b>
2325
2328
</p>
2326
2329
 
2327
2330
<div class="indent">
2344
2347
that appear in wrappers (e.g., <tt>SWIGTYPE_p_double</tt>).
2345
2348
</div>
2346
2349
 
2347
 
<H2><a name="Extending_nn30"></a>34.9 Parameters</H2>
 
2350
<H2><a name="Extending_nn30"></a>35.9 Parameters</H2>
2348
2351
 
2349
2352
 
2350
2353
<p>
2443
2446
Returns the number of required (non-optional) arguments in <tt>p</tt>.
2444
2447
</div>
2445
2448
 
2446
 
<H2><a name="Extending_nn31"></a>34.10 Writing a Language Module</H2>
 
2449
<H2><a name="Extending_nn31"></a>35.10 Writing a Language Module</H2>
2447
2450
 
2448
2451
 
2449
2452
<p>
2458
2461
this to other languages.
2459
2462
</p>
2460
2463
 
2461
 
<H3><a name="Extending_nn32"></a>34.10.1 Execution model</H3>
 
2464
<H3><a name="Extending_nn32"></a>35.10.1 Execution model</H3>
2462
2465
 
2463
2466
 
2464
2467
<p>
2468
2471
different methods of the <tt>Language</tt> that must be defined by your module.
2469
2472
</p>
2470
2473
 
2471
 
<H3><a name="Extending_nn33"></a>34.10.2 Starting out</H3>
 
2474
<H3><a name="Extending_nn33"></a>35.10.2 Starting out</H3>
2472
2475
 
2473
2476
 
2474
2477
<p>
2576
2579
messages from your new module should appear.
2577
2580
</p>
2578
2581
 
2579
 
<H3><a name="Extending_nn34"></a>34.10.3 Command line options</H3>
 
2582
<H3><a name="Extending_nn34"></a>35.10.3 Command line options</H3>
2580
2583
 
2581
2584
 
2582
2585
<p>
2635
2638
unrecognized command line option error.
2636
2639
</p>
2637
2640
 
2638
 
<H3><a name="Extending_nn35"></a>34.10.4 Configuration and preprocessing</H3>
 
2641
<H3><a name="Extending_nn35"></a>35.10.4 Configuration and preprocessing</H3>
2639
2642
 
2640
2643
 
2641
2644
<p>
2684
2687
<tt>python.swg</tt>.
2685
2688
</p>
2686
2689
 
2687
 
<H3><a name="Extending_nn36"></a>34.10.5 Entry point to code generation</H3>
 
2690
<H3><a name="Extending_nn36"></a>35.10.5 Entry point to code generation</H3>
2688
2691
 
2689
2692
 
2690
2693
<p>
2742
2745
</pre>
2743
2746
</div>
2744
2747
 
2745
 
<H3><a name="Extending_nn37"></a>34.10.6 Module I/O and wrapper skeleton</H3>
 
2748
<H3><a name="Extending_nn37"></a>35.10.6 Module I/O and wrapper skeleton</H3>
2746
2749
 
2747
2750
 
2748
2751
<!-- please report bugs in this section to mgossage -->
2774
2777
class PYTHON : public Language {
2775
2778
protected:
2776
2779
   /* General DOH objects used for holding the strings */
 
2780
   File *f_begin;
2777
2781
   File *f_runtime;
2778
2782
   File *f_header;
2779
2783
   File *f_wrappers;
2789
2793
   ...
2790
2794
 
2791
2795
   /* Initialize I/O */
2792
 
   f_runtime = NewFile(outfile, "w");
2793
 
   if (!f_runtime) {
 
2796
   f_begin = NewFile(outfile, "w", SWIG_output_files());
 
2797
   if (!f_begin) {
2794
2798
      FileErrorDisplay(outfile);
2795
2799
      SWIG_exit(EXIT_FAILURE);
2796
2800
   }
 
2801
   f_runtime = NewString("");
2797
2802
   f_init = NewString("");
2798
2803
   f_header = NewString("");
2799
2804
   f_wrappers = NewString("");
2800
2805
 
2801
2806
   /* Register file targets with the SWIG file handler */
 
2807
   Swig_register_filebyname("begin", f_begin);
2802
2808
   Swig_register_filebyname("header", f_header);
2803
2809
   Swig_register_filebyname("wrapper", f_wrappers);
2804
2810
   Swig_register_filebyname("runtime", f_runtime);
2805
2811
   Swig_register_filebyname("init", f_init);
2806
2812
 
2807
2813
   /* Output module initialization code */
 
2814
   Swig_banner(f_begin);
2808
2815
   ...
2809
2816
 
2810
2817
   /* Emit code for children */
2812
2819
 
2813
2820
   ...
2814
2821
   /* Write all to the file */
2815
 
   Dump(f_header, f_runtime);
2816
 
   Dump(f_wrappers, f_runtime);
2817
 
   Wrapper_pretty_print(f_init, f_runtime);
 
2822
   Dump(f_runtime, f_begin);
 
2823
   Dump(f_header, f_begin);
 
2824
   Dump(f_wrappers, f_begin);
 
2825
   Wrapper_pretty_print(f_init, f_begin);
2818
2826
 
2819
2827
   /* Cleanup files */
 
2828
   Delete(f_runtime);
2820
2829
   Delete(f_header);
2821
2830
   Delete(f_wrappers);
2822
2831
   Delete(f_init);
2823
 
   Close(f_runtime);
2824
 
   Delete(f_runtime);
 
2832
   Close(f_begin);
 
2833
   Delete(f_begin);
2825
2834
 
2826
2835
   return SWIG_OK;
2827
2836
}
2884
2893
</pre>
2885
2894
</div>
2886
2895
 
2887
 
<H3><a name="Extending_nn38"></a>34.10.7 Low-level code generators</H3>
 
2896
<H3><a name="Extending_nn38"></a>35.10.7 Low-level code generators</H3>
2888
2897
 
2889
2898
 
2890
2899
<!-- please report bugs in this section to mgossage -->
3038
3047
</p>
3039
3048
 
3040
3049
 
3041
 
<H3><a name="Extending_nn39"></a>34.10.8 Configuration files</H3>
 
3050
<H3><a name="Extending_nn39"></a>35.10.8 Configuration files</H3>
3042
3051
 
3043
3052
 
3044
3053
<!-- please report bugs in this section to ttn -->
3113
3122
 
3114
3123
<p>
3115
3124
At the end of the new section is the place to put the aforementioned
3116
 
nickname kludges (should they be needed).  See Perl5 and Php4 for
 
3125
nickname kludges (should they be needed).  See Perl5 for
3117
3126
examples of what to do.  [If this is still unclear after you've read
3118
3127
the code, ping me and I'll expand on this further.  --ttn]
3119
3128
</p>
3188
3197
</dl>
3189
3198
 
3190
3199
 
3191
 
<H3><a name="Extending_nn40"></a>34.10.9 Runtime support</H3>
 
3200
<H3><a name="Extending_nn40"></a>35.10.9 Runtime support</H3>
3192
3201
 
3193
3202
 
3194
3203
<p>
3197
3206
the SWIG files that implement those functions.
3198
3207
</p>
3199
3208
 
3200
 
<H3><a name="Extending_nn41"></a>34.10.10 Standard library files</H3>
 
3209
<H3><a name="Extending_nn41"></a>35.10.10 Standard library files</H3>
3201
3210
 
3202
3211
 
3203
3212
<p>
3216
3225
Please copy these and modify for any new language.
3217
3226
</p>
3218
3227
 
3219
 
<H3><a name="Extending_nn42"></a>34.10.11 Examples and test cases</H3>
 
3228
<H3><a name="Extending_nn42"></a>35.10.11 Examples and test cases</H3>
3220
3229
 
3221
3230
 
3222
3231
<p>
3245
3254
files</a>.
3246
3255
</p>
3247
3256
 
3248
 
<H3><a name="Extending_nn43"></a>34.10.12 Documentation</H3>
 
3257
<H3><a name="Extending_nn43"></a>35.10.12 Documentation</H3>
3249
3258
 
3250
3259
 
3251
3260
<p>
3277
3286
     if available.
3278
3287
</ul>
3279
3288
 
3280
 
<H3><a name="Extending_prerequisites"></a>34.10.13 Prerequisites for adding a new language module to the SWIG distribution</H3>
 
3289
<H3><a name="Extending_prerequisites"></a>35.10.13 Prerequisites for adding a new language module to the SWIG distribution</H3>
3281
3290
 
3282
3291
 
3283
3292
<p>
3334
3343
the existing tests.
3335
3344
</p>
3336
3345
 
3337
 
<H3><a name="Extending_coding_style_guidelines"></a>34.10.14 Coding style guidelines</H3>
 
3346
<H3><a name="Extending_coding_style_guidelines"></a>35.10.14 Coding style guidelines</H3>
3338
3347
 
3339
3348
 
3340
3349
<p>
3358
3367
should be avoided as unlike the SWIG developers, users will never have consistent tab settings.
3359
3368
</p>
3360
3369
 
3361
 
<H2><a name="Extending_nn44"></a>34.11 Typemaps</H2>
3362
 
 
3363
 
 
3364
 
<H3><a name="Extending_nn45"></a>34.11.1 Proxy classes</H3>
3365
 
 
3366
 
 
3367
 
<H2><a name="Extending_nn46"></a>34.12 Guide to parse tree nodes</H2>
 
3370
<H2><a name="Extending_nn44"></a>35.11 Typemaps</H2>
 
3371
 
 
3372
 
 
3373
<H3><a name="Extending_nn45"></a>35.11.1 Proxy classes</H3>
 
3374
 
 
3375
 
 
3376
<H2><a name="Extending_nn46"></a>35.12 Guide to parse tree nodes</H2>
3368
3377
 
3369
3378
 
3370
3379
<p>