[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

Larry Hastings report at bugs.python.org
Tue Jan 21 22:08:02 CET 2014


Larry Hastings added the comment:

I had to throw it in a struct to prevent gcc from rearranging the variables.  But this demonstrates the problem--when it prints the string, it doesn't stop at the end.

-----
#include <stdio.h>

typedef struct
{
        int a;
        char b[8];
        int c;
} abc_t;

int main(int argc, char *argv[])
{
        abc_t abc = {-1, "abcdefgh", -1};
        printf("abc %i%s%i\n", abc.a, abc.b, abc.c);
        return 0;
}
-----

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20323>
_______________________________________


More information about the Python-bugs-list mailing list