sethrj/PyTRT — Issue #1: error: stray ‘##’ in program
Author: kylef
Created: 2012-02-28 13:52:27+00:00
State: open

I am getting the following errors while trying to use generators.i with a project. I am using swig 2.0.4 with python 3.2.2.

» make
Generating ZNC API for python...
Building ZNC python bindings library...In file included from modpython/_znc_core.cpp:3250:0:
./modpython/generators.i:110:1: error: stray ‘##’ in program
./modpython/generators.i:125:17: error: stray ‘##’ in program
./modpython/generators.i:126:17: error: stray ‘##’ in program
./modpython/generators.i:127:17: error: stray ‘##’ in program
./modpython/generators.i:131:1: error: stray ‘##’ in program
./modpython/generators.i:146:1: error: stray ‘##’ in program
./modpython/generators.i:146:1: error: stray ‘##’ in program
./modpython/generators.i:166:17: error: stray ‘##’ in program
./modpython/generators.i:167:17: error: stray ‘##’ in program
./modpython/generators.i:168:17: error: stray ‘##’ in program
./modpython/generators.i:174:1: error: stray ‘##’ in program
./modpython/generators.i:180:1: error: stray ‘##’ in program
./modpython/generators.i:180:1: error: stray ‘##’ in program
./modpython/generators.i:200:1: error: stray ‘##’ in program
./modpython/generators.i:200:1: error: stray ‘##’ in program
./modpython/generators.i:216:13: error: stray ‘##’ in program
./modpython/generators.i:216:13: error: stray ‘##’ in program
./modpython/generators.i:231:13: error: stray ‘##’ in program
./modpython/generators.i:231:13: error: stray ‘##’ in program
./modpython/generators.i:65:1: error: expected unqualified-id before ‘%’ token
./modpython/generators.i:107:1: error: expected unqualified-id before ‘%’ token
make[1]: *** [modpython/_znc_core.o] Error 1
make: *** [modules] Error 2

diff --git a/modules/modpython/modpython.i b/modules/modpython/modpython.i
index df2cd6a..24c8771 100644
--- a/modules/modpython/modpython.i
+++ b/modules/modpython/modpython.i
@@ -32,6 +32,9 @@
#include "modpython/module.h"

#include "modpython/retstring.h"
+#include "modpython/generators.i"
+
+ADDCONTAINER_ITERATOR( CModules )

#define stat struct stat
using std::allocator;