I have code in python that integrates c++ code using swig.
The c++ class has a field with the long value 1393685280 which is converted to python.
The problem is that when calling the getter of this field from python I get the int value -2901282016 instead.
How can I fix it?
Thanks
Well, sorry to give everyone the run-around on this one. 
We found the solution and it's completely unrelated to SWIG. 
Problem emanated from the ODBC driver for the Vertica DB we were using which behaved unpredictably when using a long variable to bind the SQL result to. 
Tomer and Inbal
swig converts a positive long to negative int