firefox/Bug-1519629-Document-a-few-more-macros.patch

36 lines
1.3 KiB
Diff
Raw Normal View History

2020-07-27 16:48:25 +08:00
From f8f381bf03b528000e3269451efe945a38fe5f0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
Date: Sun, 13 Jan 2019 21:42:38 +0100
Subject: [PATCH] Bug 1519629 - Document a few more macros.
---
servo/components/style/gecko/regen_atoms.py | 1 +
servo/components/style/gecko_string_cache/namespace.rs | 2 ++
2 files changed, 3 insertions(+)
diff --git a/servo/components/style/gecko/regen_atoms.py b/servo/components/style/gecko/regen_atoms.py
index 3666121..fde5463 100755
--- a/servo/components/style/gecko/regen_atoms.py
+++ b/servo/components/style/gecko/regen_atoms.py
@@ -202,6 +202,7 @@ RULE_TEMPLATE = ('("{atom}") =>\n '
' }}}};')
MACRO = '''
+/// Returns a static atom by passing the literal string it represents.
#[macro_export]
macro_rules! atom {{
{}
diff --git a/servo/components/style/gecko_string_cache/namespace.rs b/servo/components/style/gecko_string_cache/namespace.rs
index aad7b03..cf01819 100644
--- a/servo/components/style/gecko_string_cache/namespace.rs
+++ b/servo/components/style/gecko_string_cache/namespace.rs
@@ -11,6 +11,8 @@ use std::fmt;
use std::ops::Deref;
use string_cache::{Atom, WeakAtom};
+/// In Gecko namespaces are just regular atoms, so this is a simple macro to
+/// forward one macro to the other.
#[macro_export]
macro_rules! ns {
() => {