| --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| +++ b/cgen/templates/default/load_build_class Thu Apr 26 11:08:47 2012 -0700 |
| @@ -0,0 +1,29 @@ |
| + |
| + TARGET(LOAD_BUILD_CLASS) |
| + { |
| + _Py_IDENTIFIER(__build_class__); |
| + |
| + if (PyDict_CheckExact(f->f_builtins)) { |
| + x = _PyDict_GetItemId(f->f_builtins, &PyId___build_class__); |
| + if (x == NULL) { |
| + PyErr_SetString(PyExc_NameError, |
| + "__build_class__ not found"); |
| + goto on_error;; |
| + } |
| + Py_INCREF(x); |
| + } |
| + else { |
| + PyObject *build_class_str = _PyUnicode_FromId(&PyId___build_class__); |
| + if (build_class_str == NULL) |
| + goto on_error;; |
| + x = PyObject_GetItem(f->f_builtins, build_class_str); |
| + if (x == NULL) { |
| + if (PyErr_ExceptionMatches(PyExc_KeyError)) |
| + PyErr_SetString(PyExc_NameError, |
| + "__build_class__ not found"); |
| + goto on_error;; |
| + } |
| + } |
| + PUSH(x); |
| + goto on_error;; |
| + } |