From d7ff889a441a5381dd97229fa2ce4f6769bbaa14 Mon Sep 17 00:00:00 2001 From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl> Date: Wed, 21 Dec 2011 11:33:34 +0100 Subject: [PATCH] add SWIG __hash__ to tag --- swig/tag.i | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/swig/tag.i b/swig/tag.i index dfad31a..9c8f58a 100644 --- a/swig/tag.i +++ b/swig/tag.i @@ -48,6 +48,13 @@ namespace Corpus2 { }; size_t hash_value(const Tag &tag); + + %extend Tag { + long __hash__() { + return (long) hash_value(*self); + } + } + } using namespace std; -- GitLab