OLD | NEW |
1 {% from "macros.tmpl" import license -%} | 1 {% from "macros.tmpl" import license -%} |
2 {{ license() }} | 2 {{ license() }} |
3 | 3 |
4 #include "config.h" | 4 #include "config.h" |
5 | 5 |
6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC | 6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC |
7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1 | 7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1 |
8 #else | 8 #else |
9 #define QNAME_DEFAULT_CONSTRUCTOR 1 | 9 #define QNAME_DEFAULT_CONSTRUCTOR 1 |
10 #endif | 10 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
21 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI) | 21 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI) |
22 | 22 |
23 {%- if tags %} | 23 {%- if tags %} |
24 | 24 |
25 // Tags | 25 // Tags |
26 {%- for tag in tags|sort %} | 26 {%- for tag in tags|sort %} |
27 DEFINE_GLOBAL(QualifiedName, {{tag|symbol}}Tag) | 27 DEFINE_GLOBAL(QualifiedName, {{tag|symbol}}Tag) |
28 {%- endfor %} | 28 {%- endfor %} |
29 | 29 |
30 | 30 |
31 WebCore::QualifiedName** get{{namespace}}Tags() | 31 const WebCore::QualifiedName* const* get{{namespace}}Tags() |
32 { | 32 { |
33 static WebCore::QualifiedName* {{namespace}}Tags[] = { | 33 static const WebCore::QualifiedName* const {{namespace}}Tags[] = { |
34 {%- for tag in tags|sort %} | 34 {%- for tag in tags|sort %} |
35 (WebCore::QualifiedName*)&{{tag|symbol}}Tag, | 35 (WebCore::QualifiedName*)&{{tag|symbol}}Tag, |
36 {%- endfor %} | 36 {%- endfor %} |
37 }; | 37 }; |
38 return {{namespace}}Tags; | 38 return {{namespace}}Tags; |
39 } | 39 } |
40 | 40 |
41 {%- endif %} | 41 {%- endif %} |
42 | 42 |
43 // Attributes | 43 // Attributes |
44 {%- for attr in attrs|sort %} | 44 {%- for attr in attrs|sort %} |
45 DEFINE_GLOBAL(QualifiedName, {{attr|symbol}}Attr) | 45 DEFINE_GLOBAL(QualifiedName, {{attr|symbol}}Attr) |
46 {%- endfor %} | 46 {%- endfor %} |
47 | 47 |
48 WebCore::QualifiedName** get{{namespace}}Attrs() | 48 const WebCore::QualifiedName* const* get{{namespace}}Attrs() |
49 { | 49 { |
50 static WebCore::QualifiedName* {{namespace}}Attrs[] = { | 50 static const WebCore::QualifiedName* const {{namespace}}Attrs[] = { |
51 {%- for attr in attrs|sort %} | 51 {%- for attr in attrs|sort %} |
52 (WebCore::QualifiedName*)&{{attr|symbol}}Attr, | 52 (WebCore::QualifiedName*)&{{attr|symbol}}Attr, |
53 {%- endfor %} | 53 {%- endfor %} |
54 }; | 54 }; |
55 return {{namespace}}Attrs; | 55 return {{namespace}}Attrs; |
56 } | 56 } |
57 | 57 |
58 void init() | 58 void init() |
59 { | 59 { |
60 // Use placement new to initialize the globals. | 60 // Use placement new to initialize the globals. |
(...skipping 16 matching lines...) Expand all Loading... |
77 {%- if use_namespace_for_attrs %} | 77 {%- if use_namespace_for_attrs %} |
78 createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl, {{name
space_prefix}}NS); | 78 createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl, {{name
space_prefix}}NS); |
79 {%- else %} | 79 {%- else %} |
80 createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl); | 80 createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl); |
81 {%- endif %} | 81 {%- endif %} |
82 {%- endfor %} | 82 {%- endfor %} |
83 } | 83 } |
84 | 84 |
85 } // {{namespace}} | 85 } // {{namespace}} |
86 } // WebCore | 86 } // WebCore |
OLD | NEW |