struct/dstr.[ch3] (dstr_putc): Accept an `int' argument.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 22 Jun 2013 13:47:31 +0000 (14:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 28 Jun 2013 22:24:18 +0000 (23:24 +0100)
commit2be33c7cbc32a245d360be404a5cc190f4ee0029
treeb8a2485c4324441d1b7b301faaa87d6eb26e9441
parent6f67ad83171d23c0abecde72be8505d9b1faa943
struct/dstr.[ch3] (dstr_putc): Accept an `int' argument.

This is a rather annoying problem.  It's useful to store binary data in
`dstr' objects, and, indeed, characters encoded (as <stdio.h> does) as
`unsigned char' values in an `int' object; but the `char' type of the
argument requires an implicit conversion, which may cause undefined
behaviour, and raises warnings if called with an out-of-range constant
value.
struct/dstr.3
struct/dstr.c
struct/dstr.h