From: John L. <jl...@ma...> - 2007-06-04 21:19:06
|
On 06/03/2007 04:17 PM, Ben Allan wrote: > I've run into an odd thing about the language i'm binding which > leaves me a puzzle about how best to solve the problem. > At the heart of the issue is that the language i'm binding > does not allow _ in simple identifiers. > > Obviously as C/C++ does allow _ in simple identifiers, > this results in a minor aesthetic problem, but cest la vie. > The chicken and guile modules rename _ to - in identifiers. I suggest you check out how they do it. Just search in Source/Modules/chicken.cxx and Source/Modules/guile.cxx for code like Replaceall( ... , "_", "-"); Basically, we leave the names inside swig with the _, and just change the function name right before it is inserted into the wrapper file. I would be very hesitant to change anything with the type mangling. John |