Skip to content

Commit 27977d7

Browse files
committed
undefine all names
Windows/msvc started defining some
1 parent b662657 commit 27977d7

2 files changed

Lines changed: 90 additions & 1 deletion

File tree

src/stringconstants.c

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,90 @@
44
Edit that - do not edit this file
55
*/
66

7+
8+
#undef closed
9+
#undef s_1e999
10+
#undef s0_0
11+
#undef s1e999
12+
#undef Begin
13+
#undef BestIndex
14+
#undef BestIndexObject
15+
#undef Close
16+
#undef Column
17+
#undef ColumnNoChange
18+
#undef Commit
19+
#undef Connect
20+
#undef Create
21+
#undef DELETE
22+
#undef Destroy
23+
#undef Disconnect
24+
#undef Eof
25+
#undef Filter
26+
#undef FindFunction
27+
#undef INSERT
28+
#undef Integrity
29+
#undef sNULL
30+
#undef Next
31+
#undef Open
32+
#undef Release
33+
#undef Rename
34+
#undef Rollback
35+
#undef RollbackTo
36+
#undef Rowid
37+
#undef Savepoint
38+
#undef ShadowName
39+
#undef Sync
40+
#undef UPDATE
41+
#undef UpdateChangeRow
42+
#undef UpdateDeleteRow
43+
#undef UpdateInsertRow
44+
#undef add_note
45+
#undef can_cache
46+
#undef close
47+
#undef connection_hooks
48+
#undef cursor
49+
#undef error_offset
50+
#undef excepthook
51+
#undef execute
52+
#undef executemany
53+
#undef extendedresult
54+
#undef final
55+
#undef get
56+
#undef inverse
57+
#undef release
58+
#undef result
59+
#undef step
60+
#undef value
61+
#undef xAccess
62+
#undef xCheckReservedLock
63+
#undef xClose
64+
#undef xCurrentTime
65+
#undef xCurrentTimeInt64
66+
#undef xDelete
67+
#undef xDeviceCharacteristics
68+
#undef xDlClose
69+
#undef xDlError
70+
#undef xDlOpen
71+
#undef xDlSym
72+
#undef xFileControl
73+
#undef xFileSize
74+
#undef xFullPathname
75+
#undef xGetLastError
76+
#undef xGetSystemCall
77+
#undef xLock
78+
#undef xNextSystemCall
79+
#undef xOpen
80+
#undef xRandomness
81+
#undef xRead
82+
#undef xSectorSize
83+
#undef xSetSystemCall
84+
#undef xSleep
85+
#undef xSync
86+
#undef xTruncate
87+
#undef xUnlock
88+
#undef xWrite
89+
90+
791
static struct _apsw_string_table
892
{
993
PyObject *closed;

tools/genstrings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,16 @@ def mangle(name):
6767
6868
Edit that - do not edit this file
6969
*/
70+
7071
"""
7172

7273
print(header)
7374

74-
print("static struct _apsw_string_table\n{")
75+
# undefine all the names because Windows/msvc
76+
for name in names:
77+
print(f"#undef {mangle(name)}")
78+
79+
print("\n\nstatic struct _apsw_string_table\n{")
7580
for n in names:
7681
print(f" PyObject *{ mangle(n) };")
7782
print("""} apst = {0};""")

0 commit comments

Comments
 (0)