Last update July 11, 2004

Dwith Swig /
More About Swig



Difference (last change) (Author, normal page display)

Changed: 5c5
This is to give more information about SWIG as it is needed for the understanding of the use of SWIG for D. These are features of SWIG which have not been modified for D.
This is to give more information about SWIG as it is needed for the understanding of the use of SWIG for D. These are features of SWIG which have not been modified for D.

Changed: 11c11,26
* D SWIGDMD
* for D it is SWIGDMD

Example from /Examples/Pragma

[[code]
// Protection so that it is only seen when using dmd.
#ifdef SWIGDMD
%pragma(dmd) classimports="private import classA;"
#endif
]

=== Documentation ===

For full documentation on SWIG (other than for D) see SWIG.

JohnFletcher

Table of contents of this page
Introduction   
Conditional action in the interface file   
Documentation   

Introduction    

This is to give more information about SWIG as it is needed for the understanding of the use of SWIG for D. These are features of SWIG which have not been modified for D.

Conditional action in the interface file    

It is possible to maintain a single header file for a particular C or C++ source, which can be run for different target languages. SWIG supports a lot of target languages e.g. Tcl, ruby, perl. For each of them there is a defined constant which can be used to include or exclude code depending on the target language.

  • for D it is SWIGDMD
Example from /Examples/Pragma

// Protection so that it is only seen when using dmd.
#ifdef SWIGDMD
%pragma(dmd) classimports="private import classA;"
#endif

Documentation    

For full documentation on SWIG (other than for D) see SWIG.

JohnFletcher

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: July 11, 2004 10:43 (diff))