diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html index e780af3ff..59aedbe93 100644 --- a/Doc/Manual/Preprocessor.html +++ b/Doc/Manual/Preprocessor.html @@ -86,7 +86,7 @@ by SWIG when it is parsing the interface:
 SWIG                            Always defined when SWIG is processing a file
-SWIGIMPORT                      Defined when SWIG is importing a file with %import
+SWIGIMPORTED                    Defined when SWIG is importing a file with %import
 SWIGMAC                         Defined when running SWIG on the Macintosh
 SWIGWIN                         Defined when running SWIG under Windows
 SWIG_VERSION                    Hexadecimal number containing SWIG version,
diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c
index 11595ea77..e7aef2f40 100644
--- a/Source/Preprocessor/cpp.c
+++ b/Source/Preprocessor/cpp.c
@@ -1028,12 +1028,12 @@ static void add_chunk(DOH *ns, DOH *chunk, int allow) {
 
 /*
   push/pop_imported(): helper functions for defining and undefining
-  SWIGIMPORT (when %importing a file).
+  SWIGIMPORTED (when %importing a file).
  */
 static void
 push_imported() {
   if (imported_depth == 0) {
-    Preprocessor_define("SWIGIMPORT 1", 0);
+    Preprocessor_define("SWIGIMPORTED 1", 0);
   }
   ++imported_depth;
 }
@@ -1042,7 +1042,7 @@ static void
 pop_imported() {
   --imported_depth;
   if (imported_depth == 0) {
-    Preprocessor_undef("SWIGIMPORT");
+    Preprocessor_undef("SWIGIMPORTED");
   }
 }