Lowercase schema so it conforms to member naming conventions

This commit is contained in:
Jason Paryani
2013-08-28 23:11:28 -07:00
parent 28b4c442bd
commit 97cfef4243

View File

@@ -695,8 +695,8 @@ cdef class MessageBuilder:
:return: An object where you will set all the members :return: An object where you will set all the members
""" """
cdef _StructSchema s cdef _StructSchema s
if hasattr(schema, 'Schema'): if hasattr(schema, 'schema'):
s = schema.Schema s = schema.schema
else: else:
s = schema s = schema
return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self) return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self)
@@ -720,8 +720,8 @@ cdef class MessageBuilder:
:return: An object where you will set all the members :return: An object where you will set all the members
""" """
cdef _StructSchema s cdef _StructSchema s
if hasattr(schema, 'Schema'): if hasattr(schema, 'schema'):
s = schema.Schema s = schema.schema
else: else:
s = schema s = schema
return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self) return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)
@@ -742,8 +742,8 @@ cdef class MessageBuilder:
:return: An orphan representing a :class:`_DynamicStructBuilder` :return: An orphan representing a :class:`_DynamicStructBuilder`
""" """
cdef _StructSchema s cdef _StructSchema s
if hasattr(schema, 'Schema'): if hasattr(schema, 'schema'):
s = schema.Schema s = schema.schema
else: else:
s = schema s = schema
@@ -802,8 +802,8 @@ cdef class _MessageReader:
Access members with . syntax. Access members with . syntax.
""" """
cdef _StructSchema s cdef _StructSchema s
if hasattr(schema, 'Schema'): if hasattr(schema, 'schema'):
s = schema.Schema s = schema.schema
else: else:
s = schema s = schema
return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self) return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)
@@ -935,7 +935,7 @@ def load(file_name, display_name=None, imports=[]):
schema = nodeSchema.getNested(node.name) schema = nodeSchema.getNested(node.name)
proto = schema.getProto() proto = schema.getProto()
if proto.isStruct: if proto.isStruct:
local_module.Schema = schema.asStruct() local_module.schema = schema.asStruct()
elif proto.isConst: elif proto.isConst:
module.__dict__[node.name] = schema.asConstValue() module.__dict__[node.name] = schema.asConstValue()