@@ -40,6 +40,9 @@ extern "C"
40
40
41
41
#if !defined(ERPC_TYPE_DEFINITIONS{$scopeNamePrefix}{$scopeNameC})
42
42
#define ERPC_TYPE_DEFINITIONS{$scopeNamePrefix}{$scopeNameC}
43
+ {% if not cCommonHeaderFile %}
44
+ {$fillNamespaceBegin()}
45
+ {% endif -- not cCommonHeaderFile %}
43
46
{% if not empty(enums) %}
44
47
45
48
// Enumerators data types declarations
@@ -67,6 +70,9 @@ typedef {$alias.unnamedType}
67
70
{% endfor -- alias.unnamed.members %}
68
71
} {$alias.unnamedName};
69
72
{% else -- alias.typenameName %}
73
+ {% if alias.forwardDecl != "" %}
74
+ {$alias.forwardDecl};
75
+ {% endif -- alias.forwardDecl %}
70
76
typedef {$alias.typenameName};{$alias.ilComment}
71
77
{% endif -- alias.typenameName %}
72
78
{% endfor -- aliases %}
@@ -95,17 +101,24 @@ union {$us.name}
95
101
{% endif -- us.type == "union/struct" %}
96
102
{% endif -- !us.isExternal %}
97
103
{% endfor -- symbols %}
98
-
99
104
{% endif -- nonExternalStruct || nonExternalUnion %}
100
105
{% if not empty(consts) %}
101
106
102
107
// Constant variable declarations
103
108
{% for c in consts %}
104
109
{$> c.mlComment}
110
+ {% if cCommonHeaderFile %}
105
111
extern const {$c.typeAndName};{$c.ilComment}{$loop.addNewLineIfNotLast}
112
+ {% else -- not cCommonHeaderFile %}
113
+ constexpr {$c.typeAndName} = {$c.value};{$c.ilComment}{$loop.addNewLineIfNotLast}
114
+ {% endif -- cCommonHeaderFile %}
106
115
{% endfor -- consts %}
107
116
{% endif -- consts %}
117
+ {% if not cCommonHeaderFile %}
118
+
119
+ {$fillNamespaceEnd()}
108
120
121
+ {% endif -- not cCommonHeaderFile %}
109
122
#endif // ERPC_TYPE_DEFINITIONS{$scopeNamePrefix}{$scopeNameC}
110
123
111
124
{% if cCommonHeaderFile %}
0 commit comments