Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the MozMap type. #13332

Merged
merged 7 commits into from Sep 21, 2016

Rename innerSequenceType to innerContainerType.

  • Loading branch information
Ms2ger committed Sep 21, 2016
commit b2fc80a8479549fe26abbfcd06edeadd325461e3
@@ -92,7 +92,7 @@ def stripTrailingWhitespace(text):
return '\n'.join(lines) + tail


def innerSequenceType(type):
def innerContainerType(type):
assert type.isSequence()
return type.inner.inner if type.nullable() else type.inner

@@ -725,7 +725,7 @@ def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type,
raise TypeError("Can't handle array arguments yet")

if type.isSequence():
innerInfo = getJSToNativeConversionInfo(innerSequenceType(type),
innerInfo = getJSToNativeConversionInfo(innerContainerType(type),
descriptorProvider,
isMember=isMember)
declType = CGWrapper(innerInfo.declType, pre="Vec<", post=">")
@@ -1351,7 +1351,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider):
result = CGWrapper(result, pre="Option<", post=">")
return result
if returnType.isSequence():
result = getRetvalDeclarationForType(innerSequenceType(returnType), descriptorProvider)
result = getRetvalDeclarationForType(innerContainerType(returnType), descriptorProvider)
result = CGWrapper(result, pre="Vec<", post=">")
if returnType.nullable():
result = CGWrapper(result, pre="Option<", post=">")
@@ -3997,7 +3997,7 @@ def getUnionTypeTemplateVars(type, descriptorProvider):
typeName = name
elif type.isSequence():
name = type.name
inner = getUnionTypeTemplateVars(innerSequenceType(type), descriptorProvider)
inner = getUnionTypeTemplateVars(innerContainerType(type), descriptorProvider)
typeName = "Vec<" + inner["typeName"] + ">"
elif type.isByteString():
name = type.name
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.