X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..be1b46cc784e43cd28c5521bdcde79bd7463fb40:/libs/smux/xer_support.c

diff --git a/libs/smux/xer_support.c b/libs/smux/xer_support.c
index 9e34e692..36b4bfbf 100644
--- a/libs/smux/xer_support.c
+++ b/libs/smux/xer_support.c
@@ -22,16 +22,7 @@ typedef enum {
 	ST_COMMENT_CLO_RT	/* "-->"[1] */
 } pstate_e;
 
-static pxml_chunk_type_e final_chunk_type[] = {
-	PXML_TEXT,
-	PXML_TAG_END,
-	PXML_COMMENT_END,
-	PXML_TAG_END,
-	PXML_COMMENT_END,
-};
-
-
-static int
+static const int
 _charclass[256] = {
 	0,0,0,0,0,0,0,0, 0,1,1,0,1,1,0,0,
 	0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
@@ -79,8 +70,11 @@ _charclass[256] = {
 #define TOKEN_CB(_type, _ns, _current_too)			\
 	TOKEN_CB_CALL(_type, _ns, _current_too, 0)
 
+#define PXML_TAG_FINAL_CHUNK_TYPE      PXML_TAG_END
+#define PXML_COMMENT_FINAL_CHUNK_TYPE  PXML_COMMENT_END
+
 #define TOKEN_CB_FINAL(_type, _ns, _current_too)		\
-	TOKEN_CB_CALL(final_chunk_type[_type], _ns, _current_too, 1)
+	TOKEN_CB_CALL( _type ## _FINAL_CHUNK_TYPE , _ns, _current_too, 1)
 
 /*
  * Parser itself