Generated by Cython 0.13 on Mon Nov 8 12:51:46 2010

Raw output: sum.c

 1: def sum_cython(long n):
/* "/Users/wstein/edu/2010-2011/581d/notes/2010-11-08/sum.pyx":1
 * def sum_cython(long n):             # <<<<<<<<<<<<<<
 *     cdef long i, s = 0
 *     for i in range(n):
 */

static PyObject *__pyx_pf_3sum_sum_cython(PyObject *__pyx_self, PyObject *__pyx_arg_n); /*proto*/
static PyObject *__pyx_pf_3sum_sum_cython(PyObject *__pyx_self, PyObject *__pyx_arg_n) {
  long __pyx_v_n;
  long __pyx_v_i;
  long __pyx_v_s;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannySetupContext("sum_cython");
  __pyx_self = __pyx_self;
  assert(__pyx_arg_n); {
    __pyx_v_n = __Pyx_PyInt_AsLong(__pyx_arg_n); if (unlikely((__pyx_v_n == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("sum.sum_cython");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
 2:     cdef long i, s = 0
  /* "/Users/wstein/edu/2010-2011/581d/notes/2010-11-08/sum.pyx":2
 * def sum_cython(long n):
 *     cdef long i, s = 0             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         s += i
 */
  __pyx_v_s = 0;
 3:     for i in range(n):
  /* "/Users/wstein/edu/2010-2011/581d/notes/2010-11-08/sum.pyx":3
 * def sum_cython(long n):
 *     cdef long i, s = 0
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         s += i
 *     return s
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
 4:         s += i
    /* "/Users/wstein/edu/2010-2011/581d/notes/2010-11-08/sum.pyx":4
 *     cdef long i, s = 0
 *     for i in range(n):
 *         s += i             # <<<<<<<<<<<<<<
 *     return s
 */
    __pyx_v_s += __pyx_v_i;
  }
 5:     return s
  /* "/Users/wstein/edu/2010-2011/581d/notes/2010-11-08/sum.pyx":5
 *     for i in range(n):
 *         s += i
 *     return s             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_s); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("sum.sum_cython");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}