all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/xelb 0330657: Fix the reply/error sequence number overflow issue
       [not found] ` <E1ZuEYu-00070O-SO@vcs.savannah.gnu.org>
@ 2015-11-05 14:35   ` Stefan Monnier
  2015-11-06  5:45     ` Chris Feng
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-11-05 14:35 UTC (permalink / raw)
  To: emacs-devel; +Cc: Chris Feng

> +    (if (< #x7FFF (abs (- sequence1 sequence2)))
> +        ;; Overflowed
> +        (if (< sequence1 sequence2) 1 -1)
> +      (if (> sequence1 sequence2) 1 -1))))

Aka

       (if (if (< #x7FFF (abs (- sequence1 sequence2)))
               ;; Overflowed
               (< sequence1 sequence2)
             (> sequence1 sequence2))
           1 -1))))

Or even

       (if (funcall (if (< #x7FFF (abs (- sequence1 sequence2))) #'< #'>)
                    sequence1 sequence2)
           1 -1))))


-- Stefan "in redundancy-killing-mode"



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [elpa] externals/xelb 0330657: Fix the reply/error sequence number overflow issue
  2015-11-05 14:35   ` [elpa] externals/xelb 0330657: Fix the reply/error sequence number overflow issue Stefan Monnier
@ 2015-11-06  5:45     ` Chris Feng
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Feng @ 2015-11-06  5:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>> +    (if (< #x7FFF (abs (- sequence1 sequence2)))
>> +        ;; Overflowed
>> +        (if (< sequence1 sequence2) 1 -1)
>> +      (if (> sequence1 sequence2) 1 -1))))
>
> Aka
>
>        (if (if (< #x7FFF (abs (- sequence1 sequence2)))
>                ;; Overflowed
>                (< sequence1 sequence2)
>              (> sequence1 sequence2))
>            1 -1))))
>
> Or even
>
>        (if (funcall (if (< #x7FFF (abs (- sequence1 sequence2))) #'< #'>)
>                     sequence1 sequence2)
>            1 -1))))
>
>
> -- Stefan "in redundancy-killing-mode"

Thanks, Stefan.  I've made the function return the difference of
sequence numbers instead, which should be cleaner.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-06  5:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20151105070219.26719.57321@vcs.savannah.gnu.org>
     [not found] ` <E1ZuEYu-00070O-SO@vcs.savannah.gnu.org>
2015-11-05 14:35   ` [elpa] externals/xelb 0330657: Fix the reply/error sequence number overflow issue Stefan Monnier
2015-11-06  5:45     ` Chris Feng

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.