d0e79e687b48c0bb3408dae7af3296ddd9979813
[platform/upstream/libzypp.git] / packaging / fix_swig_syntax_error.patch
1 diff --git a/zypp/Patch.h b/zypp/Patch.h
2 index 33de43c82..1ba453a8a 100644
3 --- a/zypp/Patch.h
4 +++ b/zypp/Patch.h
5 @@ -107,7 +107,7 @@ namespace zypp
6        bool isCategory( const std::string & category_r ) const;
7        /** \overload taking OR'ed \ref Categories */
8        bool isCategory( Categories category_r ) const;
9 -
10 +#ifndef SWIG // Swig treats it as syntax error
11        /** \overload taking container of category strings
12         * 2nd template arg just to prevent instantiation for Category
13         */
14 @@ -118,7 +118,7 @@ namespace zypp
15         { if ( isCategory( el ) ) return true; }
16         return false;
17        }
18 -
19 +#endif
20        /** Patch category as enum of wellknown categories.
21         * Unknown values are mapped to \ref CAT_OTHER.
22         */
23 @@ -143,7 +143,7 @@ namespace zypp
24        bool isSeverity( const std::string & severity_r ) const;
25        /** \overload taking OR'ed \ref SeverityFlags */
26        bool isSeverity( SeverityFlags severity_r ) const;
27 -
28 +#ifndef SWIG // Swig treats it as syntax error
29        /** \overload taking container of severity strings
30         * 2nd template arg just to prevent instantiation for SeverityFlag
31         */
32 @@ -154,7 +154,7 @@ namespace zypp
33         { if ( isSeverity( el ) ) return true; }
34         return false;
35        }
36 -
37 +#endif
38        /** Severity string mapped to an enum.
39         * Unknown string values are mapped to \ref SEV_OTHER
40         */
41 diff --git a/zypp/ResPool.h b/zypp/ResPool.h
42 index 88b1844f6..b3adf33a9 100644
43 --- a/zypp/ResPool.h
44 +++ b/zypp/ResPool.h
45 @@ -335,7 +335,9 @@ namespace zypp
46         * content changes. User code usually want's to call \ref changedPseudoInstalled
47         * directly.
48         */
49 +#ifndef SWIG // Swig treats it as syntax error
50        EstablishedStates establishedStates() const;
51 +#endif
52  
53        /** Map holding pseudo installed items where current and established status differ. */
54        typedef EstablishedStates::ChangedPseudoInstalled ChangedPseudoInstalled;