[Twisted-Python] c++ style comments in c extension modules

Jon Dyte jon at totient.demon.co.uk
Thu Apr 17 16:19:44 EDT 2003

When building twisted 1.0.3 on solaris using the sun 'cc' compiler, several of the c extension modules fail because 
of the prescence of '//' for a comment in the code. 

grep -n "\/\/" `find . -name "*.c" -print`

./twisted/internet/cReactor/cDelayedCall.c:126:    // self.time += secondsLater
./twisted/internet/cReactor/cDelayedCall.c:170:    // self.time = time() + secondsFromNow
./twisted/internet/cReactor/cReactorTCP.c:159:    char buf[3*20+3+1+100]; // for good measure
./twisted/internet/cReactor/cReactorTime.c:93:        return NULL; // TODO: set exception?
./twisted/internet/cReactor/cReactorTime.c:125:    //return cDelayedCall_cancel(call, NULL);

please can these be replaced with the /* */ to keep the compiler happy?
I'd fix it myself but dont have CVS access.

I think the gnu compiler is more forgiving, unfortunately solaris cc is not.



More information about the Twisted-Python mailing list