Generated by Cython 0.13 on Fri Apr 15 12:16:29 2011

Raw output: _sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.c

 1: 
 2: include "interrupt.pxi"  # ctrl-c interrupt block support
  /* "/tmp/sagenbflask/temp/boxen/21439/spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_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 unsafe_mutate_str(bytes s, n, c):
/* "/tmp/sagenbflask/temp/boxen/21439/spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.pyx":6
 * 
 * include "cdefs.pxi"
 * def unsafe_mutate_str(bytes s, n, c):             # <<<<<<<<<<<<<<
 *     cdef char* t = <char*>s
 *     t[n] = ord(c)
 */

static PyObject *__pyx_pf_78_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0_unsafe_mutate_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_78_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0_unsafe_mutate_str[] = "File: _sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.pyx (starting at line 6)";
static PyObject *__pyx_pf_78_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0_unsafe_mutate_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_c = 0;
  char *__pyx_v_t;
  PyObject *__pyx_r = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__s,&__pyx_n_s__n,&__pyx_n_s__c,0};
  __Pyx_RefNannySetupContext("unsafe_mutate_str");
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    PyObject* values[3] = {0,0,0};
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__s);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("unsafe_mutate_str", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      case  2:
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__c);
      if (likely(values[2])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("unsafe_mutate_str", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "unsafe_mutate_str") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_s = ((PyObject *)values[0]);
    __pyx_v_n = values[1];
    __pyx_v_c = values[2];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_s = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 0));
    __pyx_v_n = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_c = PyTuple_GET_ITEM(__pyx_args, 2);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_mutate_str", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.unsafe_mutate_str");
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), &PyBytes_Type, 1, "s", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 7:     cdef char* t = <char*>s
  /* "/tmp/sagenbflask/temp/boxen/21439/spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.pyx":7
 * include "cdefs.pxi"
 * def unsafe_mutate_str(bytes s, n, c):
 *     cdef char* t = <char*>s             # <<<<<<<<<<<<<<
 *     t[n] = ord(c)
 */
  __pyx_t_1 = PyBytes_AsString(((PyObject *)__pyx_v_s)); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_t = __pyx_t_1;
 8:     t[n] = ord(c)
  /* "/tmp/sagenbflask/temp/boxen/21439/spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx/_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.pyx":8
 * def unsafe_mutate_str(bytes s, n, c):
 *     cdef char* t = <char*>s
 *     t[n] = ord(c)             # <<<<<<<<<<<<<<
 */
  __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_c);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_c);
  __Pyx_GIVEREF(__pyx_v_c);
  __pyx_t_3 = PyObject_Call(__pyx_builtin_ord, __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;
  __pyx_t_4 = __Pyx_PyInt_AsChar(__pyx_t_3); if (unlikely((__pyx_t_4 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  (__pyx_v_t[__pyx_t_5]) = __pyx_t_4;

  __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("_sagenb_flask_sage_notebook_sagenb_home_openidSfmMv1OuVE_31_code_sage58_spyx_0.unsafe_mutate_str");
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}