From 848cb3f95ec6f5f77f8ee28773d197d7035a8454 Mon Sep 17 00:00:00 2001
From: Olly Betts
+ISO C has a separate tag name space in which the names of structures, +unions and enumerated types are put, which is separate from the +name space for ordinary identifiers (function names, object names, +typedef names, enumeration constants). For example, this is valid +ISO C because Foo the struct tag and Foo the function +name are in different name spaces: +
+ +
+struct Foo {
+ int bar;
+};
+
+int Foo(void) { return 42; }
++SWIG doesn't currently implement this separate tag name space and +for the above example you'll get: +
+ ++foo.i:5: Warning 302: Identifier 'Foo' redefined (ignored), +foo.i:1: Warning 302: previous definition of 'Foo'. +
+In practice this rarely actually causes problems, particular because +SWIG has special handling for typedef so cases such as this +work: +
+ +
+typedef struct Foo {
+ int bar;
+} Foo;
+If SWIG encounters the definition of a structure or union, it creates a set of accessor functions. Although SWIG does not need @@ -2539,8 +2578,7 @@ to an individual member. For example, the declaration :
struct Vector {
double x, y, z;
-}
-
+};