aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal_gen.py
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-10-18 21:49:58 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-10-18 21:49:58 +0000
commit880b3f4724b7ab8aabec276e11b461522ae10056 (patch)
tree81cb25e13a149efa0bc1ed6a122a30a813d0538f /ethereal_gen.py
parente09f3c03cf06f44f996f5f603e7c8ef46a0e4a30 (diff)
From Frank Singleton: catch attempts to use recursive unions or
structures. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4040 f5534014-38df-0310-8fa8-9805f1628bb7
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