diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-02-16 14:48:29 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-02-16 14:48:29 +0000 |
| commit | e1b9ba49aec2722af1d71a4e4e107a733169ee6b (patch) | |
| tree | 120a6e285151e3dcf43a904bb9eccb43cdd4799a /codegen.py | |
| parent | 29597039d2141c373d7422e09bf834d8e88be5e5 (diff) | |
| parent | e1107dc9ab7ab91e8a3ce9f95f4cf85773aed3cc (diff) | |
| download | rabbitmq-server-git-e1b9ba49aec2722af1d71a4e4e107a733169ee6b.tar.gz | |
Merging default ⇨ bug 16653
Diffstat (limited to 'codegen.py')
| -rw-r--r-- | codegen.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/codegen.py b/codegen.py index 4455973162..91c70e8196 100644 --- a/codegen.py +++ b/codegen.py @@ -18,11 +18,11 @@ ## are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial ## Technologies LLC, and Rabbit Technologies Ltd. ## -## Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift +## Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift ## Ltd. Portions created by Cohesive Financial Technologies LLC are -## Copyright (C) 2007-2009 Cohesive Financial Technologies +## Copyright (C) 2007-2010 Cohesive Financial Technologies ## LLC. Portions created by Rabbit Technologies Ltd are Copyright -## (C) 2007-2009 Rabbit Technologies Ltd. +## (C) 2007-2010 Rabbit Technologies Ltd. ## ## All Rights Reserved. ## @@ -116,11 +116,11 @@ def printFileHeader(): %% are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial %% Technologies LLC, and Rabbit Technologies Ltd. %% -%% Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift +%% Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift %% Ltd. Portions created by Cohesive Financial Technologies LLC are -%% Copyright (C) 2007-2009 Cohesive Financial Technologies +%% Copyright (C) 2007-2010 Cohesive Financial Technologies %% LLC. Portions created by Rabbit Technologies Ltd are Copyright -%% (C) 2007-2009 Rabbit Technologies Ltd. +%% (C) 2007-2010 Rabbit Technologies Ltd. %% %% All Rights Reserved. %% @@ -214,6 +214,8 @@ def genErl(spec): elif type == 'table': print " F%d = rabbit_binary_parser:parse_table(F%dTab)," % \ (f.index, f.index) + elif type == 'shortstr': + print " if F%dLen > 255 -> exit(method_field_shortstr_overflow); true -> ok end," % (f.index) else: pass @@ -249,7 +251,10 @@ def genErl(spec): elif type == 'table': print " F%dTab = rabbit_binary_generator:generate_table(F%d)," % (f.index, f.index) print " F%dLen = size(F%dTab)," % (f.index, f.index) - elif type in ['shortstr', 'longstr']: + elif type == 'shortstr': + print " F%dLen = size(F%d)," % (f.index, f.index) + print " if F%dLen > 255 -> exit(method_field_shortstr_overflow); true -> ok end," % (f.index) + elif type == 'longstr': print " F%dLen = size(F%d)," % (f.index, f.index) else: pass |
