Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a747f8

Browse files
committed
Address the following problem on DOS and Win 3.1, reported by Jim
Ahlstrom: Arraymodule.c has static functions H_getitem and h_getitem, and a few others which differ only in case. These are a problem on Windows 3.1, since a case-sensitive link causes Winsock to fail (hey, it's not my fault). Please convert H_etc to HH_etc etc.
1 parent 29168ce commit 1a747f8

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

Modules/arraymodule.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ b_setitem(ap, i, v)
121121
}
122122

123123
static PyObject *
124-
B_getitem(ap, i)
124+
BB_getitem(ap, i)
125125
arrayobject *ap;
126126
int i;
127127
{
128128
long x = ((unsigned char *)ap->ob_item)[i];
129129
return PyInt_FromLong(x);
130130
}
131131

132-
#define B_setitem b_setitem
132+
#define BB_setitem b_setitem
133133

134134
static PyObject *
135135
h_getitem(ap, i)
@@ -154,14 +154,14 @@ h_setitem(ap, i, v)
154154
}
155155

156156
static PyObject *
157-
H_getitem(ap, i)
157+
HH_getitem(ap, i)
158158
arrayobject *ap;
159159
int i;
160160
{
161161
return PyInt_FromLong((long) ((unsigned short *)ap->ob_item)[i]);
162162
}
163163

164-
#define H_setitem h_setitem
164+
#define HH_setitem h_setitem
165165

166166
static PyObject *
167167
i_getitem(ap, i)
@@ -186,7 +186,7 @@ i_setitem(ap, i, v)
186186
}
187187

188188
static PyObject *
189-
I_getitem(ap, i)
189+
II_getitem(ap, i)
190190
arrayobject *ap;
191191
int i;
192192
{
@@ -195,7 +195,7 @@ I_getitem(ap, i)
195195
}
196196

197197
static int
198-
I_setitem(ap, i, v)
198+
II_setitem(ap, i, v)
199199
arrayobject *ap;
200200
int i;
201201
PyObject *v;
@@ -238,15 +238,15 @@ l_setitem(ap, i, v)
238238
}
239239

240240
static PyObject *
241-
L_getitem(ap, i)
241+
LL_getitem(ap, i)
242242
arrayobject *ap;
243243
int i;
244244
{
245245
return PyLong_FromUnsignedLong(((unsigned long *)ap->ob_item)[i]);
246246
}
247247

248248
static int
249-
L_setitem(ap, i, v)
249+
LL_setitem(ap, i, v)
250250
arrayobject *ap;
251251
int i;
252252
PyObject *v;
@@ -314,13 +314,13 @@ d_setitem(ap, i, v)
314314
static struct arraydescr descriptors[] = {
315315
{'c', sizeof(char), c_getitem, c_setitem},
316316
{'b', sizeof(char), b_getitem, b_setitem},
317-
{'B', sizeof(char), B_getitem, B_setitem},
317+
{'B', sizeof(char), BB_getitem, BB_setitem},
318318
{'h', sizeof(short), h_getitem, h_setitem},
319-
{'H', sizeof(short), H_getitem, H_setitem},
319+
{'H', sizeof(short), HH_getitem, HH_setitem},
320320
{'i', sizeof(int), i_getitem, i_setitem},
321-
{'I', sizeof(int), I_getitem, I_setitem},
321+
{'I', sizeof(int), II_getitem, II_setitem},
322322
{'l', sizeof(long), l_getitem, l_setitem},
323-
{'L', sizeof(long), L_getitem, L_setitem},
323+
{'L', sizeof(long), LL_getitem, LL_setitem},
324324
{'f', sizeof(float), f_getitem, f_setitem},
325325
{'d', sizeof(double), d_getitem, d_setitem},
326326
{'\0', 0, 0, 0} /* Sentinel */

0 commit comments

Comments
 (0)