From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani
On 11/19/2015 03:57 PM, Philipp Stephani wrote:
> Thanks. I saw you changed some other members to ptrdiff_t (the public<= br> > size members of emacs_runtime and emacs_env), is that intentional, and=
> if so, what is the reason?
As a general rule, in Emacs source code we prefer signed arithmetic to
unsigned, because the latter is so error prone when it comes to
comparisons. Also, signed arithmetic allows for better low-level
checking, e.g., with -fsanitize=3Dundefined. (There are a few exceptions, e.g., hash values, but they're relatively rare.)=C2=A0 So the module
interface should encourage the use of signed integer arithmetic when
possible.
It might also be useful to support modules that, for whatever reason,
cannot deal with signed integers and must use unsigned integers. That
could be something we add later, if necessary.
> Anyway, emacs-module.h now lacks an #include <stddef.h>.
Thanks, fixed now.