Generated by Cython 0.13 on Tue Nov 30 15:07:28 2010
Raw output: _Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.c
1:
2: include "interrupt.pxi" # ctrl-c interrupt block support
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":2 * * include "interrupt.pxi" # ctrl-c interrupt block support #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* include "stdsage.pxi" # ctrl-c interrupt block support * */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1))<
0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3: include "stdsage.pxi" # ctrl-c interrupt block support
4:
5: include "cdefs.pxi"
6: def mysum_cy0(n):
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":6 * * include "cdefs.pxi" * def mysum_cy0(n): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* s = 0 * for k in range(n): */ static PyObject *__pyx_pf_73_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0_mysum_cy0(PyObject *__pyx_self, PyObject *__pyx_v_n); /*proto*/ static char __pyx_doc_73_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0_mysum_cy0[] = "File: _Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx (starting at line 6)"; static PyObject *__pyx_pf_73_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0_mysum_cy0(PyObject *__pyx_self, PyObject *__pyx_v_n) { PyObject *__pyx_v_s; PyObject *__pyx_v_k; PyObject *__pyx_r = NULL; __Pyx_RefNannySetupContext("mysum_cy0"); __pyx_self = __pyx_self; __pyx_v_s = Py_None; __Pyx_INCREF(Py_None); __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
7: s = 0
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":7 * include "cdefs.pxi" * def mysum_cy0(n): * s = 0 #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* for k in range(n): * s += k */ __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF(__pyx_v_s); __pyx_v_s = __pyx_int_0;
8: for k in range(n):
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":8 * def mysum_cy0(n): * s = 0 * for k in range(n): #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* s += k * return s */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_n); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_n); __Pyx_GIVEREF(__pyx_v_n); __pyx_t_3 = PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; } else if (likely(PyTuple_CheckExact(__pyx_t_2))) { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; } else { __pyx_t_3 = PyIter_Next(__pyx_t_2); if (!__pyx_t_3) { if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_v_k); __pyx_v_k = __pyx_t_3; __pyx_t_3 = 0;
9: s += k
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":9 * s = 0 * for k in range(n): * s += k #<
<
<
<
<
<
<
<
<
<
<
<
<
<
* return s */ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_s); __pyx_v_s = __pyx_t_3; __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10: return s
/* "/Users/slabbe/.sage/temp/pol/10351/spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx/_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.pyx":10 * for k in range(n): * s += k * return s #<
<
<
<
<
<
<
<
<
<
<
<
<
<
*/ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_Users_slabbe__sage_sage_notebook_sagenb_home_admin_20_code_sage41_spyx_0.mysum_cy0"); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(__pyx_v_s); __Pyx_DECREF(__pyx_v_k); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }