diff Python/_warnings.c @ 72835:5e33219492bc

Add API for static strings, primarily good for identifiers. Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
author Martin v. Löwis <martin@v.loewis.de>
date Sun, 09 Oct 2011 10:38:36 +0200
parents b1e5ade81097
children 81380082d216
line wrap: on
line diff
--- a/Python/_warnings.c	Sun Oct 09 08:58:16 2011 +0200
+++ b/Python/_warnings.c	Sun Oct 09 10:38:36 2011 +0200
@@ -18,11 +18,12 @@
 check_matched(PyObject *obj, PyObject *arg)
 {
     PyObject *result;
+    _Py_identifier(match);
     int rc;
 
     if (obj == Py_None)
         return 1;
-    result = PyObject_CallMethod(obj, "match", "O", arg);
+    result = _PyObject_CallMethodId(obj, &PyId_match, "O", arg);
     if (result == NULL)
         return -1;