Skip to content

Commit 4bf5ecf

Browse files
committed
Revert "fix: check key type in externals dict (#270)"
This reverts commit 3c616fe.
1 parent e6b10eb commit 4bf5ecf

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

yara-python.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,13 +1522,6 @@ int process_compile_externals(
15221522

15231523
while (PyDict_Next(externals, &pos, &key, &value))
15241524
{
1525-
if (!PY_STRING_CHECK(key)) {
1526-
PyErr_Format(
1527-
PyExc_TypeError,
1528-
"keys of externals dict must be strings");
1529-
1530-
return ERROR_INVALID_ARGUMENT;
1531-
}
15321525
identifier = PY_STRING_TO_C(key);
15331526

15341527
if (PyBool_Check(value))
@@ -1599,13 +1592,6 @@ int process_match_externals(
15991592

16001593
while (PyDict_Next(externals, &pos, &key, &value))
16011594
{
1602-
if (!PY_STRING_CHECK(key)) {
1603-
PyErr_Format(
1604-
PyExc_TypeError,
1605-
"keys of externals dict must be strings");
1606-
1607-
return ERROR_INVALID_ARGUMENT;
1608-
}
16091595
identifier = PY_STRING_TO_C(key);
16101596

16111597
if (PyBool_Check(value))

0 commit comments

Comments
 (0)