Clear up some confusion over ANSI vs ISO C/C++ support

Issue #890
This commit is contained in:
William S Fulton 2019-04-18 20:04:20 +01:00
parent 31b3b782a1
commit 12a245183f
7 changed files with 18 additions and 18 deletions

View File

@ -163,7 +163,7 @@ This ability to interface C/C++ to many different target languages is one of SWI
<p>
SWIG is very broadly composed of two components.
A core component creates a parse tree from the input C/C++ and SWIG directives (extensions to C/C++).
A core component creates a parse tree from the input ISO C/C++ and SWIG directives (extensions to the C/C++ standards).
The parse tree is then passed to a second component, one of the target language modules for generating code specific to a higher level language.
SWIG supports many different target languages.
These target languages are given a status of either Supported or Experimental.
@ -273,7 +273,7 @@ extern int my_mod(int n, int m);
</pre></div>
<p>
The interface file contains ANSI C function prototypes and variable
The interface file contains ISO C function prototypes and variable
declarations. The <tt>%module</tt> directive defines the name of the
module that will be created by SWIG. The <tt>%{ %}</tt> block
provides a location for inserting additional code, such as C header
@ -400,7 +400,7 @@ major features include:
<ul>
<li>Full C99 preprocessing.
<li>All ANSI C and C++ datatypes.
<li>All ISO C and C++ datatypes.
<li>Functions, variables, and constants.
<li>Classes.
<li>Single and multiple inheritance.
@ -531,7 +531,7 @@ to work with complicated and unusual C/C++ applications.
Ironically, the freedom that SWIG provides is countered by an
extremely conservative approach to code generation. At its core, SWIG
tries to distill even the most advanced C++ code down to a small
well-defined set of interface building techniques based on ANSI C
well-defined set of interface building techniques based on ISO C
programming. Because of this, you will find that SWIG interfaces can
be easily compiled by virtually every C/C++ compiler and that they can
be used on any platform. Again, this is an important part of staying out

View File

@ -1365,7 +1365,7 @@ to accomplish this in SWIG. This library provides support for a few common tech
</li>
<li>If used in C++, this library uses <tt>new</tt> and <tt>delete []</tt> for memory
allocation. If using ANSI C, the library uses <tt>malloc()</tt> and <tt>free()</tt>.
allocation. If using C, the library uses <tt>malloc()</tt> and <tt>free()</tt>.
</li>
<li>Rather than manipulating <tt>char *</tt> directly, you might consider using a special string

View File

@ -77,7 +77,7 @@
<p>
Lua is an extension programming language designed to support general procedural programming with data description facilities. It also offers good support for object-oriented programming, functional programming, and data-driven programming. Lua is intended to be used as a powerful, light-weight configuration language for any program that needs one. Lua is implemented as a library, written in clean C (that is, in the common subset of ANSI C and C++). It's also a <em>really</em> tiny language, less than 6000 lines of code, which compiles to &lt;100 kilobytes of binary code. It can be found at <a href="http://www.lua.org">http://www.lua.org</a>
Lua is an extension programming language designed to support general procedural programming with data description facilities. It also offers good support for object-oriented programming, functional programming, and data-driven programming. Lua is intended to be used as a powerful, light-weight configuration language for any program that needs one. Lua is implemented as a library, written in clean C (that is, in the common subset of ISO C and C++). It's also a <em>really</em> tiny language, less than 6000 lines of code, which compiles to &lt;100 kilobytes of binary code. It can be found at <a href="http://www.lua.org">http://www.lua.org</a>
</p>
<p>
eLua stands for Embedded Lua (can be thought of as a flavor of Lua) and offers the full implementation of the Lua programming language to the embedded world, extending it with specific features for efficient and portable software embedded development. eLua runs on smaller devices like microcontrollers and provides the full features of the regular Lua desktop version. More information on eLua can be found here: <a href="http://www.eluaproject.net">http://www.eluaproject.net</a>

View File

