aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal_gen.py
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-10-18 21:49:58 +0000
committerGuy Harris <guy@alum.mit.edu>2001-10-18 21:49:58 +0000
commit40e944337db43f01ee2fb69cc9dc43f63d32578b (patch)
tree81cb25e13a149efa0bc1ed6a122a30a813d0538f /ethereal_gen.py
parent3c78feeadc1bd3ebc000860244b2251aead2224f (diff)
From Frank Singleton: catch attempts to use recursive unions or
structures. svn path=/trunk/; revision=4040
Diffstat (limited to 'ethereal_gen.py')
-rw-r--r--ethereal_gen.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/ethereal_gen.py b/ethereal_gen.py
index 83a622d6db..3903976940 100644
--- a/ethereal_gen.py
+++ b/ethereal_gen.py
@@ -1,6 +1,6 @@
# -*- python -*-
#
-# $Id: ethereal_gen.py,v 1.12 2001/10/12 17:14:41 guy Exp $
+# $Id: ethereal_gen.py,v 1.13 2001/10/18 21:49:58 guy Exp $
#
# ethereal_gen.py (part of idl2eth)
#
@@ -1095,6 +1095,10 @@ class ethereal_gen_C:
if self.DEBUG:
print "XXX Union ntype =" , ntype
+ if ntype.recursive():
+ sys.stderr.write( "Error: idl2eth does not handle recursive unions yet \n")
+ sys.exit(1)
+
st = ntype.switchType()
@@ -1245,7 +1249,11 @@ class ethereal_gen_C:
ntype = type.decl().alias().aliasType().decl()
else:
ntype = type.decl() # I am a struct node
-
+
+ if ntype.recursive():
+ sys.stderr.write("Error: idl2eth does not handle recursive structs yet \n")
+ sys.exit(1)
+
for m in ntype.members():
for decl in m.declarators():
if decl.sizes(): # an array