Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
108399ea
Commit
108399ea
authored
13 years ago
by
Adam Radziszewski
Browse files
Options
Downloads
Patches
Plain Diff
fix SWIG != operator, advance ver
parent
9579dc4e
Branches
Branches containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
swig/lexeme.i
+5
-0
5 additions, 0 deletions
swig/lexeme.i
swig/tag.i
+6
-1
6 additions, 1 deletion
swig/tag.i
swig/token.i
+8
-0
8 additions, 0 deletions
swig/token.i
with
20 additions
and
2 deletions
CMakeLists.txt
+
1
−
1
View file @
108399ea
...
...
@@ -2,7 +2,7 @@ PROJECT(Corpus2Library)
set
(
corpus2_ver_major
"1"
)
set
(
corpus2_ver_minor
"0"
)
set
(
corpus2_ver_patch
"1
5
"
)
set
(
corpus2_ver_patch
"1
6
"
)
cmake_minimum_required
(
VERSION 2.8.0
)
...
...
This diff is collapsed.
Click to expand it.
swig/lexeme.i
+
5
−
0
View file @
108399ea
...
...
@@ -48,6 +48,11 @@ namespace Corpus2 {
Corpus2::Tag tag() {
return Corpus2::Tag(self->tag().get_pos(), self->tag().get_values());
}
// otherwise x != y wont trigger operator==
%pythoncode %{
def __ne__(self, other):
return not self.__eq__(other)
%}
}
}
...
...
This diff is collapsed.
Click to expand it.
swig/tag.i
+
6
−
1
View file @
108399ea
...
...
@@ -49,10 +49,15 @@ namespace Corpus2 {
size_t hash_value(const Tag &tag);
%extend Tag {
%extend Tag {
long __hash__() {
return (long) hash_value(*self);
}
// otherwise x != y wont trigger operator==
%pythoncode %{
def __ne__(self, other):
return not self.__eq__(other)
%}
}
}
...
...
This diff is collapsed.
Click to expand it.
swig/token.i
+
8
−
0
View file @
108399ea
...
...
@@ -68,6 +68,14 @@ namespace Corpus2 {
void set_metadata(TokenMetaData& md);
void set_metadata_ptr(boost::shared_ptr<TokenMetaData> md);
};
%extend Token {
// otherwise x != y wont trigger operator==
%pythoncode %{
def __ne__(self, other):
return not self.__eq__(other)
%}
}
}
using
namespace
std
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment