Ethereal-dev: Re: [Ethereal-dev] ethereal_gen.py & enum problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Tue, 30 Apr 2002 10:14:36 -0500
mika.ju.korpela@xxxxxxxxx wrote:
> 
>         Hi
> 
> There seems to be fault or lack in code in ethereal_gen.py
> IDL types defined like:
> 
> typedef enum yyyy_e
>   {
>     aa,
>     bb
>   } xxx_t;
> 
> are genereted to c code types with suffix _e, however code refers to _t.

Hi,

I took a quick look at your problem description.

Can you try this patch and tell me if it fixes your problem (and doesn't break
anything else )


If it tests out ok, then we can add it to CVS.



--- ethereal_gen.py	2002/04/30 14:41:36	1.1
+++ ethereal_gen.py	2002/04/30 15:03:00	1.3
@@ -1077,7 +1077,7 @@
 
     def get_CDR_enum(self,pn,type):
         #self.st.out(self.template_get_CDR_enum, varname=pn)
-        sname = self.namespace(type, "_")
+        sname = self.namespace(type.unalias(), "_")
         self.st.out(self.template_get_CDR_enum_symbolic, valstringarray=sname)



twas diffed against 2002-04-29 CVS nightly tarball



Cheers / Frank

--

EUS/WV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Mobile : +1 214 228 0874      Amateur Radio: VK3FCS/KM5WS   
Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 7.1 (2.4.3-12 kernel).