Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41235 - in /trunk/python-bindings/src/YCPTypes: Term.cc YCPTypesInternal.cc
  • From: dfiser@xxxxxxxxxxxxxxxx
  • Date: Wed, 03 Oct 2007 13:53:21 -0000
  • Message-id: <20071003135321.801AB2FC6F@xxxxxxxxxxxxxxxx>
Author: dfiser
Date: Wed Oct  3 15:53:21 2007
New Revision: 41235

URL: http://svn.opensuse.org/viewcvs/yast?rev=41235&view=rev
Log:
 - Fixed hash functions for YCP Types.


Modified:
    trunk/python-bindings/src/YCPTypes/Term.cc
    trunk/python-bindings/src/YCPTypes/YCPTypesInternal.cc

Modified: trunk/python-bindings/src/YCPTypes/Term.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YCPTypes/Term.cc?rev=41235&r1=41234&r2=41235&view=diff
==============================================================================
--- trunk/python-bindings/src/YCPTypes/Term.cc (original)
+++ trunk/python-bindings/src/YCPTypes/Term.cc Wed Oct  3 15:53:21 2007
@@ -85,7 +85,7 @@
  */
 static long Term_hash(Term *self)
 {
-    if (self->hash != -1){
+    if (self->hash == -1){
         self->hash = PyObject_Hash(self->name) + PyObject_Hash(self->value);
     }
     return self->hash;

Modified: trunk/python-bindings/src/YCPTypes/YCPTypesInternal.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YCPTypes/YCPTypesInternal.cc?rev=41235&r1=41234&r2=41235&view=diff
==============================================================================
--- trunk/python-bindings/src/YCPTypes/YCPTypesInternal.cc (original)
+++ trunk/python-bindings/src/YCPTypes/YCPTypesInternal.cc Wed Oct  3 15:53:21 2007
@@ -45,7 +45,7 @@
 
 long YCPTypeString_hash(YCPTypeString *self)
 {
-    if (self->hash != -1){
+    if (self->hash == -1){
         self->hash = PyObject_Hash(self->value);
     }
     return self->hash;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages