aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/regen_atoms.py
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2017-10-09 09:27:11 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2017-10-09 09:27:11 +1100
commit7628c1236a6474b4c7b96be605c28f072bf6df8a (patch)
tree74db60c3103480cf23b995c6893d8101567d9857 /components/style/gecko/regen_atoms.py
parent55a37930b218713fff4ba84b4fa1e43a0455e498 (diff)
downloadservo-7628c1236a6474b4c7b96be605c28f072bf6df8a.tar.gz
servo-7628c1236a6474b4c7b96be605c28f072bf6df8a.zip
Rename nsIAtom as nsAtom.
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of nsISupports. This means that nsAtom is now a better name for it than nsIAtom.
Diffstat (limited to 'components/style/gecko/regen_atoms.py')
-rwxr-xr-xcomponents/style/gecko/regen_atoms.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/style/gecko/regen_atoms.py b/components/style/gecko/regen_atoms.py
index f47f036a592..7ee1ccab308 100755
--- a/components/style/gecko/regen_atoms.py
+++ b/components/style/gecko/regen_atoms.py
@@ -42,14 +42,14 @@ class GkAtomSource:
PATTERN = re.compile('^(GK_ATOM)\((.+),\s*"(.*)"\)')
FILE = "include/nsGkAtomList.h"
CLASS = "nsGkAtoms"
- TYPE = "nsIAtom"
+ TYPE = "nsAtom"
class CSSPseudoElementsAtomSource:
PATTERN = re.compile('^(CSS_PSEUDO_ELEMENT)\((.+),\s*"(.*)",')
FILE = "include/nsCSSPseudoElementList.h"
CLASS = "nsCSSPseudoElements"
- # NB: nsICSSPseudoElement is effectively the same as a nsIAtom, but we need
+ # NB: nsICSSPseudoElement is effectively the same as a nsAtom, but we need
# this for MSVC name mangling.
TYPE = "nsICSSPseudoElement"
@@ -163,14 +163,14 @@ class FileAvoidWrite(BytesIO):
self.close()
-IMPORTS = ("\nuse gecko_bindings::structs::nsIAtom;"
+IMPORTS = ("\nuse gecko_bindings::structs::nsAtom;"
"\nuse string_cache::Atom;\n\n")
ATOM_TEMPLATE = (" #[link_name = \"{link_name}\"]\n"
" pub static {name}: *mut {type};")
UNSAFE_STATIC = ("#[inline(always)]\n"
- "pub unsafe fn atom_from_static(ptr: *mut nsIAtom) -> Atom {\n"
+ "pub unsafe fn atom_from_static(ptr: *mut nsAtom) -> Atom {\n"
" Atom::from_static(ptr)\n"
"}\n\n")
@@ -220,7 +220,7 @@ def write_atom_macro(atoms, file_name):
f.write(IMPORTS)
for source in SOURCES:
- if source.TYPE != "nsIAtom":
+ if source.TYPE != "nsAtom":
f.write("pub enum {} {{}}\n\n".format(source.TYPE))
f.write(UNSAFE_STATIC)