diff Python/bltinmodule.c @ 45045:e791bb0adcde legacy-trunk

CallMethod is faster with a NULL third-argument than with an empty format string.
author Raymond Hettinger <python@rcn.com>
date Tue, 29 Jan 2008 19:52:09 +0000
parents 4c8308ac20cd
children 492b302aded6
line wrap: on
line diff
--- a/Python/bltinmodule.c	Tue Jan 29 04:20:56 2008 +0000
+++ b/Python/bltinmodule.c	Tue Jan 29 19:52:09 2008 +0000
@@ -2050,7 +2050,7 @@
         /* XXX: The py3k branch gets better errors for this by using
            _PyType_Lookup(), but since float's mro isn't set in py2.6,
            we just use PyObject_CallMethod here. */
-	return PyObject_CallMethod(number, "__trunc__", "");
+	return PyObject_CallMethod(number, "__trunc__", NULL);
 }
 
 PyDoc_STRVAR(trunc_doc,