Skip to content

Commit 83bb3a9

Browse files
Fix linking on windows and refactor test
1 parent c0511cc commit 83bb3a9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Include/internal/pycore_unicodeobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ _PyUnicodeWriter_WriteCharInline(_PyUnicodeWriter *writer, Py_UCS4 ch)
7777

7878
/* --- Characters Type APIs ----------------------------------------------- */
7979

80-
extern int _PyUnicode_IsXidStart(Py_UCS4 ch);
81-
extern int _PyUnicode_IsXidContinue(Py_UCS4 ch);
80+
PyAPI_FUNC(int) _PyUnicode_IsXidStart(Py_UCS4 ch);
81+
PyAPI_FUNC(int) _PyUnicode_IsXidContinue(Py_UCS4 ch);
8282
extern int _PyUnicode_ToLowerFull(Py_UCS4 ch, Py_UCS4 *res);
8383
extern int _PyUnicode_ToTitleFull(Py_UCS4 ch, Py_UCS4 *res);
8484
extern int _PyUnicode_ToUpperFull(Py_UCS4 ch, Py_UCS4 *res);

Lib/test/test_unicodedata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def test_isidstart(self):
285285
self.assertTrue(self.db.isidstart('\uFE7B')) # ARABIC KASRA MEDIAL FORM
286286

287287
self.assertFalse(self.db.isidstart(' '))
288+
self.assertFalse(self.db.isidstart('0'))
288289
self.assertRaises(TypeError, self.db.isidstart)
289290
self.assertRaises(TypeError, self.db.isidstart, 'xx')
290291

@@ -299,7 +300,6 @@ def test_isidcontinue(self):
299300
self.assertTrue(self.db.isidcontinue('\u17D7')) # KHMER SIGN LEK TOO
300301

301302
self.assertFalse(self.db.isidcontinue(' '))
302-
self.assertFalse(self.db.isidstart('0'))
303303
self.assertRaises(TypeError, self.db.isidcontinue)
304304
self.assertRaises(TypeError, self.db.isidcontinue, 'xx')
305305

0 commit comments

Comments
 (0)