summaryrefslogtreecommitdiffstats
path: root/constants.awk
blob: 18f8002e39ddeda1e48d2bdb8081831b784dbfe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
BEGIN {
    print "static PY_CONSTANT_REC py_constants[] = {";
}

{
    if (NF >= 2)
        constant = $2;
    else
        constant = $1;

    printf("    {\"%s\", %25s},\n", $1, constant);
}

END {
    print "    {NULL}";
    print "};"
}