]> mj.ucw.cz Git - libucw.git/blobdiff - ucw-xml/common.c
JSON: Remove unused includes
[libucw.git] / ucw-xml / common.c
index d6614496a61ff8404010977614f3498e708a3f6c..8c23ce2a4b88bf7be2b99732bbd1fa28e96afe2c 100644 (file)
@@ -96,19 +96,12 @@ static struct xml_context xml_defaults = {
   },
 };
 
-static void
-xml_do_init(struct xml_context *ctx)
-{
-  xml_attrs_table_init(ctx);
-}
-
 void
 xml_init(struct xml_context *ctx)
 {
   *ctx = xml_defaults;
   ctx->pool = mp_new(65536);
   ctx->stack = mp_new(65536);
-  xml_do_init(ctx);
   TRACE(ctx, "init");
 }
 
@@ -116,7 +109,6 @@ void
 xml_cleanup(struct xml_context *ctx)
 {
   TRACE(ctx, "cleanup");
-  xml_attrs_table_cleanup(ctx);
   xml_dtd_cleanup(ctx);
   xml_sources_cleanup(ctx);
   xml_ns_cleanup(ctx);
@@ -128,8 +120,8 @@ void
 xml_reset(struct xml_context *ctx)
 {
   TRACE(ctx, "reset");
-  struct mempool *pool = ctx->pool, *stack = ctx->stack;
-  xml_attrs_table_cleanup(ctx);
+  struct mempool *pool = ctx->pool, *stack = ctx->stack, *ns_pool = ctx->ns_pool;
+  const char **ns_by_id = ctx->ns_by_id;
   xml_dtd_cleanup(ctx);
   xml_sources_cleanup(ctx);
   mp_flush(pool);
@@ -137,6 +129,7 @@ xml_reset(struct xml_context *ctx)
   *ctx = xml_defaults;
   ctx->pool = pool;
   ctx->stack = stack;
+  ctx->ns_pool = ns_pool;
+  ctx->ns_by_id = ns_by_id;
   xml_ns_reset(ctx);
-  xml_do_init(ctx);
 }