|
From: David P. <dpi...@me...> - 2007-10-15 23:14:04
|
> Well this particular issue has never been brought up before and by > pulling the problem apart and looking at the behaviour, can kick off > discussions and ideas to workaround the problem. From your follow up > email, it looks as though you have a solution using ideas in the email > which is what I was hoping as I don't know your code nor your > constraints and requirements as to what you can and can't do.=20 Well, I'm a bit of a "Freedom Nazi" sometimes. I want to be free to do things however the heck I want to ;) I'm wrapping a pretty big commercial library so I tend to run into snags once in awhile--overall I'm impressed with SWIG's power, although it took a long time to learn it all. My constraint is mainly that I want to be able to have a C# API that feels like it was designed for C#. Hence there should be no enum prefixes, and I use %attribute extensively, as well as reference counting and various other advanced SWIG features I need to make APIs that are not too much different from native C# libraries. These enum name collisions just tend to happen naturally because of (1) dumb luck and (2) some of the enum values are the names of types, e.g. I have a data type called PointG and an enum value ADT_PointG that represents that data type (where ADT=3DAttribute Data Type). I can think of a couple of possible changes to SWIG that would solve my enum problem, but if I'm the only one that needs to trim off enum prefixes then I really shouldn't bother you with them. I'm content enough with #ifdef SWIG / dummy namespace trickery. > I also do > this in my (not very much) spare time without being paid and as such > will not always provide a complete and thorough solution, rather > thoughts and references as to where the solution may lie. Yes, I'm sorry if my tone felt like an attack. A lot of unpaid open source developers should be given medals, or better yet, salaries :) |