mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
Pass slices to CreateInterfaceObjects2 rather than raw pointers.
This commit is contained in:
parent
3dece6b7ab
commit
0c54cd1634
2 changed files with 68 additions and 47 deletions
|
@ -1942,8 +1942,8 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
|||
def arrayPtr(name):
|
||||
val = ('%(' + name + ')s') % self.properties.variableNames(False)
|
||||
if val == "ptr::null()":
|
||||
return val
|
||||
return "&%s[0]" % val
|
||||
return "None"
|
||||
return "Some(%s.as_slice())" % val
|
||||
|
||||
call = """return CreateInterfaceObjects2(aCx, aGlobal, aReceiver, parentProto,
|
||||
%s, %s, %d,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue