Skip to content

Commit fa425a9

Browse files
committed
Fixing the windows build
Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
1 parent 0387c12 commit fa425a9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

PC/config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ extern PyObject* PyInit_errno(void);
1414
extern PyObject* PyInit_faulthandler(void);
1515
extern PyObject* PyInit__tracemalloc(void);
1616
extern PyObject* PyInit_gc(void);
17+
extern PyObject* PyInit_immutable(void);
1718
extern PyObject* PyInit_math(void);
1819
extern PyObject* PyInit__md5(void);
1920
extern PyObject* PyInit_nt(void);
@@ -95,6 +96,7 @@ struct _inittab _PyImport_Inittab[] = {
9596
{"errno", PyInit_errno},
9697
{"faulthandler", PyInit_faulthandler},
9798
{"gc", PyInit_gc},
99+
{"immutable", PyInit_immutable},
98100
{"math", PyInit_math},
99101
{"nt", PyInit_nt}, /* Use the NT os functions, not posix */
100102
{"_operator", PyInit__operator},

Python/immutability.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ typedef enum {
382382
VALID_IMPLICIT,
383383
INVALID_NOT_FREEZABLE,
384384
INVALID_C_EXTENSIONS,
385-
ERROR
385+
ERROR_FREEZE
386386
} FreezableCheck;
387387

388388

@@ -401,7 +401,7 @@ static FreezableCheck check_freezable(struct _Py_immutability_state *state, PyOb
401401
*/
402402
result = PyObject_IsInstance(obj, (PyObject *)&_PyNotFreezable_Type);
403403
if(result == -1){
404-
return ERROR;
404+
return ERROR_FREEZE;
405405
}
406406
else if(result == 1){
407407
return INVALID_NOT_FREEZABLE;
@@ -413,7 +413,7 @@ static FreezableCheck check_freezable(struct _Py_immutability_state *state, PyOb
413413

414414
result = is_explicitly_freezable(state, obj);
415415
if(result == -1){
416-
return ERROR;
416+
return ERROR_FREEZE;
417417
}
418418
else if(result == 1){
419419
return VALID_EXPLICIT;
@@ -519,7 +519,7 @@ int _PyImmutability_Freeze(PyObject* obj)
519519
case VALID_IMPLICIT:
520520
break;
521521

522-
case ERROR:
522+
case ERROR_FREEZE:
523523
goto error;
524524

525525
default:

0 commit comments

Comments
 (0)