Generated by Cython 3.2.4

Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.

Raw output: cythonprintln.c

+01: # koruspy.pyx
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 02: from libc.stdio cimport printf, stdout, fflush
 03: import cython
 04: 
 05: from cpython.object cimport PyObject_Print
 06: from cpython.float cimport PyFloat_Check, PyFloat_AsDouble
 07: from cpython.long cimport PyLong_Check, PyLong_AsLongLong
 08: from cpython.unicode cimport PyUnicode_Check, PyUnicode_AsUTF8
 09: from cpython.tuple cimport PyTuple_GET_SIZE, PyTuple_GET_ITEM
 10: from cpython.bool cimport PyBool_Check
 11: 
+12: @cython.boundscheck(False)
/* Python wrapper */
static PyObject *__pyx_pw_13cythonprintln_1println(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_13cythonprintln_println, "Cython-accelerated print function");
static PyMethodDef __pyx_mdef_13cythonprintln_1println = {"println", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_13cythonprintln_1println, METH_VARARGS|METH_KEYWORDS, __pyx_doc_13cythonprintln_println};
static PyObject *__pyx_pw_13cythonprintln_1println(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("println (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("println", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_13cythonprintln_println(__pyx_self, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_13cythonprintln_println(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_arg = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
/* … */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_13cythonprintln_1println, 0, __pyx_mstate_global->__pyx_n_u_println, NULL, __pyx_mstate_global->__pyx_n_u_cythonprintln, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_println, __pyx_t_2) < (0)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 13: @cython.wraparound(False)
 14: def println(*args):
 15:     """Cython-accelerated print function"""
 16:     cdef object arg
 17:     cdef Py_ssize_t i 
+18:     cdef Py_ssize_t n = PyTuple_GET_SIZE(args)
  __pyx_v_n = PyTuple_GET_SIZE(__pyx_v_args);
 19: 
+20:     for i in range(n):
  __pyx_t_1 = __pyx_v_n;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
+21:         arg = <object>PyTuple_GET_ITEM(args, i)
    __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, __pyx_v_i);
    __pyx_t_5 = ((PyObject *)__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_5);
    __pyx_t_5 = 0;
 22: 
+23:         if PyLong_Check(arg):
    __pyx_t_6 = PyLong_Check(__pyx_v_arg);
    if (__pyx_t_6) {
/* … */
      goto __pyx_L5;
    }
+24:             printf("%lld\n", PyLong_AsLongLong(arg))
      __pyx_t_7 = PyLong_AsLongLong(__pyx_v_arg); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error)
      (void)(printf(__pyx_k_lld, __pyx_t_7));
+25:         elif PyUnicode_Check(arg):
    __pyx_t_6 = PyUnicode_Check(__pyx_v_arg);
    if (__pyx_t_6) {
/* … */
      goto __pyx_L5;
    }
+26:             printf("%s\n", PyUnicode_AsUTF8(arg))
      __pyx_t_8 = PyUnicode_AsUTF8(__pyx_v_arg); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(0, 26, __pyx_L1_error)
      (void)(printf(__pyx_k_s, __pyx_t_8));
+27:         elif PyFloat_Check(arg):
    __pyx_t_6 = PyFloat_Check(__pyx_v_arg);
    if (__pyx_t_6) {
/* … */
      goto __pyx_L5;
    }
+28:             printf("%g\n", PyFloat_AsDouble(arg))
      __pyx_t_9 = PyFloat_AsDouble(__pyx_v_arg); if (unlikely(__pyx_t_9 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 28, __pyx_L1_error)
      (void)(printf(__pyx_k_g, __pyx_t_9));
+29:         elif PyBool_Check(arg):
    __pyx_t_6 = PyBool_Check(__pyx_v_arg);
    if (__pyx_t_6) {
/* … */
      goto __pyx_L5;
    }
+30:             printf("%s\n", "True" if arg else "False")
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_arg); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 30, __pyx_L1_error)
      if (__pyx_t_6) {
        __pyx_t_10 = ((char *)"True");
      } else {
        __pyx_t_10 = ((char *)"False");
      }
      (void)(printf(__pyx_k_s, __pyx_t_10));
+31:         elif arg is None:
    __pyx_t_6 = (__pyx_v_arg == Py_None);
    if (__pyx_t_6) {
/* … */
      goto __pyx_L5;
    }
+32:             printf("None\n")
      (void)(printf(__pyx_k_None));
 33:         else:
+34:             PyObject_Print(arg, stdout, 0)
    /*else*/ {
      __pyx_t_11 = PyObject_Print(__pyx_v_arg, stdout, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 34, __pyx_L1_error)
+35:             printf("\n")
      (void)(printf(__pyx_k_));
    }
    __pyx_L5:;
  }
 36: 
+37:     fflush(stdout)
  (void)(fflush(stdout));