Fix the 32-bit build (#30204)

Use the `libc::char` to represent a pointer to characters rather than
`i8`. This fixes the build for the Raspberry Pi and Android 32-bit.
This commit is contained in:
Martin Robinson 2023-08-25 10:11:54 +02:00 committed by GitHub
parent c0898c3a00
commit 65138add46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6020,11 +6020,11 @@ class CGDOMJSProxyHandler_getPrototype(CGAbstractExternMethod):
class CGDOMJSProxyHandler_className(CGAbstractExternMethod):
def __init__(self, descriptor):
args = [Argument('*mut JSContext', 'cx'), Argument('RawHandleObject', '_proxy')]
CGAbstractExternMethod.__init__(self, descriptor, "className", "*const i8", args, doesNotPanic=True)
CGAbstractExternMethod.__init__(self, descriptor, "className", "*const libc::c_char", args, doesNotPanic=True)
self.descriptor = descriptor
def getBody(self):
return '%s as *const u8 as *const i8' % str_to_const_array(self.descriptor.name)
return '%s as *const u8 as *const libc::c_char' % str_to_const_array(self.descriptor.name)
def definition_body(self):
return CGGeneric(self.getBody())