summaryrefslogtreecommitdiff
path: root/icespider/xslt
diff options
context:
space:
mode:
Diffstat (limited to 'icespider/xslt')
-rw-r--r--icespider/xslt/exslt-init.cpp34
-rw-r--r--icespider/xslt/xsltStreamSerializer.cpp24
2 files changed, 31 insertions, 27 deletions
diff --git a/icespider/xslt/exslt-init.cpp b/icespider/xslt/exslt-init.cpp
index 110a999..55b2407 100644
--- a/icespider/xslt/exslt-init.cpp
+++ b/icespider/xslt/exslt-init.cpp
@@ -2,23 +2,25 @@
#include <libxml/parser.h>
#include <libxslt/xslt.h>
-static void initLibXml() __attribute__((constructor(102)));
+namespace {
+ void initLibXml() __attribute__((constructor(102)));
-void
-initLibXml()
-{
- xmlInitParser();
- exsltRegisterAll();
-}
+ void
+ initLibXml()
+ {
+ xmlInitParser();
+ exsltRegisterAll();
+ }
-// LCOV_EXCL_START lcov actually misses destructor functions
-static void cleanupLibXml() __attribute__((destructor(102)));
+ // LCOV_EXCL_START lcov actually misses destructor functions
+ static void cleanupLibXml() __attribute__((destructor(102)));
-void
-cleanupLibXml()
-{
- xsltCleanupGlobals();
- xmlCleanupParser();
-}
+ void
+ cleanupLibXml()
+ {
+ xsltCleanupGlobals();
+ xmlCleanupParser();
+ }
-// LCOV_EXCL_STOP
+ // LCOV_EXCL_STOP
+}
diff --git a/icespider/xslt/xsltStreamSerializer.cpp b/icespider/xslt/xsltStreamSerializer.cpp
index 6fb265c..6fbe8ed 100644
--- a/icespider/xslt/xsltStreamSerializer.cpp
+++ b/icespider/xslt/xsltStreamSerializer.cpp
@@ -16,18 +16,20 @@
#include <slicer/xml/serializer.h>
namespace IceSpider {
- static int
- xmlstrmclosecallback(void * context)
- {
- static_cast<std::ostream *>(context)->flush();
- return 0;
- }
+ namespace {
+ int
+ xmlstrmclosecallback(void * context)
+ {
+ static_cast<std::ostream *>(context)->flush();
+ return 0;
+ }
- static int
- xmlstrmwritecallback(void * context, const char * buffer, int len)
- {
- static_cast<std::ostream *>(context)->write(buffer, len);
- return len;
+ int
+ xmlstrmwritecallback(void * context, const char * buffer, int len)
+ {
+ static_cast<std::ostream *>(context)->write(buffer, len);
+ return len;
+ }
}
XsltStreamSerializer::IceSpiderFactory::IceSpiderFactory(const char * path) :