Roman Yakovenko schrieb: > On Feb 12, 2008 10:48 PM, Thomas Heller <[EMAIL PROTECTED]> wrote: >> Roman Yakovenko schrieb: >> > Hi. >> > >> > I looked on generated code for msdia71.dll and this is what I found: >> > >> > # values for enumeration 'SymTagEnum' >> > ... >> > SymTagEnum = 12 >> > ... >> > SymTagEnum = c_int # enum >> > >> > I guess there is a mistake here. >> > >> >> Well, yes. I always has the desire to define a proper enum type for ctypes, >> but it will probably break too much code (and I haven't yet encountered an >> enum type that has the same type name as one of its values). >> >> What I imagined was something like this: >> >> class SymTagEnum(c_enum): >> SymTagNull = 0 >> SymTagExe = 1 >> SymTagCompiland = 2 >> SymTagCompilandDetails = 3 >> SymTagCompilandEnv = 4 >> SymTagFunction = 5 >> SymTagBlock = 6 >> ... >> >> but of course this would add another namespace to access the enum values. > > This is not as bad as you think about it. It will follow pretty close > C++ examples/usage.
No, it would not be bad, but IMO it's too late. I have too much code that accesses enums in typelib wrappers already. I'll think it over. Thomas ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users