Make public yp2_filter_struct non-const. If not, the linker symbol
[metaproxy-moved-to-github.git] / src / filter_dl.cpp
1 /* $Id: filter_dl.cpp,v 1.3 2006-01-04 11:55:31 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include "config.hpp"
8
9 #include "filter.hpp"
10 #include "router.hpp"
11 #include "package.hpp"
12
13 namespace yp2 {
14     namespace filter {
15         class Filter_dl: public yp2::filter::Base {
16         public:
17             void process(yp2::Package & package) const;
18         };
19     }
20 }
21
22 void yp2::filter::Filter_dl::process(yp2::Package & package) const
23 {
24     package.data() = 42;   // magic checked in test_filter_factory
25 }
26
27 static yp2::filter::Base* filter_creator()
28 {
29     return new yp2::filter::Filter_dl;
30 }
31
32 extern "C" {
33     struct yp2_filter_struct yp2_filter_dl = {
34         0,
35         "dl",
36         filter_creator
37     };
38 }
39
40 /*
41  * Local variables:
42  * c-basic-offset: 4
43  * indent-tabs-mode: nil
44  * c-file-style: "stroustrup"
45  * End:
46  * vim: shiftwidth=4 tabstop=8 expandtab
47  */