Skip to content

Commit 7a7b104

Browse files
author
Matthias Radestock
committed
recreate branch in correct place
1 parent 76fd452 commit 7a7b104

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

codegen.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,40 @@ def count(self):
9292

9393
def full(self):
9494
return self.count() == 8
95+
96+
def printFileHeader():
97+
print """%% Autogenerated code. Do not edit.
98+
%%
99+
%% The contents of this file are subject to the Mozilla Public License
100+
%% Version 1.1 (the "License"); you may not use this file except in
101+
%% compliance with the License. You may obtain a copy of the License at
102+
%% http://www.mozilla.org/MPL/
103+
%%
104+
%% Software distributed under the License is distributed on an "AS IS"
105+
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
106+
%% License for the specific language governing rights and limitations
107+
%% under the License.
108+
%%
109+
%% The Original Code is RabbitMQ.
110+
%%
111+
%% The Initial Developers of the Original Code are LShift Ltd,
112+
%% Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
113+
%%
114+
%% Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
115+
%% Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
116+
%% are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
117+
%% Technologies LLC, and Rabbit Technologies Ltd.
118+
%%
119+
%% Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
120+
%% Ltd. Portions created by Cohesive Financial Technologies LLC are
121+
%% Copyright (C) 2007-2009 Cohesive Financial Technologies
122+
%% LLC. Portions created by Rabbit Technologies Ltd are Copyright
123+
%% (C) 2007-2009 Rabbit Technologies Ltd.
124+
%%
125+
%% All Rights Reserved.
126+
%%
127+
%% Contributor(s): ______________________________________.
128+
%%"""
95129

96130
def genErl(spec):
97131
def erlType(domain):
@@ -251,6 +285,7 @@ def genAmqpException(c,v,cls):
251285

252286
methods = spec.allMethods()
253287

288+
printFileHeader()
254289
print """-module(rabbit_framing).
255290
-include("rabbit_framing.hrl").
256291
@@ -325,6 +360,7 @@ def fillField(field):
325360

326361
methods = spec.allMethods()
327362

363+
printFileHeader()
328364
print "-define(PROTOCOL_VERSION_MAJOR, %d)." % (spec.major)
329365
print "-define(PROTOCOL_VERSION_MINOR, %d)." % (spec.minor)
330366
print "-define(PROTOCOL_PORT, %d)." % (spec.port)

0 commit comments

Comments
 (0)