summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-01-15 07:55:33 +0000
committerMatthias Radestock <matthias@lshift.net>2010-01-15 07:55:33 +0000
commit89b116f2f3c7ca416329a7b4051d06b47dc41e7d (patch)
tree2175c0c7449ddfb33f93021e0856970669994ee0
parent87c0576a2474f55f37ae8aedc190f8c4510d46c1 (diff)
downloadrabbitmq-server-bug19111.tar.gz
recreate branch in correct placebug19111
-rw-r--r--codegen.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/codegen.py b/codegen.py
index 20bfc947..6f39574f 100644
--- a/codegen.py
+++ b/codegen.py
@@ -92,6 +92,40 @@ class PackedMethodBitField:
def full(self):
return self.count() == 8
+
+def printFileHeader():
+ print """%% Autogenerated code. Do not edit.
+%%
+%% The contents of this file are subject to the Mozilla Public License
+%% Version 1.1 (the "License"); you may not use this file except in
+%% compliance with the License. You may obtain a copy of the License at
+%% http://www.mozilla.org/MPL/
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+%% License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% The Original Code is RabbitMQ.
+%%
+%% The Initial Developers of the Original Code are LShift Ltd,
+%% Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
+%%
+%% Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
+%% Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
+%% 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
+%% Ltd. Portions created by Cohesive Financial Technologies LLC are
+%% Copyright (C) 2007-2009 Cohesive Financial Technologies
+%% LLC. Portions created by Rabbit Technologies Ltd are Copyright
+%% (C) 2007-2009 Rabbit Technologies Ltd.
+%%
+%% All Rights Reserved.
+%%
+%% Contributor(s): ______________________________________.
+%%"""
def genErl(spec):
def erlType(domain):
@@ -251,6 +285,7 @@ def genErl(spec):
methods = spec.allMethods()
+ printFileHeader()
print """-module(rabbit_framing).
-include("rabbit_framing.hrl").
@@ -325,6 +360,7 @@ def genHrl(spec):
methods = spec.allMethods()
+ printFileHeader()
print "-define(PROTOCOL_VERSION_MAJOR, %d)." % (spec.major)
print "-define(PROTOCOL_VERSION_MINOR, %d)." % (spec.minor)
print "-define(PROTOCOL_PORT, %d)." % (spec.port)