@ -138,7 +138,7 @@ In addition, SWIG defines the following set of standard C/C++ macros:
<pre>
__LINE__ Current line number
__FILE__ Current file name
__STDC__ Defined to indicate ANSI C
__STDC__ Defined to indicate ISO C
__cplusplus Defined when -c++ option used
</pre>
</div>
@ -180,9 +180,9 @@ More complex macros can be defined in the standard way. For example:
<pre>
#define EXTERN extern
#ifdef __STDC__
#define _ANSI(args) (args)
#define ISOC_(args) (args)
#else
#define _ANSI(args) ()
#define ISOC_(args) ()
#endif
</pre>
</div>

View File

@ -88,7 +88,7 @@
<p>
This chapter describes the basic operation of SWIG, the structure of its
input files, and how it handles standard ANSI C declarations. C++ support is
input files, and how it handles standard ISO C declarations. C++ support is
described in the next chapter. However, C++ programmers should still read this
chapter to understand the basics.
Specific details about each target language are described in later
@ -252,7 +252,7 @@ recursively.
<p>
As input, SWIG expects a file containing ANSI C/C++ declarations and
As input, SWIG expects a file containing ISO C/C++ declarations and
special SWIG directives. More often than not, this is a special SWIG
interface file which is usually denoted with a special <tt>.i</tt> or
<tt>.swg</tt> suffix. In certain cases, SWIG can be used directly on
@ -270,7 +270,7 @@ The most common format of a SWIG interface is as follows:
%{
#include "myheader.h"
%}
// Now list ANSI C/C++ declarations
// Now list ISO C/C++ declarations
int foo;
int bar(int x);
...
@ -2242,7 +2242,7 @@ used in Tcl as follows :</p>
</pre></div>
<p>
Although the ANSI C standard does not allow default arguments, default
Although the ISO C standard does not allow default arguments, default
arguments specified in a SWIG interface work with both C and C++.
</p>
@ -2415,7 +2415,7 @@ see <a href="SWIGPlus.html#SWIGPlus_target_language_callbacks">Callbacks to the
<p>
This section describes the behavior of SWIG when processing ANSI C structures and union declarations. Extensions to
This section describes the behavior of SWIG when processing ISO C structures and union declarations. Extensions to
handle C++ are described in the next section.
</p>
@ -3469,7 +3469,7 @@ interface to your program.
SWIG's <tt>%include</tt> directive to process an entire C
source/header file.
<li>Make sure everything in the interface file uses ANSI C/C++ syntax.
<li>Make sure everything in the interface file uses ISO C/C++ syntax.
<li>Make sure all necessary `<tt>typedef</tt>' declarations and
type-information is available in the interface file.

View File

@ -93,7 +93,7 @@ For additions to the original C++ standard, please read the
<a href="CPlusPlus17.html#CPlusPlus17">SWIG and C++17</a> chapters.
As a prerequisite,
you should first read the chapter <a href="SWIG.html#SWIG">SWIG Basics</a> to see
how SWIG wraps ANSI C. Support for C++ builds upon ANSI C
how SWIG wraps ISO C. Support for C++ builds upon ISO C
wrapping and that material will be useful in understanding this chapter.
</p>
@ -144,7 +144,7 @@ yourself in the foot. You will just have to be careful.
<p>
To wrap C++, SWIG uses a layered approach to code generation.
At the lowest level, SWIG generates a collection of procedural ANSI-C style
At the lowest level, SWIG generates a collection of procedural ISO C style
wrappers. These wrappers take care of basic type conversion,
type checking, error handling, and other low-level details of the C++ binding.
These wrappers are also sufficient to bind C++ into any target language

View File

@ -211,7 +211,7 @@ If you do not have access to Visual C++ you will have to set up project files /
<p>
SWIG can also be compiled and run using <a href="http://www.cygwin.com">Cygwin</a> or <a href="http://www.mingw.org">MinGW</a> which provides a Unix like front end to Windows and comes free with gcc, an ANSI C/C++ compiler. However, this is not a recommended approach as the prebuilt executable is supplied.
SWIG can also be compiled and run using <a href="http://www.cygwin.com">Cygwin</a> or <a href="http://www.mingw.org">MinGW</a> which provides a Unix like front end to Windows and comes free with gcc, an ISO C/C++ compiler. However, this is not a recommended approach as the prebuilt executable is supplied.
</p>
<H3><a name="Windows_swig_exe">3.3.1 Building swig.exe on Windows</a></H3>