Modified:
/trunk/Modules/_llvm.cc
=======================================
--- /trunk/Modules/_llvm.cc Fri Oct 9 14:23:13 2009
+++ /trunk/Modules/_llvm.cc Thu Dec 17 17:33:17 2009
@@ -93,13 +93,16 @@
code = (PyCodeObject *)func->func_code;
}
else if (PyMethod_Check(obj)) {
- PyFunctionObject *func =
- (PyFunctionObject *)((PyMethodObject *)obj)->im_func;
- code = (PyCodeObject *)func->func_code;
+ // Methods contain other callable objects, including, potentially
other
+ // methods.
+ return llvm_clear_feedback(self, ((PyMethodObject *)obj)->im_func);
}
else if (PyCode_Check(obj)) {
code = (PyCodeObject *)obj;
}
+ else if (PyCFunction_Check(obj)) { // No feedback; this is a no-op.
+ Py_RETURN_NONE;
+ }
else {
PyErr_Format(PyExc_TypeError,
"cannot clear feedback for %.100s objects",