aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorAkos Kiss <akiss@inf.u-szeged.hu>2015-10-21 14:31:07 +0000
committerAkos Kiss <akiss@inf.u-szeged.hu>2015-10-21 14:31:07 +0000
commit8405ac70c96ccb357b40f8d18e416f766e081aa0 (patch)
treef116cf97815c16b38dba508bd0f17a2930f12137 /components/script/dom
parent7fb3c51bbbbc708b1472cb79751349adff8b9501 (diff)
downloadservo-8405ac70c96ccb357b40f8d18e416f766e081aa0.tar.gz
servo-8405ac70c96ccb357b40f8d18e416f766e081aa0.zip
Fix char types in script binding codegen
Use `libc::c_char` instead of `i8` for character data since that's more portable. (Some architectures, e.g. AArch64, have unsigned characters, i.e. `u8`.)
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index c71e0f354dc..2a3256708a0 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1437,12 +1437,12 @@ class MethodDefiner(PropertyDefiner):
# TODO: Use something like JS_FNSPEC
# https://github.com/servo/servo/issues/6391
if "selfHostedName" in m:
- selfHostedName = '%s as *const u8 as *const i8' % str_to_const_array(m["selfHostedName"])
+ selfHostedName = '%s as *const u8 as *const libc::c_char' % str_to_const_array(m["selfHostedName"])
assert not m.get("methodInfo", True)
accessor = "None"
jitinfo = "0 as *const JSJitInfo"
else:
- selfHostedName = "0 as *const i8"
+ selfHostedName = "0 as *const libc::c_char"
if m.get("methodInfo", True):
identifier = m.get("nativeName", m["name"])
jitinfo = "&%s_methodinfo" % identifier
@@ -1469,7 +1469,7 @@ class MethodDefiner(PropertyDefiner):
' call: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo },\n'
' nargs: 0,\n'
' flags: 0,\n'
- ' selfHostedName: 0 as *const i8\n'
+ ' selfHostedName: 0 as *const libc::c_char\n'
' }',
'JSFunctionSpec',
specData)