(wrong string) ée

From: <git_AT_suckless.org>
Date: Tue, 15 Mar 2016 00:20:09 +0100 (CET)

commit 1ec80039288073294e3e61b0c680e9c95688e786
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Mon Mar 14 20:51:37 2016 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Mon Mar 14 20:51:37 2016 +0100

    Optimise zswap
    
    Signed-off-by: Mattias Andrée <maandree_AT_kth.se>

diff --git a/zahl.h b/zahl.h
index 37711b2..9a03b26 100644
--- a/zahl.h
+++ b/zahl.h
_AT_@ -189,7 +189,6 @@ void zperror(const char *); /* Identical to perror(3p) except it sup
 
 
 ZAHL_INLINE void zinit(z_t a) { a->alloced = 0; a->chars = 0; }
-ZAHL_INLINE void zswap(z_t a, z_t b) { z_t t; *t = *a; *a = *b; *b = *t; }
 ZAHL_INLINE int zeven(z_t a) { return !a->sign || !(a->chars[0] & 1); }
 ZAHL_INLINE int zodd(z_t a) { return a->sign && (a->chars[0] & 1); }
 ZAHL_INLINE int zeven_nonzero(z_t a) { return !(a->chars[0] & 1); }
_AT_@ -201,6 +200,25 @@ ZAHL_INLINE void zneg(z_t a, z_t b) { if (a != b) zset(a, b); a->sign = -a->si
 
 
 ZAHL_INLINE void
+zswap(z_t a, z_t b)
+{
+ z_t t;
+ t->sign = a->sign;
+ a->sign = b->sign;
+ b->sign = t->sign;
+ t->used = b->used;
+ b->used = a->used;
+ a->used = t->used;
+ t->alloced = a->alloced;
+ a->alloced = b->alloced;
+ b->alloced = t->alloced;
+ t->chars = b->chars;
+ b->chars = a->chars;
+ a->chars = t->chars;
+}
+
+
+ZAHL_INLINE void
 zseti(z_t a, int64_t b)
 {
         if (ZAHL_UNLIKELY(b >= 0)) {
Received on Tue Mar 15 2016 - 00:20:09 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 15 2016 - 00:24:15 CET