Removed BadInternalCall following pyston

Three tests need to be enabled in MODE=dbg.
This commit is contained in:
ahgamut 2021-09-03 21:47:37 +05:30
parent 712ead6ee8
commit c626c914be
4 changed files with 13 additions and 2 deletions

View file

@ -318,7 +318,11 @@ void PyErr_BadInternalCall(void);
void _PyErr_BadInternalCall(const char *filename, int lineno);
/* Mask the old API with a call to the new API for code compiled under
Python 2.0: */
#ifdef USE_BADINTERNALCALL
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
#else
#define PyErr_BadInternalCall()
#endif
/* Function to create a new exception */
PyObject * PyErr_NewException(
const char *name, PyObject *base, PyObject *dict);

View file

@ -299,6 +299,8 @@ if check_impl_detail(cpython=True) and ctypes is not None:
return eval('lambda:42')
def test_get_non_code(self):
return
# TODO: <ahgamut> have a sysconfig check to run this test in dbg #
f = self.get_func()
self.assertRaises(SystemError, SetExtra, 42, FREE_INDEX,
@ -307,6 +309,8 @@ if check_impl_detail(cpython=True) and ctypes is not None:
ctypes.c_voidp(100))
def test_bad_index(self):
return
# TODO: <ahgamut> have a sysconfig check to run this test in dbg #
f = self.get_func()
self.assertRaises(SystemError, SetExtra, f.__code__,
FREE_INDEX+100, ctypes.c_voidp(100))

View file

@ -1221,7 +1221,9 @@ class CAPITest(unittest.TestCase):
self.assertEqual(dict_getitem_knownhash(d, 'z', hash('z')), 3)
# not a dict
self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1))
# TODO: <ahgamut> have a sysconfig check to run this test in dbg #
if False:
self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1))
# key does not exist
self.assertRaises(KeyError, dict_getitem_knownhash, {}, 1, hash(1))

View file

@ -2166,7 +2166,8 @@ THIRD_PARTY_PYTHON_STDLIB_PYS = \
ifeq ($(MODE), dbg)
THIRD_PARTY_PYTHON_FLAGS += \
-DUSE_TRACEMALLOC
-DUSE_TRACEMALLOC \
-DUSE_BADINTERNALCALL
THIRD_PARTY_PYTHON_STAGE1_A_SRCS += \
third_party/python/Modules/_tracemalloc.c
THIRD_PARTY_PYTHON_STAGE2_A_SRCS += \