/* Generated by Cython 0.29.21 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "extra_compile_args": [
            "-DSYSLOG_NAMES=1"
        ],
        "libraries": [
            "systemd"
        ],
        "name": "cysystemd.reader",
        "sources": [
            "cysystemd/reader.pyx"
        ]
    },
    "module_name": "cysystemd.reader"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_21"
#define CYTHON_HEX_VERSION 0x001D15F0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cysystemd__reader
#define __PYX_HAVE_API__cysystemd__reader
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "pythread.h"
#include <systemd/sd-id128.h>
#include "sys/uio.h"
#include <systemd/sd-journal.h>
#include <sys/syslog.h>
#include <poll.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "cysystemd/reader.pyx",
  "stringsource",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
};
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif


/*--- Type declarations ---*/
struct __pyx_obj_9cysystemd_6reader_Rule;
struct __pyx_obj_9cysystemd_6reader_JournalEntry;
struct __pyx_obj_9cysystemd_6reader_JournalReader;
struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__;
struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock;
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py;
struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait;

/* "cysystemd/reader.pyx":31
 * 
 * 
 * cdef enum MATCHER_OPERATION:             # <<<<<<<<<<<<<<
 *     MATCHER_OPERATION_CONJUNCTION,
 *     MATCHER_OPERATION_DISJUNCTION,
 */

#line 31 "cysystemd/reader.pyx"
enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION {

#line 31 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_MATCHER_OPERATION_CONJUNCTION,

#line 31 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_MATCHER_OPERATION_DISJUNCTION

#line 31 "cysystemd/reader.pyx"
};

/* "cysystemd/reader.pyx":146
 * 
 * 
 * cdef enum READER_STATE:             # <<<<<<<<<<<<<<
 *     READER_CLOSED,
 *     READER_OPENED,
 */

#line 146 "cysystemd/reader.pyx"
enum __pyx_t_9cysystemd_6reader_READER_STATE {

#line 146 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_READER_CLOSED,

#line 146 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_READER_OPENED,

#line 146 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_READER_LOCKED,

#line 146 "cysystemd/reader.pyx"
  __pyx_e_9cysystemd_6reader_READER_NULL

#line 146 "cysystemd/reader.pyx"
};

/* "cysystemd/reader.pyx":428
 *         return True
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout_usec = timeout * 1000000
 *         cdef int result
 */

#line 428 "cysystemd/reader.pyx"
struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait {

#line 428 "cysystemd/reader.pyx"
  int __pyx_n;

#line 428 "cysystemd/reader.pyx"
  uint32_t timeout;

#line 428 "cysystemd/reader.pyx"
};

/* "cysystemd/reader.pyx":51
 * 
 * 
 * cdef class Rule:             # <<<<<<<<<<<<<<
 *     cdef object _expression
 *     cdef object _child
 */

#line 51 "cysystemd/reader.pyx"
struct __pyx_obj_9cysystemd_6reader_Rule {

#line 51 "cysystemd/reader.pyx"
  PyObject_HEAD

#line 51 "cysystemd/reader.pyx"
  PyObject *_expression;

#line 51 "cysystemd/reader.pyx"
  PyObject *_child;

#line 51 "cysystemd/reader.pyx"
  PyObject *_root;

#line 51 "cysystemd/reader.pyx"
  PyObject *_operand;

#line 51 "cysystemd/reader.pyx"
};

#line 51 "cysystemd/reader.pyx"


/* "cysystemd/reader.pyx":197
 * 
 * 
 * cdef class JournalEntry:             # <<<<<<<<<<<<<<
 *     cdef sd_id128_t __boot_id
 *     cdef object __boot_uuid
 */

#line 197 "cysystemd/reader.pyx"
struct __pyx_obj_9cysystemd_6reader_JournalEntry {

#line 197 "cysystemd/reader.pyx"
  PyObject_HEAD

#line 197 "cysystemd/reader.pyx"
  struct __pyx_vtabstruct_9cysystemd_6reader_JournalEntry *__pyx_vtab;

#line 197 "cysystemd/reader.pyx"
  sd_id128_t __pyx___boot_id;

#line 197 "cysystemd/reader.pyx"
  PyObject *__pyx___boot_uuid;

#line 197 "cysystemd/reader.pyx"
  char *cursor;

#line 197 "cysystemd/reader.pyx"
  uint64_t monotonic_usec;

#line 197 "cysystemd/reader.pyx"
  uint64_t realtime_usec;

#line 197 "cysystemd/reader.pyx"
  PyObject *__pyx___data;

#line 197 "cysystemd/reader.pyx"
  PyObject *_data;

#line 197 "cysystemd/reader.pyx"
  PyObject *__pyx___date;

#line 197 "cysystemd/reader.pyx"
};

#line 197 "cysystemd/reader.pyx"


/* "cysystemd/reader.pyx":291
 * 
 * 
 * cdef class JournalReader:             # <<<<<<<<<<<<<<
 *     cdef sd_journal* context
 *     cdef char state
 */

#line 291 "cysystemd/reader.pyx"
struct __pyx_obj_9cysystemd_6reader_JournalReader {

#line 291 "cysystemd/reader.pyx"
  PyObject_HEAD

#line 291 "cysystemd/reader.pyx"
  struct __pyx_vtabstruct_9cysystemd_6reader_JournalReader *__pyx_vtab;

#line 291 "cysystemd/reader.pyx"
  sd_journal *context;

#line 291 "cysystemd/reader.pyx"
  char state;

#line 291 "cysystemd/reader.pyx"
  PyObject *flags;

#line 291 "cysystemd/reader.pyx"
};

#line 291 "cysystemd/reader.pyx"


/* "cysystemd/reader.pyx":118
 *         return 'Rule(%r)' % ' '.join(ret[:-1])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         rule = self.root
 * 
 */

#line 118 "cysystemd/reader.pyx"
struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ {

#line 118 "cysystemd/reader.pyx"
  PyObject_HEAD

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_v_rule;

#line 118 "cysystemd/reader.pyx"
  struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self;

#line 118 "cysystemd/reader.pyx"
};

#line 118 "cysystemd/reader.pyx"


/* "cysystemd/reader.pyx":362
 * 
 *     @contextmanager
 *     def _lock(self, opening=False):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 */

#line 362 "cysystemd/reader.pyx"
struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock {

#line 362 "cysystemd/reader.pyx"
  PyObject_HEAD

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_v_opening;

#line 362 "cysystemd/reader.pyx"
  struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self;

#line 362 "cysystemd/reader.pyx"
};

#line 362 "cysystemd/reader.pyx"


/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object path):
 *         """wrap(path) -> str"""
 */

#line 64 "cfunc.to_py"
struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py {

#line 64 "cfunc.to_py"
  PyObject_HEAD

#line 64 "cfunc.to_py"
  PyObject *(*__pyx_v_f)(PyObject *);

#line 64 "cfunc.to_py"
};

#line 64 "cfunc.to_py"


#line 64 "cfunc.to_py"


/* "cysystemd/reader.pyx":197
 * 
 * 
 * cdef class JournalEntry:             # <<<<<<<<<<<<<<
 *     cdef sd_id128_t __boot_id
 *     cdef object __boot_uuid
 */

#line 197 "cysystemd/reader.pyx"


#line 197 "cysystemd/reader.pyx"
struct __pyx_vtabstruct_9cysystemd_6reader_JournalEntry {

#line 197 "cysystemd/reader.pyx"
  double (*get_realtime_sec)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch);

#line 197 "cysystemd/reader.pyx"
  double (*get_monotonic_sec)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch);

#line 197 "cysystemd/reader.pyx"
  uint64_t (*get_realtime_usec)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch);

#line 197 "cysystemd/reader.pyx"
  uint64_t (*get_monotonic_usec)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch);

#line 197 "cysystemd/reader.pyx"
};

#line 197 "cysystemd/reader.pyx"
static struct __pyx_vtabstruct_9cysystemd_6reader_JournalEntry *__pyx_vtabptr_9cysystemd_6reader_JournalEntry;

#line 197 "cysystemd/reader.pyx"


/* "cysystemd/reader.pyx":291
 * 
 * 
 * cdef class JournalReader:             # <<<<<<<<<<<<<<
 *     cdef sd_journal* context
 *     cdef char state
 */

#line 291 "cysystemd/reader.pyx"


#line 291 "cysystemd/reader.pyx"
struct __pyx_vtabstruct_9cysystemd_6reader_JournalReader {

#line 291 "cysystemd/reader.pyx"
  PyObject *(*wait)(struct __pyx_obj_9cysystemd_6reader_JournalReader *, int __pyx_skip_dispatch, struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait *__pyx_optional_args);

#line 291 "cysystemd/reader.pyx"
};

#line 291 "cysystemd/reader.pyx"
static struct __pyx_vtabstruct_9cysystemd_6reader_JournalReader *__pyx_vtabptr_9cysystemd_6reader_JournalReader;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_9cysystemd_6reader_MATCHER_OPERATION(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static double __pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static double __pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static uint64_t __pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static uint64_t __pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9cysystemd_6reader_13JournalReader_wait(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait *__pyx_optional_args); /* proto*/

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'cpython.version' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.exc' */

/* Module declarations from 'cpython.module' */

/* Module declarations from 'cpython.tuple' */

/* Module declarations from 'cpython.list' */

/* Module declarations from 'cpython.sequence' */

/* Module declarations from 'cpython.mapping' */

/* Module declarations from 'cpython.iterator' */

/* Module declarations from 'cpython.number' */

/* Module declarations from 'cpython.int' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

/* Module declarations from 'cpython.long' */

/* Module declarations from 'cpython.float' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

/* Module declarations from 'cpython.string' */

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'cpython.dict' */

/* Module declarations from 'cpython.instance' */

/* Module declarations from 'cpython.function' */

/* Module declarations from 'cpython.method' */

/* Module declarations from 'cpython.weakref' */

/* Module declarations from 'cpython.getargs' */

/* Module declarations from 'cpython.pythread' */

/* Module declarations from 'cpython.pystate' */

/* Module declarations from 'cpython.cobject' */

/* Module declarations from 'cpython.oldbuffer' */

/* Module declarations from 'cpython.set' */

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cpython.pycapsule' */

/* Module declarations from 'cpython' */

/* Module declarations from 'cysystemd.sd_id128' */

/* Module declarations from 'cysystemd.sd_journal' */

/* Module declarations from 'cysystemd.reader' */
static PyTypeObject *__pyx_ptype_9cysystemd_6reader_Rule = 0;
static PyTypeObject *__pyx_ptype_9cysystemd_6reader_JournalEntry = 0;
static PyTypeObject *__pyx_ptype_9cysystemd_6reader_JournalReader = 0;
static PyTypeObject *__pyx_ptype_9cysystemd_6reader___pyx_scope_struct____iter__ = 0;
static PyTypeObject *__pyx_ptype_9cysystemd_6reader___pyx_scope_struct_1__lock = 0;
static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_str____object___to_py = 0;
static PyObject *__pyx_f_9cysystemd_6reader__check_dir_path(PyObject *); /*proto*/
static PyObject *__pyx_f_9cysystemd_6reader__check_file_path(PyObject *); /*proto*/
static PyObject *__pyx_f_9cysystemd_6reader___pyx_unpickle_Rule__set_state(struct __pyx_obj_9cysystemd_6reader_Rule *, PyObject *); /*proto*/
static PyObject *__Pyx_CFunc_str____object___to_py(PyObject *(*)(PyObject *)); /*proto*/
static int __Pyx_carray_from_py_uint8_t(PyObject *, uint8_t *, Py_ssize_t); /*proto*/
#define __Pyx_MODULE_NAME "cysystemd.reader"
extern int __pyx_module_is_main_cysystemd__reader;
int __pyx_module_is_main_cysystemd__reader = 0;

/* Implementation of 'cysystemd.reader' */
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_SystemError;
static PyObject *__pyx_builtin_OSError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_[] = "=";
static const char __pyx_k_r[] = "%r";
static const char __pyx_k_IN[] = "IN";
static const char __pyx_k_OR[] = "OR";
static const char __pyx_k__2[] = "\000";
static const char __pyx_k__4[] = " ";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_AND[] = "AND";
static const char __pyx_k_NOP[] = "NOP";
static const char __pyx_k_OUT[] = "OUT";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_log[] = "log";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_utc[] = "utc";
static const char __pyx_k_Poll[] = "Poll";
static const char __pyx_k_Rule[] = "Rule";
static const char __pyx_k_UUID[] = "UUID";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_lock[] = "_lock";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_skip[] = "skip";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_usec[] = "usec";
static const char __pyx_k_uuid[] = "uuid";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_wrap[] = "wrap";
static const char __pyx_k_bytes[] = "bytes";
static const char __pyx_k_child[] = "child";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_errno[] = "errno";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_isdir[] = "isdir";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_APPEND[] = "APPEND";
static const char __pyx_k_Rule_r[] = "Rule(%r)";
static const char __pyx_k_SYSTEM[] = "SYSTEM";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_closed[] = "closed";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_exists[] = "exists";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_isfile[] = "isfile";
static const char __pyx_k_islink[] = "islink";
static const char __pyx_k_locked[] = "locked";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_opened[] = "opened";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_tzinfo[] = "tzinfo";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_OSError[] = "OSError";
static const char __pyx_k_abspath[] = "abspath";
static const char __pyx_k_boot_id[] = "boot_id";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_opening[] = "opening";
static const char __pyx_k_operand[] = "operand";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_readlink[] = "readlink";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_strerror[] = "strerror";
static const char __pyx_k_timezone[] = "timezone";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_errorcode[] = "errorcode";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_INVALIDATE[] = "INVALIDATE";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_LOCAL_ONLY[] = "LOCAL_ONLY";
static const char __pyx_k_Reader_s_s[] = "<Reader[%s]: %s>";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_contextlib[] = "contextlib";
static const char __pyx_k_expression[] = "expression";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_Rule___iter[] = "Rule.__iter__";
static const char __pyx_k_SYSTEM_ONLY[] = "SYSTEM_ONLY";
static const char __pyx_k_SystemError[] = "SystemError";
static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py";
static const char __pyx_k_CURRENT_USER[] = "CURRENT_USER";
static const char __pyx_k_JournalEntry[] = "JournalEntry";
static const char __pyx_k_JournalEvent[] = "JournalEvent";
static const char __pyx_k_RUNTIME_ONLY[] = "RUNTIME_ONLY";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_JournalReader[] = "JournalReader";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_Reader_locked[] = "Reader locked";
static const char __pyx_k_WAIT_MAX_TIME[] = "WAIT_MAX_TIME";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_File_not_found[] = "File not found";
static const char __pyx_k_JournalEntry_r[] = "<JournalEntry: %r>";
static const char __pyx_k_MatchOperation[] = "MatchOperation";
static const char __pyx_k_contextmanager[] = "contextmanager";
static const char __pyx_k_JournalOpenMode[] = "JournalOpenMode";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_check_error_code[] = "check_error_code";
static const char __pyx_k_cysystemd_reader[] = "cysystemd.reader";
static const char __pyx_k_get_realtime_sec[] = "get_realtime_sec";
static const char __pyx_k_max_message_size[] = "max_message_size";
static const char __pyx_k_utcfromtimestamp[] = "utcfromtimestamp";
static const char __pyx_k_Invalid_operation[] = "Invalid operation";
static const char __pyx_k_get_monotonic_sec[] = "get_monotonic_sec";
static const char __pyx_k_get_realtime_usec[] = "get_realtime_usec";
static const char __pyx_k_pyx_unpickle_Rule[] = "__pyx_unpickle_Rule";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_get_monotonic_usec[] = "get_monotonic_usec";
static const char __pyx_k_Directory_not_found[] = "Directory not found";
static const char __pyx_k_JournalReader__lock[] = "JournalReader._lock";
static const char __pyx_k_It_s_not_a_directory[] = "It's not a directory";
static const char __pyx_k_cysystemd_reader_pyx[] = "cysystemd/reader.pyx";
static const char __pyx_k_It_s_not_a_regular_file[] = "It's not a regular file";
static const char __pyx_k_Can_t_lock_closed_reader[] = "Can't lock closed reader";
static const char __pyx_k_Can_t_reopen_opened_reader[] = "Can't reopen opened reader";
static const char __pyx_k_Pyx_CFunc_str____object___to_p[] = "__Pyx_CFunc_str____object___to_py.<locals>.wrap";
static const char __pyx_k_Expression_must_not_contains_0_c[] = "Expression must not contains \\0 character";
static const char __pyx_k_Incompatible_checksums_s_vs_0xb9[] = "Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))";
static const char __pyx_k_Link_recursive_reslolution_error[] = "Link recursive reslolution error";
static const char __pyx_k_got_message_with_enormous_length[] = "got message with enormous length %d";
static const char __pyx_k_got_unexpected_r_from_sd_journal[] = "got unexpected %r from sd_journal_enumerate_data";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_self_context_cannot_be_converted[] = "self.context cannot be converted to a Python object for pickling";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_AND;
static PyObject *__pyx_n_s_APPEND;
static PyObject *__pyx_n_s_CURRENT_USER;
static PyObject *__pyx_kp_s_Can_t_lock_closed_reader;
static PyObject *__pyx_kp_s_Can_t_reopen_opened_reader;
static PyObject *__pyx_kp_s_Directory_not_found;
static PyObject *__pyx_kp_s_Expression_must_not_contains_0_c;
static PyObject *__pyx_kp_s_File_not_found;
static PyObject *__pyx_n_s_IN;
static PyObject *__pyx_n_s_INVALIDATE;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb9;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_IntEnum;
static PyObject *__pyx_kp_s_Invalid_operation;
static PyObject *__pyx_kp_s_It_s_not_a_directory;
static PyObject *__pyx_kp_s_It_s_not_a_regular_file;
static PyObject *__pyx_n_s_JournalEntry;
static PyObject *__pyx_kp_s_JournalEntry_r;
static PyObject *__pyx_n_s_JournalEvent;
static PyObject *__pyx_n_s_JournalOpenMode;
static PyObject *__pyx_n_s_JournalReader;
static PyObject *__pyx_n_s_JournalReader__lock;
static PyObject *__pyx_n_s_LOCAL_ONLY;
static PyObject *__pyx_kp_s_Link_recursive_reslolution_error;
static PyObject *__pyx_n_s_MatchOperation;
static PyObject *__pyx_n_s_NOP;
static PyObject *__pyx_n_s_OR;
static PyObject *__pyx_n_s_OSError;
static PyObject *__pyx_n_s_OUT;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_Poll;
static PyObject *__pyx_n_s_Pyx_CFunc_str____object___to_p;
static PyObject *__pyx_n_s_RUNTIME_ONLY;
static PyObject *__pyx_kp_s_Reader_locked;
static PyObject *__pyx_kp_s_Reader_s_s;
static PyObject *__pyx_n_s_Rule;
static PyObject *__pyx_n_s_Rule___iter;
static PyObject *__pyx_kp_s_Rule_r;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_SYSTEM;
static PyObject *__pyx_n_s_SYSTEM_ONLY;
static PyObject *__pyx_n_s_SystemError;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_UUID;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_WAIT_MAX_TIME;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_kp_s__4;
static PyObject *__pyx_n_s_abspath;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_boot_id;
static PyObject *__pyx_n_s_bytes;
static PyObject *__pyx_n_s_cfunc_to_py;
static PyObject *__pyx_n_s_check_error_code;
static PyObject *__pyx_n_s_child;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_closed;
static PyObject *__pyx_n_s_code;
static PyObject *__pyx_n_s_contextlib;
static PyObject *__pyx_n_s_contextmanager;
static PyObject *__pyx_n_s_cysystemd_reader;
static PyObject *__pyx_kp_s_cysystemd_reader_pyx;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_errno;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_errorcode;
static PyObject *__pyx_n_s_errors;
static PyObject *__pyx_n_s_exists;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_expression;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_monotonic_sec;
static PyObject *__pyx_n_s_get_monotonic_usec;
static PyObject *__pyx_n_s_get_realtime_sec;
static PyObject *__pyx_n_s_get_realtime_usec;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_kp_s_got_message_with_enormous_length;
static PyObject *__pyx_kp_s_got_unexpected_r_from_sd_journal;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_isdir;
static PyObject *__pyx_n_s_isfile;
static PyObject *__pyx_n_s_islink;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_lock;
static PyObject *__pyx_n_s_locked;
static PyObject *__pyx_n_s_log;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_max_message_size;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_opened;
static PyObject *__pyx_n_s_opening;
static PyObject *__pyx_n_s_operand;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Rule;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_kp_s_r;
static PyObject *__pyx_n_s_reader;
static PyObject *__pyx_n_s_readlink;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_root;
static PyObject *__pyx_kp_s_self_context_cannot_be_converted;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_skip;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_strerror;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timeout;
static PyObject *__pyx_n_s_timezone;
static PyObject *__pyx_n_s_tzinfo;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_n_s_usec;
static PyObject *__pyx_n_s_utc;
static PyObject *__pyx_n_s_utcfromtimestamp;
static PyObject *__pyx_n_s_uuid;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_wait;
static PyObject *__pyx_n_s_warning;
static PyObject *__pyx_n_s_wrap;
static int __pyx_pf_9cysystemd_6reader_4Rule___init__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_10expression___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_5child___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static int __pyx_pf_9cysystemd_6reader_4Rule_5child_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_child); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_4root___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static int __pyx_pf_9cysystemd_6reader_4Rule_4root_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_root); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_7operand___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static int __pyx_pf_9cysystemd_6reader_4Rule_7operand_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, uint8_t __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_2__and__(PyObject *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_4__or__(PyObject *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_6__repr__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_8__iter__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_11__reduce_cython__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_13__setstate_cython__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_check_error_code(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code); /* proto */
static int __pyx_pf_9cysystemd_6reader_12JournalEntry___cinit__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_reader); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_6cursor___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_2get_realtime_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4get_monotonic_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_6get_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_8get_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_10boot_id(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4date___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4data___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static void __pyx_pf_9cysystemd_6reader_12JournalEntry_12__dealloc__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_14__repr__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_16__getitem__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9cysystemd_6reader_13JournalReader___init__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_2open(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_4open_directory(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6open_files(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_file_names); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static int __pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold_2__set__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6closed___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6locked___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_4idle___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_8_lock(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_opening); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_11seek_head(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_13seek_tail(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_15seek_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_boot_id, uint64_t __pyx_v_usec); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_17seek_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_usec); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_19seek_cursor(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_cursor); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_21wait(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint32_t __pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_23__iter__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_25next(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_27skip_next(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_29previous(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_31skip_previous(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_33add_filter(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_rule); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_35clear_filter(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_37__repr__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static void __pyx_pf_9cysystemd_6reader_13JournalReader_39__dealloc__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_2fd___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6events___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_7timeout___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_41process_events(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_43get_catalog(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_45get_catalog_for_message_id(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_message_id); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_47__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_49__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9cysystemd_6reader_2__pyx_unpickle_Rule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_tp_new_9cysystemd_6reader_Rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9cysystemd_6reader_JournalEntry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9cysystemd_6reader_JournalReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct_1__lock(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_str____object___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_encode = {0, &__pyx_n_s_encode, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_upper = {0, &__pyx_n_s_upper, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_255;
static PyObject *__pyx_int_1048576;
static PyObject *__pyx_int_194258686;
static PyObject *__pyx_int_4294967295;
static PyObject *__pyx_k__13;
static uint32_t __pyx_k__18;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
/* Late includes */

/* "cysystemd/reader.pyx":57
 *     cdef object _operand
 * 
 *     def __init__(self, str key, str value):             # <<<<<<<<<<<<<<
 *         cdef str exp = "=".join((key.upper(), value))
 * 
 */

#line 57 "cysystemd/reader.pyx"


#line 57 "cysystemd/reader.pyx"
/* Python wrapper */

#line 57 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 57 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0
#line 57 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_value = 0
#line 57 "cysystemd/reader.pyx"
;

#line 57 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 57 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 57 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 57 "cysystemd/reader.pyx"
  int __pyx_r;

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);

#line 57 "cysystemd/reader.pyx"
  {

#line 57 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};

#line 57 "cysystemd/reader.pyx"
    PyObject* values[2] = {0,0};

#line 57 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 57 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 57 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 57 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  2: 
#line 57 "cysystemd/reader.pyx"
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 57 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  1: 
#line 57 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 57 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 57 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 57 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 57 "cysystemd/reader.pyx"
      }

#line 57 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 57 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 57 "cysystemd/reader.pyx"
        case  0:

#line 57 "cysystemd/reader.pyx"
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else 
#line 57 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 57 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 57 "cysystemd/reader.pyx"
        case  1:

#line 57 "cysystemd/reader.pyx"
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;

#line 57 "cysystemd/reader.pyx"
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); 
#line 57 "cysystemd/reader.pyx"
__PYX_ERR(0, 57, __pyx_L3_error)

#line 57 "cysystemd/reader.pyx"
        }

#line 57 "cysystemd/reader.pyx"
      }

#line 57 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 57 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 57, __pyx_L3_error)

#line 57 "cysystemd/reader.pyx"
      }

#line 57 "cysystemd/reader.pyx"
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {

#line 57 "cysystemd/reader.pyx"
      goto __pyx_L5_argtuple_error;

#line 57 "cysystemd/reader.pyx"
    } else {

#line 57 "cysystemd/reader.pyx"
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 57 "cysystemd/reader.pyx"
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 57 "cysystemd/reader.pyx"
    }

#line 57 "cysystemd/reader.pyx"
    __pyx_v_key = ((PyObject*)values[0]);

#line 57 "cysystemd/reader.pyx"
    __pyx_v_value = ((PyObject*)values[1]);

#line 57 "cysystemd/reader.pyx"
  }

#line 57 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 57 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); 
#line 57 "cysystemd/reader.pyx"
__PYX_ERR(0, 57, __pyx_L3_error)

#line 57 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 57 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 57 "cysystemd/reader.pyx"
  return -1;

#line 57 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;

#line 57 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyString_Type), 1, "key", 1))) __PYX_ERR(0, 57, __pyx_L1_error)

#line 57 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyString_Type), 1, "value", 1))) __PYX_ERR(0, 57, __pyx_L1_error)
  __pyx_r = 
#line 57 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule___init__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

#line 57 "cysystemd/reader.pyx"


#line 57 "cysystemd/reader.pyx"
  /* function exit code */

#line 57 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 57 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 57 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 57 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 57 "cysystemd/reader.pyx"
  return __pyx_r;

#line 57 "cysystemd/reader.pyx"
}

#line 57 "cysystemd/reader.pyx"


#line 57 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_4Rule___init__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_exp = 0
#line 57 "cysystemd/reader.pyx"
;

#line 57 "cysystemd/reader.pyx"
  int __pyx_r;

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 57 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 57 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 57 "cysystemd/reader.pyx"
  int __pyx_t_3;

#line 57 "cysystemd/reader.pyx"
  int __pyx_t_4;

#line 57 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 57 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 57 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cysystemd/reader.pyx":58
 * 
 *     def __init__(self, str key, str value):
 *         cdef str exp = "=".join((key.upper(), value))             # <<<<<<<<<<<<<<
 * 
 *         if '\0' in exp:
 */

#line 58 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_upper, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)

#line 58 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 58 "cysystemd/reader.pyx"
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)

#line 58 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 58 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 58 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);

#line 58 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_value);

#line 58 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_v_value);

#line 58 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_value);

#line 58 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 58 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)

#line 58 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 58 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 58 "cysystemd/reader.pyx"
  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 58, __pyx_L1_error)

#line 58 "cysystemd/reader.pyx"
  __pyx_v_exp = ((PyObject*)__pyx_t_1);

#line 58 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":60
 *         cdef str exp = "=".join((key.upper(), value))
 * 
 *         if '\0' in exp:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expression must not contains \\0 character")
 * 
 */

#line 60 "cysystemd/reader.pyx"
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__2, __pyx_v_exp, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 60, __pyx_L1_error)

#line 60 "cysystemd/reader.pyx"
  __pyx_t_4 = (__pyx_t_3 != 0);

#line 60 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_4)) {

    /* "cysystemd/reader.pyx":61
 * 
 *         if '\0' in exp:
 *             raise ValueError("Expression must not contains \\0 character")             # <<<<<<<<<<<<<<
 * 
 *         self._expression = exp.encode()
 */

#line 61 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)

#line 61 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 61 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 61 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 61 "cysystemd/reader.pyx"
    __PYX_ERR(0, 61, __pyx_L1_error)

    /* "cysystemd/reader.pyx":60
 *         cdef str exp = "=".join((key.upper(), value))
 * 
 *         if '\0' in exp:             # <<<<<<<<<<<<<<
 *             raise ValueError("Expression must not contains \\0 character")
 * 
 */

#line 60 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":63
 *             raise ValueError("Expression must not contains \\0 character")
 * 
 *         self._expression = exp.encode()             # <<<<<<<<<<<<<<
 *         self._child = None
 *         self._root = self
 */

#line 63 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_exp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)

#line 63 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 63 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 63 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_expression);

#line 63 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_expression);

#line 63 "cysystemd/reader.pyx"
  __pyx_v_self->_expression = __pyx_t_1;

#line 63 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":64
 * 
 *         self._expression = exp.encode()
 *         self._child = None             # <<<<<<<<<<<<<<
 *         self._root = self
 *         self._operand = MatchOperation.AND
 */

#line 64 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_None);

#line 64 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(Py_None);

#line 64 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_child);

#line 64 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_child);

#line 64 "cysystemd/reader.pyx"
  __pyx_v_self->_child = Py_None;

  /* "cysystemd/reader.pyx":65
 *         self._expression = exp.encode()
 *         self._child = None
 *         self._root = self             # <<<<<<<<<<<<<<
 *         self._operand = MatchOperation.AND
 * 
 */

#line 65 "cysystemd/reader.pyx"
  __Pyx_INCREF(((PyObject *)__pyx_v_self));

#line 65 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));

#line 65 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_root);

#line 65 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_root);

#line 65 "cysystemd/reader.pyx"
  __pyx_v_self->_root = ((PyObject *)__pyx_v_self);

  /* "cysystemd/reader.pyx":66
 *         self._child = None
 *         self._root = self
 *         self._operand = MatchOperation.AND             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 66 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)

#line 66 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 66 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)

#line 66 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 66 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 66 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_2);

#line 66 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_operand);

#line 66 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_operand);

#line 66 "cysystemd/reader.pyx"
  __pyx_v_self->_operand = __pyx_t_2;

#line 66 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":57
 *     cdef object _operand
 * 
 *     def __init__(self, str key, str value):             # <<<<<<<<<<<<<<
 *         cdef str exp = "=".join((key.upper(), value))
 * 
 */

#line 57 "cysystemd/reader.pyx"


#line 57 "cysystemd/reader.pyx"
  /* function exit code */

#line 57 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 57 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 57 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 57 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 57 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 57 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 57 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 57 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 57 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_exp);

#line 57 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 57 "cysystemd/reader.pyx"
  return __pyx_r;

#line 57 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":69
 * 
 *     @property
 *     def expression(self):             # <<<<<<<<<<<<<<
 *         return self._expression
 * 
 */

#line 69 "cysystemd/reader.pyx"


#line 69 "cysystemd/reader.pyx"
/* Python wrapper */

#line 69 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_10expression_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 69 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_10expression_1__get__(PyObject *__pyx_v_self) {

#line 69 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 69 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_10expression___get__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 69 "cysystemd/reader.pyx"


#line 69 "cysystemd/reader.pyx"
  /* function exit code */

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 69 "cysystemd/reader.pyx"
  return __pyx_r;

#line 69 "cysystemd/reader.pyx"
}

#line 69 "cysystemd/reader.pyx"


#line 69 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_10expression___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {

#line 69 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":70
 *     @property
 *     def expression(self):
 *         return self._expression             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 70 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 70 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->_expression);

#line 70 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->_expression;

#line 70 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":69
 * 
 *     @property
 *     def expression(self):             # <<<<<<<<<<<<<<
 *         return self._expression
 * 
 */

#line 69 "cysystemd/reader.pyx"


#line 69 "cysystemd/reader.pyx"
  /* function exit code */

#line 69 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 69 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 69 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 69 "cysystemd/reader.pyx"
  return __pyx_r;

#line 69 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":73
 * 
 *     @property
 *     def child(self):             # <<<<<<<<<<<<<<
 *         return self._child
 * 
 */

#line 73 "cysystemd/reader.pyx"


#line 73 "cysystemd/reader.pyx"
/* Python wrapper */

#line 73 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_5child_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 73 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_5child_1__get__(PyObject *__pyx_v_self) {

#line 73 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 73 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_5child___get__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 73 "cysystemd/reader.pyx"


#line 73 "cysystemd/reader.pyx"
  /* function exit code */

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 73 "cysystemd/reader.pyx"
  return __pyx_r;

#line 73 "cysystemd/reader.pyx"
}

#line 73 "cysystemd/reader.pyx"


#line 73 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_5child___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {

#line 73 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":74
 *     @property
 *     def child(self):
 *         return self._child             # <<<<<<<<<<<<<<
 * 
 *     @child.setter
 */

#line 74 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 74 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->_child);

#line 74 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->_child;

#line 74 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":73
 * 
 *     @property
 *     def child(self):             # <<<<<<<<<<<<<<
 *         return self._child
 * 
 */

#line 73 "cysystemd/reader.pyx"


#line 73 "cysystemd/reader.pyx"
  /* function exit code */

#line 73 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 73 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 73 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 73 "cysystemd/reader.pyx"
  return __pyx_r;

#line 73 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":77
 * 
 *     @child.setter
 *     def child(self, Rule child):             # <<<<<<<<<<<<<<
 *         self._child = child
 * 
 */

#line 77 "cysystemd/reader.pyx"


#line 77 "cysystemd/reader.pyx"
/* Python wrapper */

#line 77 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_5child_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_child); /*proto*/

#line 77 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_5child_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_child) {

#line 77 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 77 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 77 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 77 "cysystemd/reader.pyx"
  int __pyx_r;

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);

#line 77 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child), __pyx_ptype_9cysystemd_6reader_Rule, 1, "child", 0))) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_r = 
#line 77 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_5child_2__set__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self), ((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_child));

#line 77 "cysystemd/reader.pyx"


#line 77 "cysystemd/reader.pyx"
  /* function exit code */

#line 77 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 77 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 77 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 77 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 77 "cysystemd/reader.pyx"
  return __pyx_r;

#line 77 "cysystemd/reader.pyx"
}

#line 77 "cysystemd/reader.pyx"


#line 77 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_4Rule_5child_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_child) {

#line 77 "cysystemd/reader.pyx"
  int __pyx_r;

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cysystemd/reader.pyx":78
 *     @child.setter
 *     def child(self, Rule child):
 *         self._child = child             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 78 "cysystemd/reader.pyx"
  __Pyx_INCREF(((PyObject *)__pyx_v_child));

#line 78 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(((PyObject *)__pyx_v_child));

#line 78 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_child);

#line 78 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_child);

#line 78 "cysystemd/reader.pyx"
  __pyx_v_self->_child = ((PyObject *)__pyx_v_child);

  /* "cysystemd/reader.pyx":77
 * 
 *     @child.setter
 *     def child(self, Rule child):             # <<<<<<<<<<<<<<
 *         self._child = child
 * 
 */

#line 77 "cysystemd/reader.pyx"


#line 77 "cysystemd/reader.pyx"
  /* function exit code */

#line 77 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 77 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 77 "cysystemd/reader.pyx"
  return __pyx_r;

#line 77 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":81
 * 
 *     @property
 *     def root(self):             # <<<<<<<<<<<<<<
 *         return self._root
 * 
 */

#line 81 "cysystemd/reader.pyx"


#line 81 "cysystemd/reader.pyx"
/* Python wrapper */

#line 81 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_4root_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 81 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_4root_1__get__(PyObject *__pyx_v_self) {

#line 81 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 81 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_4root___get__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 81 "cysystemd/reader.pyx"


#line 81 "cysystemd/reader.pyx"
  /* function exit code */

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 81 "cysystemd/reader.pyx"
  return __pyx_r;

#line 81 "cysystemd/reader.pyx"
}

#line 81 "cysystemd/reader.pyx"


#line 81 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_4root___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {

#line 81 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":82
 *     @property
 *     def root(self):
 *         return self._root             # <<<<<<<<<<<<<<
 * 
 *     @root.setter
 */

#line 82 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 82 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->_root);

#line 82 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->_root;

#line 82 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":81
 * 
 *     @property
 *     def root(self):             # <<<<<<<<<<<<<<
 *         return self._root
 * 
 */

#line 81 "cysystemd/reader.pyx"


#line 81 "cysystemd/reader.pyx"
  /* function exit code */

#line 81 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 81 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 81 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 81 "cysystemd/reader.pyx"
  return __pyx_r;

#line 81 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":85
 * 
 *     @root.setter
 *     def root(self, Rule root):             # <<<<<<<<<<<<<<
 *         self._root = root
 * 
 */

#line 85 "cysystemd/reader.pyx"


#line 85 "cysystemd/reader.pyx"
/* Python wrapper */

#line 85 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/

#line 85 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {

#line 85 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 85 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 85 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 85 "cysystemd/reader.pyx"
  int __pyx_r;

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);

#line 85 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_9cysystemd_6reader_Rule, 1, "root", 0))) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_r = 
#line 85 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_4root_2__set__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self), ((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_root));

#line 85 "cysystemd/reader.pyx"


#line 85 "cysystemd/reader.pyx"
  /* function exit code */

#line 85 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 85 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 85 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 85 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 85 "cysystemd/reader.pyx"
  return __pyx_r;

#line 85 "cysystemd/reader.pyx"
}

#line 85 "cysystemd/reader.pyx"


#line 85 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_4Rule_4root_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_root) {

#line 85 "cysystemd/reader.pyx"
  int __pyx_r;

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cysystemd/reader.pyx":86
 *     @root.setter
 *     def root(self, Rule root):
 *         self._root = root             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 86 "cysystemd/reader.pyx"
  __Pyx_INCREF(((PyObject *)__pyx_v_root));

#line 86 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(((PyObject *)__pyx_v_root));

#line 86 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_root);

#line 86 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_root);

#line 86 "cysystemd/reader.pyx"
  __pyx_v_self->_root = ((PyObject *)__pyx_v_root);

  /* "cysystemd/reader.pyx":85
 * 
 *     @root.setter
 *     def root(self, Rule root):             # <<<<<<<<<<<<<<
 *         self._root = root
 * 
 */

#line 85 "cysystemd/reader.pyx"


#line 85 "cysystemd/reader.pyx"
  /* function exit code */

#line 85 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 85 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 85 "cysystemd/reader.pyx"
  return __pyx_r;

#line 85 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":89
 * 
 *     @property
 *     def operand(self):             # <<<<<<<<<<<<<<
 *         return self._operand
 * 
 */

#line 89 "cysystemd/reader.pyx"


#line 89 "cysystemd/reader.pyx"
/* Python wrapper */

#line 89 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_7operand_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 89 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_7operand_1__get__(PyObject *__pyx_v_self) {

#line 89 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 89 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_7operand___get__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 89 "cysystemd/reader.pyx"


#line 89 "cysystemd/reader.pyx"
  /* function exit code */

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 89 "cysystemd/reader.pyx"
  return __pyx_r;

#line 89 "cysystemd/reader.pyx"
}

#line 89 "cysystemd/reader.pyx"


#line 89 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_7operand___get__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {

#line 89 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":90
 *     @property
 *     def operand(self):
 *         return self._operand             # <<<<<<<<<<<<<<
 * 
 *     @operand.setter
 */

#line 90 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 90 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->_operand);

#line 90 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->_operand;

#line 90 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":89
 * 
 *     @property
 *     def operand(self):             # <<<<<<<<<<<<<<
 *         return self._operand
 * 
 */

#line 89 "cysystemd/reader.pyx"


#line 89 "cysystemd/reader.pyx"
  /* function exit code */

#line 89 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 89 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 89 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 89 "cysystemd/reader.pyx"
  return __pyx_r;

#line 89 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":93
 * 
 *     @operand.setter
 *     def operand(self, uint8_t op):             # <<<<<<<<<<<<<<
 *         self._operand = MatchOperation(op)
 * 
 */

#line 93 "cysystemd/reader.pyx"


#line 93 "cysystemd/reader.pyx"
/* Python wrapper */

#line 93 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_7operand_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_op); /*proto*/

#line 93 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_4Rule_7operand_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_op) {
  uint8_t __pyx_v_op
#line 93 "cysystemd/reader.pyx"
;

#line 93 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 93 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 93 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 93 "cysystemd/reader.pyx"
  int __pyx_r;

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);

#line 93 "cysystemd/reader.pyx"
  assert(__pyx_arg_op); {

#line 93 "cysystemd/reader.pyx"
    __pyx_v_op = __Pyx_PyInt_As_uint8_t(__pyx_arg_op); if (unlikely((__pyx_v_op == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L3_error)

#line 93 "cysystemd/reader.pyx"
  }

#line 93 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 93 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 93 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.operand.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 93 "cysystemd/reader.pyx"
  return -1;

#line 93 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 93 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_7operand_2__set__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self), ((uint8_t)__pyx_v_op));

#line 93 "cysystemd/reader.pyx"


#line 93 "cysystemd/reader.pyx"
  /* function exit code */

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 93 "cysystemd/reader.pyx"
  return __pyx_r;

#line 93 "cysystemd/reader.pyx"
}

#line 93 "cysystemd/reader.pyx"


#line 93 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_4Rule_7operand_2__set__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, uint8_t __pyx_v_op) {

#line 93 "cysystemd/reader.pyx"
  int __pyx_r;

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 93 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 93 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 93 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 93 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 93 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 93 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 93 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cysystemd/reader.pyx":94
 *     @operand.setter
 *     def operand(self, uint8_t op):
 *         self._operand = MatchOperation(op)             # <<<<<<<<<<<<<<
 * 
 *     def __and__(self, Rule other):
 */

#line 94 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)

#line 94 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 94 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error)

#line 94 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 94 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 94 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 94 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 94 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 94 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 94 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 94 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 94 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 94 "cysystemd/reader.pyx"
    }

#line 94 "cysystemd/reader.pyx"
  }

#line 94 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 94 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 94 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 94 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)

#line 94 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 94 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 94 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 94 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_operand);

#line 94 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_operand);

#line 94 "cysystemd/reader.pyx"
  __pyx_v_self->_operand = __pyx_t_1;

#line 94 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":93
 * 
 *     @operand.setter
 *     def operand(self, uint8_t op):             # <<<<<<<<<<<<<<
 *         self._operand = MatchOperation(op)
 * 
 */

#line 93 "cysystemd/reader.pyx"


#line 93 "cysystemd/reader.pyx"
  /* function exit code */

#line 93 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 93 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 93 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 93 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 93 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 93 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 93 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 93 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.operand.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 93 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 93 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 93 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 93 "cysystemd/reader.pyx"
  return __pyx_r;

#line 93 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":96
 *         self._operand = MatchOperation(op)
 * 
 *     def __and__(self, Rule other):             # <<<<<<<<<<<<<<
 *         self.operand = MatchOperation.AND
 *         self.child = other
 */

#line 96 "cysystemd/reader.pyx"


#line 96 "cysystemd/reader.pyx"
/* Python wrapper */

#line 96 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_3__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/

#line 96 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_3__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {

#line 96 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 96 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 96 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 96 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);

#line 96 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_9cysystemd_6reader_Rule, 1, "other", 0))) __PYX_ERR(0, 96, __pyx_L1_error)
  __pyx_r = 
#line 96 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_2__and__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_other));

#line 96 "cysystemd/reader.pyx"


#line 96 "cysystemd/reader.pyx"
  /* function exit code */

#line 96 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 96 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 96 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 96 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 96 "cysystemd/reader.pyx"
  return __pyx_r;

#line 96 "cysystemd/reader.pyx"
}

#line 96 "cysystemd/reader.pyx"


#line 96 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_2__and__(PyObject *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_other) {

#line 96 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 96 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 96 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 96 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 96 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 96 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__and__", 0);

  /* "cysystemd/reader.pyx":97
 * 
 *     def __and__(self, Rule other):
 *         self.operand = MatchOperation.AND             # <<<<<<<<<<<<<<
 *         self.child = other
 *         other.root = self.root
 */

#line 97 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)

#line 97 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 97 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AND); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)

#line 97 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 97 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 97 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_operand, __pyx_t_2) < 0) __PYX_ERR(0, 97, __pyx_L1_error)

#line 97 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":98
 *     def __and__(self, Rule other):
 *         self.operand = MatchOperation.AND
 *         self.child = other             # <<<<<<<<<<<<<<
 *         other.root = self.root
 * 
 */

#line 98 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_child, ((PyObject *)__pyx_v_other)) < 0) __PYX_ERR(0, 98, __pyx_L1_error)

  /* "cysystemd/reader.pyx":99
 *         self.operand = MatchOperation.AND
 *         self.child = other
 *         other.root = self.root             # <<<<<<<<<<<<<<
 * 
 *         return other
 */

#line 99 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)

#line 99 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 99 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_root, __pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error)

#line 99 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":101
 *         other.root = self.root
 * 
 *         return other             # <<<<<<<<<<<<<<
 * 
 *     def __or__(self, Rule other):
 */

#line 101 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 101 "cysystemd/reader.pyx"
  __Pyx_INCREF(((PyObject *)__pyx_v_other));

#line 101 "cysystemd/reader.pyx"
  __pyx_r = ((PyObject *)__pyx_v_other);

#line 101 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":96
 *         self._operand = MatchOperation(op)
 * 
 *     def __and__(self, Rule other):             # <<<<<<<<<<<<<<
 *         self.operand = MatchOperation.AND
 *         self.child = other
 */

#line 96 "cysystemd/reader.pyx"


#line 96 "cysystemd/reader.pyx"
  /* function exit code */

#line 96 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 96 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 96 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 96 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 96 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 96 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 96 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 96 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 96 "cysystemd/reader.pyx"
  return __pyx_r;

#line 96 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":103
 *         return other
 * 
 *     def __or__(self, Rule other):             # <<<<<<<<<<<<<<
 *         self.operand = MatchOperation.OR
 *         self.child = other
 */

#line 103 "cysystemd/reader.pyx"


#line 103 "cysystemd/reader.pyx"
/* Python wrapper */

#line 103 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_5__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/

#line 103 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_5__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {

#line 103 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 103 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 103 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 103 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);

#line 103 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_9cysystemd_6reader_Rule, 1, "other", 0))) __PYX_ERR(0, 103, __pyx_L1_error)
  __pyx_r = 
#line 103 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_4__or__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_other));

#line 103 "cysystemd/reader.pyx"


#line 103 "cysystemd/reader.pyx"
  /* function exit code */

#line 103 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 103 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 103 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 103 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 103 "cysystemd/reader.pyx"
  return __pyx_r;

#line 103 "cysystemd/reader.pyx"
}

#line 103 "cysystemd/reader.pyx"


#line 103 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_4__or__(PyObject *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_other) {

#line 103 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 103 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 103 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 103 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 103 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 103 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__or__", 0);

  /* "cysystemd/reader.pyx":104
 * 
 *     def __or__(self, Rule other):
 *         self.operand = MatchOperation.OR             # <<<<<<<<<<<<<<
 *         self.child = other
 *         other.root = self.root
 */

#line 104 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)

#line 104 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 104 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)

#line 104 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 104 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 104 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_operand, __pyx_t_2) < 0) __PYX_ERR(0, 104, __pyx_L1_error)

#line 104 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":105
 *     def __or__(self, Rule other):
 *         self.operand = MatchOperation.OR
 *         self.child = other             # <<<<<<<<<<<<<<
 *         other.root = self.root
 * 
 */

#line 105 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_child, ((PyObject *)__pyx_v_other)) < 0) __PYX_ERR(0, 105, __pyx_L1_error)

  /* "cysystemd/reader.pyx":106
 *         self.operand = MatchOperation.OR
 *         self.child = other
 *         other.root = self.root             # <<<<<<<<<<<<<<
 * 
 *         return other
 */

#line 106 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)

#line 106 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 106 "cysystemd/reader.pyx"
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_root, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)

#line 106 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":108
 *         other.root = self.root
 * 
 *         return other             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */

#line 108 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 108 "cysystemd/reader.pyx"
  __Pyx_INCREF(((PyObject *)__pyx_v_other));

#line 108 "cysystemd/reader.pyx"
  __pyx_r = ((PyObject *)__pyx_v_other);

#line 108 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":103
 *         return other
 * 
 *     def __or__(self, Rule other):             # <<<<<<<<<<<<<<
 *         self.operand = MatchOperation.OR
 *         self.child = other
 */

#line 103 "cysystemd/reader.pyx"


#line 103 "cysystemd/reader.pyx"
  /* function exit code */

#line 103 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 103 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 103 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 103 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 103 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 103 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 103 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 103 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 103 "cysystemd/reader.pyx"
  return __pyx_r;

#line 103 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":110
 *         return other
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         ret = []
 *         for opcode, exp in self:
 */

#line 110 "cysystemd/reader.pyx"


#line 110 "cysystemd/reader.pyx"
/* Python wrapper */

#line 110 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_7__repr__(PyObject *__pyx_v_self); /*proto*/

#line 110 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_7__repr__(PyObject *__pyx_v_self) {

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = 
#line 110 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_6__repr__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 110 "cysystemd/reader.pyx"


#line 110 "cysystemd/reader.pyx"
  /* function exit code */

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 110 "cysystemd/reader.pyx"
  return __pyx_r;

#line 110 "cysystemd/reader.pyx"
}

#line 110 "cysystemd/reader.pyx"


#line 110 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_6__repr__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {
  PyObject *__pyx_v_ret = NULL
#line 110 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_opcode = NULL
#line 110 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_exp = NULL
#line 110 "cysystemd/reader.pyx"
;

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 110 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_2;

#line 110 "cysystemd/reader.pyx"
  PyObject *(*__pyx_t_3)(PyObject *);

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 110 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 110 "cysystemd/reader.pyx"
  PyObject *(*__pyx_t_8)(PyObject *);

#line 110 "cysystemd/reader.pyx"
  int __pyx_t_9;

#line 110 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 110 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 110 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cysystemd/reader.pyx":111
 * 
 *     def __repr__(self):
 *         ret = []             # <<<<<<<<<<<<<<
 *         for opcode, exp in self:
 *             ret.append("%r" % exp.decode())
 */

#line 111 "cysystemd/reader.pyx"
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)

#line 111 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 111 "cysystemd/reader.pyx"
  __pyx_v_ret = ((PyObject*)__pyx_t_1);

#line 111 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":112
 *     def __repr__(self):
 *         ret = []
 *         for opcode, exp in self:             # <<<<<<<<<<<<<<
 *             ret.append("%r" % exp.decode())
 *             ret.append(opcode.name)
 */

#line 112 "cysystemd/reader.pyx"
  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {

#line 112 "cysystemd/reader.pyx"
    __pyx_t_1 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;

#line 112 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 112 "cysystemd/reader.pyx"
  } else {
    __pyx_t_2 = -1; 
#line 112 "cysystemd/reader.pyx"
__pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 112 "cysystemd/reader.pyx"
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
  }

#line 112 "cysystemd/reader.pyx"
  for (;;) {

#line 112 "cysystemd/reader.pyx"
    if (likely(!__pyx_t_3)) {

#line 112 "cysystemd/reader.pyx"
      if (likely(PyList_CheckExact(__pyx_t_1))) {

#line 112 "cysystemd/reader.pyx"
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;

#line 112 "cysystemd/reader.pyx"
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 112 "cysystemd/reader.pyx"
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
        #else

#line 112 "cysystemd/reader.pyx"
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_4);

#line 112 "cysystemd/reader.pyx"
        #endif

#line 112 "cysystemd/reader.pyx"
      } else {

#line 112 "cysystemd/reader.pyx"
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;

#line 112 "cysystemd/reader.pyx"
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 112 "cysystemd/reader.pyx"
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
        #else

#line 112 "cysystemd/reader.pyx"
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_4);

#line 112 "cysystemd/reader.pyx"
        #endif

#line 112 "cysystemd/reader.pyx"
      }
    } else 
#line 112 "cysystemd/reader.pyx"
{

#line 112 "cysystemd/reader.pyx"
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);

#line 112 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_4)) {

#line 112 "cysystemd/reader.pyx"
        PyObject* exc_type = PyErr_Occurred();

#line 112 "cysystemd/reader.pyx"
        if (exc_type) {

#line 112 "cysystemd/reader.pyx"
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();

#line 112 "cysystemd/reader.pyx"
          else __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
        }

#line 112 "cysystemd/reader.pyx"
        break;

#line 112 "cysystemd/reader.pyx"
      }

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_4);

#line 112 "cysystemd/reader.pyx"
    }

#line 112 "cysystemd/reader.pyx"
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {

#line 112 "cysystemd/reader.pyx"
      PyObject* sequence = __pyx_t_4;

#line 112 "cysystemd/reader.pyx"
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);

#line 112 "cysystemd/reader.pyx"
      if (unlikely(size != 2)) {

#line 112 "cysystemd/reader.pyx"
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);

#line 112 "cysystemd/reader.pyx"
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);

#line 112 "cysystemd/reader.pyx"
        __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      }

#line 112 "cysystemd/reader.pyx"
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 112 "cysystemd/reader.pyx"
      if (likely(PyTuple_CheckExact(sequence))) {

#line 112 "cysystemd/reader.pyx"
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 

#line 112 "cysystemd/reader.pyx"
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 

#line 112 "cysystemd/reader.pyx"
      } else {

#line 112 "cysystemd/reader.pyx"
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 

#line 112 "cysystemd/reader.pyx"
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 

#line 112 "cysystemd/reader.pyx"
      }

#line 112 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 112 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_6);

#line 112 "cysystemd/reader.pyx"
      #else

#line 112 "cysystemd/reader.pyx"
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_5);

#line 112 "cysystemd/reader.pyx"
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_6);

#line 112 "cysystemd/reader.pyx"
      #endif

#line 112 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 112 "cysystemd/reader.pyx"
    } else {

#line 112 "cysystemd/reader.pyx"
      Py_ssize_t index = -1;

#line 112 "cysystemd/reader.pyx"
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_7);

#line 112 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 112 "cysystemd/reader.pyx"
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) 
#line 112 "cysystemd/reader.pyx"
goto __pyx_L5_unpacking_failed;

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) 
#line 112 "cysystemd/reader.pyx"
goto __pyx_L5_unpacking_failed;

#line 112 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_6);

#line 112 "cysystemd/reader.pyx"
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      __pyx_t_8 = NULL;

#line 112 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 112 "cysystemd/reader.pyx"
      goto __pyx_L6_unpacking_done;

#line 112 "cysystemd/reader.pyx"
      __pyx_L5_unpacking_failed:;

#line 112 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 112 "cysystemd/reader.pyx"
      __pyx_t_8 = NULL;

#line 112 "cysystemd/reader.pyx"
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);

#line 112 "cysystemd/reader.pyx"
      __PYX_ERR(0, 112, __pyx_L1_error)

#line 112 "cysystemd/reader.pyx"
      __pyx_L6_unpacking_done:;

#line 112 "cysystemd/reader.pyx"
    }

#line 112 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_opcode, __pyx_t_5);

#line 112 "cysystemd/reader.pyx"
    __pyx_t_5 = 0;

#line 112 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_6);

#line 112 "cysystemd/reader.pyx"
    __pyx_t_6 = 0;

    /* "cysystemd/reader.pyx":113
 *         ret = []
 *         for opcode, exp in self:
 *             ret.append("%r" % exp.decode())             # <<<<<<<<<<<<<<
 *             ret.append(opcode.name)
 * 
 */

#line 113 "cysystemd/reader.pyx"
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)

#line 113 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_6);

#line 113 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 113 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {

#line 113 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);

#line 113 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 113 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);

#line 113 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 113 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 113 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_6, function);

#line 113 "cysystemd/reader.pyx"
      }

#line 113 "cysystemd/reader.pyx"
    }

#line 113 "cysystemd/reader.pyx"
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);

#line 113 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 113 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)

#line 113 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 113 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 113 "cysystemd/reader.pyx"
    __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_r, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)

#line 113 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_6);

#line 113 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 113 "cysystemd/reader.pyx"
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error)

#line 113 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cysystemd/reader.pyx":114
 *         for opcode, exp in self:
 *             ret.append("%r" % exp.decode())
 *             ret.append(opcode.name)             # <<<<<<<<<<<<<<
 * 
 *         return 'Rule(%r)' % ' '.join(ret[:-1])
 */

#line 114 "cysystemd/reader.pyx"
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_opcode, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)

#line 114 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_6);

#line 114 "cysystemd/reader.pyx"
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error)

#line 114 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cysystemd/reader.pyx":112
 *     def __repr__(self):
 *         ret = []
 *         for opcode, exp in self:             # <<<<<<<<<<<<<<
 *             ret.append("%r" % exp.decode())
 *             ret.append(opcode.name)
 */

#line 112 "cysystemd/reader.pyx"
  }

#line 112 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":116
 *             ret.append(opcode.name)
 * 
 *         return 'Rule(%r)' % ' '.join(ret[:-1])             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */

#line 116 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 116 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_ret, 0, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)

#line 116 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 116 "cysystemd/reader.pyx"
  __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)

#line 116 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_6);

#line 116 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 116 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Rule_r, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)

#line 116 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 116 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 116 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 116 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 116 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":110
 *         return other
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         ret = []
 *         for opcode, exp in self:
 */

#line 110 "cysystemd/reader.pyx"


#line 110 "cysystemd/reader.pyx"
  /* function exit code */

#line 110 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_7);

#line 110 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 110 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 110 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_ret);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_opcode);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_exp);

#line 110 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 110 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 110 "cysystemd/reader.pyx"
  return __pyx_r;

#line 110 "cysystemd/reader.pyx"
}

#line 110 "cysystemd/reader.pyx"
static PyObject *__pyx_gb_9cysystemd_6reader_4Rule_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cysystemd/reader.pyx":118
 *         return 'Rule(%r)' % ' '.join(ret[:-1])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         rule = self.root
 * 
 */

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
/* Python wrapper */

#line 118 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_9__iter__(PyObject *__pyx_v_self); /*proto*/

#line 118 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_9__iter__(PyObject *__pyx_v_self) {

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = 
#line 118 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_4Rule_8__iter__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
  /* function exit code */

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 118 "cysystemd/reader.pyx"
  return __pyx_r;

#line 118 "cysystemd/reader.pyx"
}

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_8__iter__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *__pyx_cur_scope
#line 118 "cysystemd/reader.pyx"
;

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 118 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 118 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 118 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__iter__", 0);

#line 118 "cysystemd/reader.pyx"
  __pyx_cur_scope = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct____iter__(__pyx_ptype_9cysystemd_6reader___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);

#line 118 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_cur_scope)) {

#line 118 "cysystemd/reader.pyx"
    __pyx_cur_scope = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)Py_None);

#line 118 "cysystemd/reader.pyx"
    __Pyx_INCREF(Py_None);

#line 118 "cysystemd/reader.pyx"
    __PYX_ERR(0, 118, __pyx_L1_error)

#line 118 "cysystemd/reader.pyx"
  } else {

#line 118 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_cur_scope);

#line 118 "cysystemd/reader.pyx"
  }

#line 118 "cysystemd/reader.pyx"
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;

#line 118 "cysystemd/reader.pyx"
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

#line 118 "cysystemd/reader.pyx"
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

#line 118 "cysystemd/reader.pyx"
  {

#line 118 "cysystemd/reader.pyx"
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cysystemd_6reader_4Rule_10generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_Rule___iter, __pyx_n_s_cysystemd_reader); if (unlikely(!gen)) __PYX_ERR(0, 118, __pyx_L1_error)

#line 118 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_cur_scope);

#line 118 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 118 "cysystemd/reader.pyx"
    return (PyObject *) gen;

#line 118 "cysystemd/reader.pyx"
  }

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
  /* function exit code */

#line 118 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 118 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 118 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 118 "cysystemd/reader.pyx"
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));

#line 118 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 118 "cysystemd/reader.pyx"
  return __pyx_r;

#line 118 "cysystemd/reader.pyx"
}

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
static PyObject *__pyx_gb_9cysystemd_6reader_4Rule_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{

#line 118 "cysystemd/reader.pyx"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)__pyx_generator->closure);

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 118 "cysystemd/reader.pyx"
  int __pyx_t_2;

#line 118 "cysystemd/reader.pyx"
  int __pyx_t_3;

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 118 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 118 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 118 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 118 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__iter__", 0);

#line 118 "cysystemd/reader.pyx"
  switch (__pyx_generator->resume_label) {

#line 118 "cysystemd/reader.pyx"
    case 0: goto __pyx_L3_first_run;

#line 118 "cysystemd/reader.pyx"
    case 1: goto __pyx_L6_resume_from_yield;

#line 118 "cysystemd/reader.pyx"
    default: /* CPython raises the right error here */

#line 118 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 118 "cysystemd/reader.pyx"
    return NULL;

#line 118 "cysystemd/reader.pyx"
  }

#line 118 "cysystemd/reader.pyx"
  __pyx_L3_first_run:;

#line 118 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 118, __pyx_L1_error)

  /* "cysystemd/reader.pyx":119
 * 
 *     def __iter__(self):
 *         rule = self.root             # <<<<<<<<<<<<<<
 * 
 *         while rule is not None:
 */

#line 119 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)

#line 119 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 119 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 119 "cysystemd/reader.pyx"
  __pyx_cur_scope->__pyx_v_rule = __pyx_t_1;

#line 119 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":121
 *         rule = self.root
 * 
 *         while rule is not None:             # <<<<<<<<<<<<<<
 *             yield rule.operand, rule.expression
 *             rule = rule.child
 */

#line 121 "cysystemd/reader.pyx"
  while (1) {

#line 121 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_cur_scope->__pyx_v_rule != Py_None);

#line 121 "cysystemd/reader.pyx"
    __pyx_t_3 = (__pyx_t_2 != 0);

#line 121 "cysystemd/reader.pyx"
    if (!__pyx_t_3) break;

    /* "cysystemd/reader.pyx":122
 * 
 *         while rule is not None:
 *             yield rule.operand, rule.expression             # <<<<<<<<<<<<<<
 *             rule = rule.child
 * 
 */

#line 122 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rule, __pyx_n_s_operand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)

#line 122 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 122 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rule, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)

#line 122 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 122 "cysystemd/reader.pyx"
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)

#line 122 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 122 "cysystemd/reader.pyx"
    __Pyx_GIVEREF(__pyx_t_1);

#line 122 "cysystemd/reader.pyx"
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);

#line 122 "cysystemd/reader.pyx"
    __Pyx_GIVEREF(__pyx_t_4);

#line 122 "cysystemd/reader.pyx"
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);

#line 122 "cysystemd/reader.pyx"
    __pyx_t_1 = 0;

#line 122 "cysystemd/reader.pyx"
    __pyx_t_4 = 0;

#line 122 "cysystemd/reader.pyx"
    __pyx_r = __pyx_t_5;

#line 122 "cysystemd/reader.pyx"
    __pyx_t_5 = 0;

#line 122 "cysystemd/reader.pyx"
    __Pyx_XGIVEREF(__pyx_r);

#line 122 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 122 "cysystemd/reader.pyx"
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);

#line 122 "cysystemd/reader.pyx"
    /* return from generator, yielding value */

#line 122 "cysystemd/reader.pyx"
    __pyx_generator->resume_label = 1;

#line 122 "cysystemd/reader.pyx"
    return __pyx_r;

#line 122 "cysystemd/reader.pyx"
    __pyx_L6_resume_from_yield:;

#line 122 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 122, __pyx_L1_error)

    /* "cysystemd/reader.pyx":123
 *         while rule is not None:
 *             yield rule.operand, rule.expression
 *             rule = rule.child             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 123 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rule, __pyx_n_s_child); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)

#line 123 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 123 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_rule);

#line 123 "cysystemd/reader.pyx"
    __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_rule, __pyx_t_5);

#line 123 "cysystemd/reader.pyx"
    __Pyx_GIVEREF(__pyx_t_5);

#line 123 "cysystemd/reader.pyx"
    __pyx_t_5 = 0;

#line 123 "cysystemd/reader.pyx"
  }

#line 123 "cysystemd/reader.pyx"
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "cysystemd/reader.pyx":118
 *         return 'Rule(%r)' % ' '.join(ret[:-1])
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         rule = self.root
 * 
 */

#line 118 "cysystemd/reader.pyx"


#line 118 "cysystemd/reader.pyx"
  /* function exit code */

#line 118 "cysystemd/reader.pyx"
  PyErr_SetNone(PyExc_StopIteration);

#line 118 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 118 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 118 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 118 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 118 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 118 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 118 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 118 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;

#line 118 "cysystemd/reader.pyx"
  #if !CYTHON_USE_EXC_INFO_STACK

#line 118 "cysystemd/reader.pyx"
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);

#line 118 "cysystemd/reader.pyx"
  #endif

#line 118 "cysystemd/reader.pyx"
  __pyx_generator->resume_label = -1;

#line 118 "cysystemd/reader.pyx"
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);

#line 118 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 118 "cysystemd/reader.pyx"
  return __pyx_r;

#line 118 "cysystemd/reader.pyx"
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
/* Python wrapper */

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_12__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_12__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 1 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = 
#line 1 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_4Rule_11__reduce_cython__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self));

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_11__reduce_cython__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self) {
  PyObject *__pyx_v_state = 0
#line 1 "(tree fragment)"
;
  PyObject *__pyx_v__dict = 0
#line 1 "(tree fragment)"
;
  int __pyx_v_use_setstate
#line 1 "(tree fragment)"
;

#line 1 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 1 "(tree fragment)"
  int __pyx_t_2;

#line 1 "(tree fragment)"
  int __pyx_t_3;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_4 = NULL;

#line 1 "(tree fragment)"
  int __pyx_t_5;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_6 = NULL;

#line 1 "(tree fragment)"
  int __pyx_lineno = 0;

#line 1 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 1 "(tree fragment)"
  int __pyx_clineno = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._child, self._expression, self._operand, self._root)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */

#line 5 "(tree fragment)"
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)

#line 5 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 5 "(tree fragment)"
  __Pyx_INCREF(__pyx_v_self->_child);

#line 5 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_v_self->_child);

#line 5 "(tree fragment)"
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_child);

#line 5 "(tree fragment)"
  __Pyx_INCREF(__pyx_v_self->_expression);

#line 5 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_v_self->_expression);

#line 5 "(tree fragment)"
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_expression);

#line 5 "(tree fragment)"
  __Pyx_INCREF(__pyx_v_self->_operand);

#line 5 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_v_self->_operand);

#line 5 "(tree fragment)"
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_operand);

#line 5 "(tree fragment)"
  __Pyx_INCREF(__pyx_v_self->_root);

#line 5 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_v_self->_root);

#line 5 "(tree fragment)"
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->_root);

#line 5 "(tree fragment)"
  __pyx_v_state = ((PyObject*)__pyx_t_1);

#line 5 "(tree fragment)"
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._child, self._expression, self._operand, self._root)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */

#line 6 "(tree fragment)"
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)

#line 6 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 6 "(tree fragment)"
  __pyx_v__dict = __pyx_t_1;

#line 6 "(tree fragment)"
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._child, self._expression, self._operand, self._root)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */

#line 7 "(tree fragment)"
  __pyx_t_2 = (__pyx_v__dict != Py_None);

#line 7 "(tree fragment)"
  __pyx_t_3 = (__pyx_t_2 != 0);

#line 7 "(tree fragment)"
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */

#line 8 "(tree fragment)"
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)

#line 8 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_1);

#line 8 "(tree fragment)"
    __Pyx_INCREF(__pyx_v__dict);

#line 8 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_v__dict);

#line 8 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);

#line 8 "(tree fragment)"
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)

#line 8 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_4);

#line 8 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 8 "(tree fragment)"
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));

#line 8 "(tree fragment)"
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._child is not None or self._expression is not None or self._operand is not None or self._root is not None
 */

#line 9 "(tree fragment)"
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._child, self._expression, self._operand, self._root)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */

#line 7 "(tree fragment)"
    goto __pyx_L3;

#line 7 "(tree fragment)"
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._child is not None or self._expression is not None or self._operand is not None or self._root is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, None), state
 */

#line 11 "(tree fragment)"
  /*else*/ {

#line 11 "(tree fragment)"
    __pyx_t_2 = (__pyx_v_self->_child != Py_None);

#line 11 "(tree fragment)"
    __pyx_t_5 = (__pyx_t_2 != 0);

#line 11 "(tree fragment)"
    if (!__pyx_t_5) {

#line 11 "(tree fragment)"
    } else {

#line 11 "(tree fragment)"
      __pyx_t_3 = __pyx_t_5;

#line 11 "(tree fragment)"
      goto __pyx_L4_bool_binop_done;

#line 11 "(tree fragment)"
    }

#line 11 "(tree fragment)"
    __pyx_t_5 = (__pyx_v_self->_expression != Py_None);

#line 11 "(tree fragment)"
    __pyx_t_2 = (__pyx_t_5 != 0);

#line 11 "(tree fragment)"
    if (!__pyx_t_2) {

#line 11 "(tree fragment)"
    } else {

#line 11 "(tree fragment)"
      __pyx_t_3 = __pyx_t_2;

#line 11 "(tree fragment)"
      goto __pyx_L4_bool_binop_done;

#line 11 "(tree fragment)"
    }

#line 11 "(tree fragment)"
    __pyx_t_2 = (__pyx_v_self->_operand != Py_None);

#line 11 "(tree fragment)"
    __pyx_t_5 = (__pyx_t_2 != 0);

#line 11 "(tree fragment)"
    if (!__pyx_t_5) {

#line 11 "(tree fragment)"
    } else {

#line 11 "(tree fragment)"
      __pyx_t_3 = __pyx_t_5;

#line 11 "(tree fragment)"
      goto __pyx_L4_bool_binop_done;

#line 11 "(tree fragment)"
    }

#line 11 "(tree fragment)"
    __pyx_t_5 = (__pyx_v_self->_root != Py_None);

#line 11 "(tree fragment)"
    __pyx_t_2 = (__pyx_t_5 != 0);

#line 11 "(tree fragment)"
    __pyx_t_3 = __pyx_t_2;

#line 11 "(tree fragment)"
    __pyx_L4_bool_binop_done:;

#line 11 "(tree fragment)"
    __pyx_v_use_setstate = __pyx_t_3;

#line 11 "(tree fragment)"
  }

#line 11 "(tree fragment)"
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._child is not None or self._expression is not None or self._operand is not None or self._root is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, None), state
 *     else:
 */

#line 12 "(tree fragment)"
  __pyx_t_3 = (__pyx_v_use_setstate != 0);

#line 12 "(tree fragment)"
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._child is not None or self._expression is not None or self._operand is not None or self._root is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, state)
 */

#line 13 "(tree fragment)"
    __Pyx_XDECREF(__pyx_r);

#line 13 "(tree fragment)"
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Rule); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_4);

#line 13 "(tree fragment)"
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_1);

#line 13 "(tree fragment)"
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 13 "(tree fragment)"
    __Pyx_INCREF(__pyx_int_194258686);

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_int_194258686);

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_194258686);

#line 13 "(tree fragment)"
    __Pyx_INCREF(Py_None);

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(Py_None);

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);

#line 13 "(tree fragment)"
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_6);

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_t_4);

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_t_1);

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);

#line 13 "(tree fragment)"
    __Pyx_INCREF(__pyx_v_state);

#line 13 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_v_state);

#line 13 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);

#line 13 "(tree fragment)"
    __pyx_t_4 = 0;

#line 13 "(tree fragment)"
    __pyx_t_1 = 0;

#line 13 "(tree fragment)"
    __pyx_r = __pyx_t_6;

#line 13 "(tree fragment)"
    __pyx_t_6 = 0;

#line 13 "(tree fragment)"
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._child is not None or self._expression is not None or self._operand is not None or self._root is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, None), state
 *     else:
 */

#line 12 "(tree fragment)"
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, None), state
 *     else:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Rule__set_state(self, __pyx_state)
 */

#line 15 "(tree fragment)"
  /*else*/ {

#line 15 "(tree fragment)"
    __Pyx_XDECREF(__pyx_r);

#line 15 "(tree fragment)"
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Rule); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)

#line 15 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_6);

#line 15 "(tree fragment)"
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)

#line 15 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_1);

#line 15 "(tree fragment)"
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 15 "(tree fragment)"
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 15 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));

#line 15 "(tree fragment)"
    __Pyx_INCREF(__pyx_int_194258686);

#line 15 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_int_194258686);

#line 15 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_194258686);

#line 15 "(tree fragment)"
    __Pyx_INCREF(__pyx_v_state);

#line 15 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_v_state);

#line 15 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);

#line 15 "(tree fragment)"
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)

#line 15 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_4);

#line 15 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_t_6);

#line 15 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);

#line 15 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_t_1);

#line 15 "(tree fragment)"
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);

#line 15 "(tree fragment)"
    __pyx_t_6 = 0;

#line 15 "(tree fragment)"
    __pyx_t_1 = 0;

#line 15 "(tree fragment)"
    __pyx_r = __pyx_t_4;

#line 15 "(tree fragment)"
    __pyx_t_4 = 0;

#line 15 "(tree fragment)"
    goto __pyx_L0;

#line 15 "(tree fragment)"
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __pyx_L1_error:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_4);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_6);

#line 1 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 1 "(tree fragment)"
  __pyx_r = NULL;

#line 1 "(tree fragment)"
  __pyx_L0:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_v_state);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_v__dict);

#line 1 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Rule__set_state(self, __pyx_state)
 */

#line 16 "(tree fragment)"


#line 16 "(tree fragment)"
/* Python wrapper */

#line 16 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_14__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/

#line 16 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_4Rule_14__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {

#line 16 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 16 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 16 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = 
#line 16 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_4Rule_13__setstate_cython__(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

#line 16 "(tree fragment)"


#line 16 "(tree fragment)"
  /* function exit code */

#line 16 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 16 "(tree fragment)"
  return __pyx_r;

#line 16 "(tree fragment)"
}

#line 16 "(tree fragment)"


#line 16 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_4Rule_13__setstate_cython__(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_self, PyObject *__pyx_v___pyx_state) {

#line 16 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 16 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 16 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 16 "(tree fragment)"
  int __pyx_lineno = 0;

#line 16 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 16 "(tree fragment)"
  int __pyx_clineno = 0;

#line 16 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Rule__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */

#line 17 "(tree fragment)"
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)

#line 17 "(tree fragment)"
  __pyx_t_1 = __pyx_f_9cysystemd_6reader___pyx_unpickle_Rule__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)

#line 17 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 17 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Rule, (type(self), 0xb9426fe, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Rule__set_state(self, __pyx_state)
 */

#line 16 "(tree fragment)"


#line 16 "(tree fragment)"
  /* function exit code */

#line 16 "(tree fragment)"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 16 "(tree fragment)"
  goto __pyx_L0;

#line 16 "(tree fragment)"
  __pyx_L1_error:;

#line 16 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 16 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.Rule.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 16 "(tree fragment)"
  __pyx_r = NULL;

#line 16 "(tree fragment)"
  __pyx_L0:;

#line 16 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 16 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 16 "(tree fragment)"
  return __pyx_r;

#line 16 "(tree fragment)"
}

/* "cysystemd/reader.pyx":126
 * 
 * 
 * def check_error_code(int code):             # <<<<<<<<<<<<<<
 *     if code >= 0:
 *         return code
 */

#line 126 "cysystemd/reader.pyx"


#line 126 "cysystemd/reader.pyx"
/* Python wrapper */

#line 126 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_1check_error_code(PyObject *__pyx_self, PyObject *__pyx_arg_code); /*proto*/
static PyMethodDef __pyx_mdef_9cysystemd_6reader_1check_error_code = 
#line 126 "cysystemd/reader.pyx"
{"check_error_code", (PyCFunction)__pyx_pw_9cysystemd_6reader_1check_error_code, METH_O, 0};

#line 126 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_1check_error_code(PyObject *__pyx_self, PyObject *__pyx_arg_code) {
  int __pyx_v_code
#line 126 "cysystemd/reader.pyx"
;

#line 126 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 126 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 126 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("check_error_code (wrapper)", 0);

#line 126 "cysystemd/reader.pyx"
  assert(__pyx_arg_code); {

#line 126 "cysystemd/reader.pyx"
    __pyx_v_code = __Pyx_PyInt_As_int(__pyx_arg_code); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L3_error)

#line 126 "cysystemd/reader.pyx"
  }

#line 126 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 126 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 126 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.check_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 126 "cysystemd/reader.pyx"
  return NULL;

#line 126 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 126 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_check_error_code(__pyx_self, ((int)__pyx_v_code));

#line 126 "cysystemd/reader.pyx"


#line 126 "cysystemd/reader.pyx"
  /* function exit code */

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 126 "cysystemd/reader.pyx"
  return __pyx_r;

#line 126 "cysystemd/reader.pyx"
}

#line 126 "cysystemd/reader.pyx"


#line 126 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_check_error_code(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_code) {
  PyObject *__pyx_v_error = NULL
#line 126 "cysystemd/reader.pyx"
;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 126 "cysystemd/reader.pyx"
  int __pyx_t_1;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 126 "cysystemd/reader.pyx"
  int __pyx_t_4;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 126 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 126 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 126 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 126 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("check_error_code", 0);

  /* "cysystemd/reader.pyx":127
 * 
 * def check_error_code(int code):
 *     if code >= 0:             # <<<<<<<<<<<<<<
 *         return code
 * 
 */

#line 127 "cysystemd/reader.pyx"
  __pyx_t_1 = ((__pyx_v_code >= 0) != 0);

#line 127 "cysystemd/reader.pyx"
  if (__pyx_t_1) {

    /* "cysystemd/reader.pyx":128
 * def check_error_code(int code):
 *     if code >= 0:
 *         return code             # <<<<<<<<<<<<<<
 * 
 *     code = -code
 */

#line 128 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_r);

#line 128 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)

#line 128 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 128 "cysystemd/reader.pyx"
    __pyx_r = __pyx_t_2;

#line 128 "cysystemd/reader.pyx"
    __pyx_t_2 = 0;

#line 128 "cysystemd/reader.pyx"
    goto __pyx_L0;

    /* "cysystemd/reader.pyx":127
 * 
 * def check_error_code(int code):
 *     if code >= 0:             # <<<<<<<<<<<<<<
 *         return code
 * 
 */

#line 127 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":130
 *         return code
 * 
 *     code = -code             # <<<<<<<<<<<<<<
 * 
 *     if code in errorcode:
 */

#line 130 "cysystemd/reader.pyx"
  __pyx_v_code = (-__pyx_v_code);

  /* "cysystemd/reader.pyx":132
 *     code = -code
 * 
 *     if code in errorcode:             # <<<<<<<<<<<<<<
 *         error = errorcode[code]
 *         raise SystemError(os.strerror(code), error)
 */

#line 132 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)

#line 132 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 132 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_errorcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)

#line 132 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 132 "cysystemd/reader.pyx"
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 132, __pyx_L1_error)

#line 132 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 132 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 132 "cysystemd/reader.pyx"
  __pyx_t_4 = (__pyx_t_1 != 0);

#line 132 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_4)) {

    /* "cysystemd/reader.pyx":133
 * 
 *     if code in errorcode:
 *         error = errorcode[code]             # <<<<<<<<<<<<<<
 *         raise SystemError(os.strerror(code), error)
 * 
 */

#line 133 "cysystemd/reader.pyx"
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_errorcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)

#line 133 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 133 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_code, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)

#line 133 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 133 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 133 "cysystemd/reader.pyx"
    __pyx_v_error = __pyx_t_2;

#line 133 "cysystemd/reader.pyx"
    __pyx_t_2 = 0;

    /* "cysystemd/reader.pyx":134
 *     if code in errorcode:
 *         error = errorcode[code]
 *         raise SystemError(os.strerror(code), error)             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 134 "cysystemd/reader.pyx"
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 134 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 134 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 134 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 134 "cysystemd/reader.pyx"
    __pyx_t_6 = NULL;

#line 134 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {

#line 134 "cysystemd/reader.pyx"
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);

#line 134 "cysystemd/reader.pyx"
      if (likely(__pyx_t_6)) {

#line 134 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);

#line 134 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_6);

#line 134 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 134 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_5, function);

#line 134 "cysystemd/reader.pyx"
      }

#line 134 "cysystemd/reader.pyx"
    }

#line 134 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);

#line 134 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 134 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 134 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 134 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 134 "cysystemd/reader.pyx"
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 134 "cysystemd/reader.pyx"
    __Pyx_GIVEREF(__pyx_t_2);

#line 134 "cysystemd/reader.pyx"
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);

#line 134 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_v_error);

#line 134 "cysystemd/reader.pyx"
    __Pyx_GIVEREF(__pyx_v_error);

#line 134 "cysystemd/reader.pyx"
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_error);

#line 134 "cysystemd/reader.pyx"
    __pyx_t_2 = 0;

#line 134 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)

#line 134 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 134 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 134 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);

#line 134 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 134 "cysystemd/reader.pyx"
    __PYX_ERR(0, 134, __pyx_L1_error)

    /* "cysystemd/reader.pyx":132
 *     code = -code
 * 
 *     if code in errorcode:             # <<<<<<<<<<<<<<
 *         error = errorcode[code]
 *         raise SystemError(os.strerror(code), error)
 */

#line 132 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":126
 * 
 * 
 * def check_error_code(int code):             # <<<<<<<<<<<<<<
 *     if code >= 0:
 *         return code
 */

#line 126 "cysystemd/reader.pyx"


#line 126 "cysystemd/reader.pyx"
  /* function exit code */

#line 126 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 126 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 126 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 126 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 126 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 126 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 126 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 126 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.check_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 126 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 126 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 126 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_error);

#line 126 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 126 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 126 "cysystemd/reader.pyx"
  return __pyx_r;

#line 126 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":153
 * 
 * 
 * cdef str _check_dir_path(object path):             # <<<<<<<<<<<<<<
 *     path = str(path)
 * 
 */

#line 153 "cysystemd/reader.pyx"


#line 153 "cysystemd/reader.pyx"
static PyObject *__pyx_f_9cysystemd_6reader__check_dir_path(PyObject *__pyx_v_path) {
  PyObject *__pyx_v_c = NULL
#line 153 "cysystemd/reader.pyx"
;

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 153 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 153 "cysystemd/reader.pyx"
  int __pyx_t_4;

#line 153 "cysystemd/reader.pyx"
  int __pyx_t_5;

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 153 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 153 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 153 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 153 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 153 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("_check_dir_path", 0);

#line 153 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_path);

  /* "cysystemd/reader.pyx":154
 * 
 * cdef str _check_dir_path(object path):
 *     path = str(path)             # <<<<<<<<<<<<<<
 * 
 *     if not os.path.exists(path):
 */

#line 154 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)

#line 154 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 154 "cysystemd/reader.pyx"
  __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 154 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":156
 *     path = str(path)
 * 
 *     if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *         raise OSError('Directory not found')
 *     elif os.path.islink(path):
 */

#line 156 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)

#line 156 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 156 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)

#line 156 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 156 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 156 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)

#line 156 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 156 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 156 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 156 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 156 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 156 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 156 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 156 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 156 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 156 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 156 "cysystemd/reader.pyx"
    }

#line 156 "cysystemd/reader.pyx"
  }

#line 156 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 156 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 156 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)

#line 156 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 156 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 156 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)

#line 156 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 156 "cysystemd/reader.pyx"
  __pyx_t_5 = ((!__pyx_t_4) != 0);

#line 156 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_5)) {

    /* "cysystemd/reader.pyx":157
 * 
 *     if not os.path.exists(path):
 *         raise OSError('Directory not found')             # <<<<<<<<<<<<<<
 *     elif os.path.islink(path):
 *         c = 0
 */

#line 157 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)

#line 157 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 157 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 157 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 157 "cysystemd/reader.pyx"
    __PYX_ERR(0, 157, __pyx_L1_error)

    /* "cysystemd/reader.pyx":156
 *     path = str(path)
 * 
 *     if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *         raise OSError('Directory not found')
 *     elif os.path.islink(path):
 */

#line 156 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":158
 *     if not os.path.exists(path):
 *         raise OSError('Directory not found')
 *     elif os.path.islink(path):             # <<<<<<<<<<<<<<
 *         c = 0
 *         while not os.path.islink(path):
 */

#line 158 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)

#line 158 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 158 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)

#line 158 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 158 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 158 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_islink); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)

#line 158 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 158 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 158 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 158 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 158 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 158 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 158 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 158 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 158 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 158 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 158 "cysystemd/reader.pyx"
    }

#line 158 "cysystemd/reader.pyx"
  }

#line 158 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 158 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 158 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)

#line 158 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 158 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 158 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 158, __pyx_L1_error)

#line 158 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 158 "cysystemd/reader.pyx"
  if (__pyx_t_5) {

    /* "cysystemd/reader.pyx":159
 *         raise OSError('Directory not found')
 *     elif os.path.islink(path):
 *         c = 0             # <<<<<<<<<<<<<<
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))
 */

#line 159 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_int_0);

#line 159 "cysystemd/reader.pyx"
    __pyx_v_c = __pyx_int_0;

    /* "cysystemd/reader.pyx":160
 *     elif os.path.islink(path):
 *         c = 0
 *         while not os.path.islink(path):             # <<<<<<<<<<<<<<
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 */

#line 160 "cysystemd/reader.pyx"
    while (1) {

#line 160 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)

#line 160 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 160 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)

#line 160 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 160 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 160 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_islink); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)

#line 160 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 160 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 160 "cysystemd/reader.pyx"
      __pyx_t_3 = NULL;

#line 160 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 160 "cysystemd/reader.pyx"
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 160 "cysystemd/reader.pyx"
        if (likely(__pyx_t_3)) {

#line 160 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 160 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_3);

#line 160 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 160 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_2, function);

#line 160 "cysystemd/reader.pyx"
        }

#line 160 "cysystemd/reader.pyx"
      }

#line 160 "cysystemd/reader.pyx"
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 160 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 160 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)

#line 160 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 160 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 160 "cysystemd/reader.pyx"
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)

#line 160 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 160 "cysystemd/reader.pyx"
      __pyx_t_4 = ((!__pyx_t_5) != 0);

#line 160 "cysystemd/reader.pyx"
      if (!__pyx_t_4) break;

      /* "cysystemd/reader.pyx":161
 *         c = 0
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))             # <<<<<<<<<<<<<<
 *             c += 1
 *             if c > 255:
 */

#line 161 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 161 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 161 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 161 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_6);

#line 161 "cysystemd/reader.pyx"
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_readlink); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_7);

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 161 "cysystemd/reader.pyx"
      __pyx_t_6 = NULL;

#line 161 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {

#line 161 "cysystemd/reader.pyx"
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);

#line 161 "cysystemd/reader.pyx"
        if (likely(__pyx_t_6)) {

#line 161 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);

#line 161 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_6);

#line 161 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 161 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_7, function);

#line 161 "cysystemd/reader.pyx"
        }

#line 161 "cysystemd/reader.pyx"
      }

#line 161 "cysystemd/reader.pyx"
      __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_path);

#line 161 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 161 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 161 "cysystemd/reader.pyx"
      __pyx_t_7 = NULL;

#line 161 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 161 "cysystemd/reader.pyx"
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);

#line 161 "cysystemd/reader.pyx"
        if (likely(__pyx_t_7)) {

#line 161 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 161 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_7);

#line 161 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 161 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_2, function);

#line 161 "cysystemd/reader.pyx"
        }

#line 161 "cysystemd/reader.pyx"
      }

#line 161 "cysystemd/reader.pyx"
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 161 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 161 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)

#line 161 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 161 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 161 "cysystemd/reader.pyx"
      __pyx_t_1 = 0;

      /* "cysystemd/reader.pyx":162
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1             # <<<<<<<<<<<<<<
 *             if c > 255:
 *                 raise OSError("Link recursive reslolution error")
 */

#line 162 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_c, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)

#line 162 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 162 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_1);

#line 162 "cysystemd/reader.pyx"
      __pyx_t_1 = 0;

      /* "cysystemd/reader.pyx":163
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 *             if c > 255:             # <<<<<<<<<<<<<<
 *                 raise OSError("Link recursive reslolution error")
 * 
 */

#line 163 "cysystemd/reader.pyx"
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, __pyx_int_255, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)

#line 163 "cysystemd/reader.pyx"
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)

#line 163 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 163 "cysystemd/reader.pyx"
      if (unlikely(__pyx_t_4)) {

        /* "cysystemd/reader.pyx":164
 *             c += 1
 *             if c > 255:
 *                 raise OSError("Link recursive reslolution error")             # <<<<<<<<<<<<<<
 * 
 *         return _check_dir_path(path)
 */

#line 164 "cysystemd/reader.pyx"
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)

#line 164 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_1);

#line 164 "cysystemd/reader.pyx"
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 164 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 164 "cysystemd/reader.pyx"
        __PYX_ERR(0, 164, __pyx_L1_error)

        /* "cysystemd/reader.pyx":163
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 *             if c > 255:             # <<<<<<<<<<<<<<
 *                 raise OSError("Link recursive reslolution error")
 * 
 */

#line 163 "cysystemd/reader.pyx"
      }

#line 163 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":166
 *                 raise OSError("Link recursive reslolution error")
 * 
 *         return _check_dir_path(path)             # <<<<<<<<<<<<<<
 *     elif not os.path.isdir(path):
 *         raise OSError("It's not a directory")
 */

#line 166 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_r);

#line 166 "cysystemd/reader.pyx"
    __pyx_t_1 = __pyx_f_9cysystemd_6reader__check_dir_path(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)

#line 166 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 166 "cysystemd/reader.pyx"
    __pyx_r = ((PyObject*)__pyx_t_1);

#line 166 "cysystemd/reader.pyx"
    __pyx_t_1 = 0;

#line 166 "cysystemd/reader.pyx"
    goto __pyx_L0;

    /* "cysystemd/reader.pyx":158
 *     if not os.path.exists(path):
 *         raise OSError('Directory not found')
 *     elif os.path.islink(path):             # <<<<<<<<<<<<<<
 *         c = 0
 *         while not os.path.islink(path):
 */

#line 158 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":167
 * 
 *         return _check_dir_path(path)
 *     elif not os.path.isdir(path):             # <<<<<<<<<<<<<<
 *         raise OSError("It's not a directory")
 *     else:
 */

#line 167 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)

#line 167 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 167 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)

#line 167 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 167 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 167 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isdir); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)

#line 167 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 167 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 167 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 167 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 167 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 167 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 167 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 167 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 167 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 167 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 167 "cysystemd/reader.pyx"
    }

#line 167 "cysystemd/reader.pyx"
  }

#line 167 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 167 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 167 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)

#line 167 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 167 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 167 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 167, __pyx_L1_error)

#line 167 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 167 "cysystemd/reader.pyx"
  __pyx_t_5 = ((!__pyx_t_4) != 0);

#line 167 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_5)) {

    /* "cysystemd/reader.pyx":168
 *         return _check_dir_path(path)
 *     elif not os.path.isdir(path):
 *         raise OSError("It's not a directory")             # <<<<<<<<<<<<<<
 *     else:
 *         path = os.path.abspath(path)
 */

#line 168 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)

#line 168 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 168 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 168 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 168 "cysystemd/reader.pyx"
    __PYX_ERR(0, 168, __pyx_L1_error)

    /* "cysystemd/reader.pyx":167
 * 
 *         return _check_dir_path(path)
 *     elif not os.path.isdir(path):             # <<<<<<<<<<<<<<
 *         raise OSError("It's not a directory")
 *     else:
 */

#line 167 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":170
 *         raise OSError("It's not a directory")
 *     else:
 *         path = os.path.abspath(path)             # <<<<<<<<<<<<<<
 * 
 *     return path
 */

#line 170 "cysystemd/reader.pyx"
  /*else*/ {

#line 170 "cysystemd/reader.pyx"
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)

#line 170 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 170 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)

#line 170 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 170 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 170 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)

#line 170 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 170 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 170 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 170 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 170 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 170 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 170 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 170 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 170 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 170 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 170 "cysystemd/reader.pyx"
      }

#line 170 "cysystemd/reader.pyx"
    }

#line 170 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 170 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 170 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)

#line 170 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 170 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 170 "cysystemd/reader.pyx"
    __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 170 "cysystemd/reader.pyx"
    __pyx_t_1 = 0;

#line 170 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":172
 *         path = os.path.abspath(path)
 * 
 *     return path             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 172 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 172 "cysystemd/reader.pyx"
  if (!(likely(PyString_CheckExact(__pyx_v_path))||((__pyx_v_path) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_path)->tp_name), 0))) __PYX_ERR(0, 172, __pyx_L1_error)

#line 172 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_path);

#line 172 "cysystemd/reader.pyx"
  __pyx_r = ((PyObject*)__pyx_v_path);

#line 172 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":153
 * 
 * 
 * cdef str _check_dir_path(object path):             # <<<<<<<<<<<<<<
 *     path = str(path)
 * 
 */

#line 153 "cysystemd/reader.pyx"


#line 153 "cysystemd/reader.pyx"
  /* function exit code */

#line 153 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_7);

#line 153 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader._check_dir_path", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 153 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 153 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_c);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_path);

#line 153 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 153 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 153 "cysystemd/reader.pyx"
  return __pyx_r;

#line 153 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":175
 * 
 * 
 * cdef str _check_file_path(object path):             # <<<<<<<<<<<<<<
 *     path = str(path)
 * 
 */

#line 175 "cysystemd/reader.pyx"


#line 175 "cysystemd/reader.pyx"
static PyObject *__pyx_f_9cysystemd_6reader__check_file_path(PyObject *__pyx_v_path) {
  PyObject *__pyx_v_c = NULL
#line 175 "cysystemd/reader.pyx"
;

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 175 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 175 "cysystemd/reader.pyx"
  int __pyx_t_4;

#line 175 "cysystemd/reader.pyx"
  int __pyx_t_5;

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 175 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 175 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 175 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 175 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 175 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("_check_file_path", 0);

#line 175 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_path);

  /* "cysystemd/reader.pyx":176
 * 
 * cdef str _check_file_path(object path):
 *     path = str(path)             # <<<<<<<<<<<<<<
 * 
 *     if not os.path.exists(path):
 */

#line 176 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)

#line 176 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 176 "cysystemd/reader.pyx"
  __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 176 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":178
 *     path = str(path)
 * 
 *     if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *         raise OSError('File not found')
 *     elif os.path.islink(path):
 */

#line 178 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)

#line 178 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 178 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)

#line 178 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 178 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 178 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)

#line 178 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 178 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 178 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 178 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 178 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 178 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 178 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 178 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 178 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 178 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 178 "cysystemd/reader.pyx"
    }

#line 178 "cysystemd/reader.pyx"
  }

#line 178 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 178 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 178 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)

#line 178 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 178 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 178 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 178, __pyx_L1_error)

#line 178 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 178 "cysystemd/reader.pyx"
  __pyx_t_5 = ((!__pyx_t_4) != 0);

#line 178 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_5)) {

    /* "cysystemd/reader.pyx":179
 * 
 *     if not os.path.exists(path):
 *         raise OSError('File not found')             # <<<<<<<<<<<<<<
 *     elif os.path.islink(path):
 *         c = 0
 */

#line 179 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)

#line 179 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 179 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 179 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 179 "cysystemd/reader.pyx"
    __PYX_ERR(0, 179, __pyx_L1_error)

    /* "cysystemd/reader.pyx":178
 *     path = str(path)
 * 
 *     if not os.path.exists(path):             # <<<<<<<<<<<<<<
 *         raise OSError('File not found')
 *     elif os.path.islink(path):
 */

#line 178 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":180
 *     if not os.path.exists(path):
 *         raise OSError('File not found')
 *     elif os.path.islink(path):             # <<<<<<<<<<<<<<
 *         c = 0
 *         while not os.path.islink(path):
 */

#line 180 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)

#line 180 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 180 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)

#line 180 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 180 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 180 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_islink); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)

#line 180 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 180 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 180 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 180 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 180 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 180 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 180 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 180 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 180 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 180 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 180 "cysystemd/reader.pyx"
    }

#line 180 "cysystemd/reader.pyx"
  }

#line 180 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 180 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 180 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)

#line 180 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 180 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 180 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 180, __pyx_L1_error)

#line 180 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 180 "cysystemd/reader.pyx"
  if (__pyx_t_5) {

    /* "cysystemd/reader.pyx":181
 *         raise OSError('File not found')
 *     elif os.path.islink(path):
 *         c = 0             # <<<<<<<<<<<<<<
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))
 */

#line 181 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_int_0);

#line 181 "cysystemd/reader.pyx"
    __pyx_v_c = __pyx_int_0;

    /* "cysystemd/reader.pyx":182
 *     elif os.path.islink(path):
 *         c = 0
 *         while not os.path.islink(path):             # <<<<<<<<<<<<<<
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 */

#line 182 "cysystemd/reader.pyx"
    while (1) {

#line 182 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)

#line 182 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 182 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)

#line 182 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 182 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 182 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_islink); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)

#line 182 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 182 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 182 "cysystemd/reader.pyx"
      __pyx_t_3 = NULL;

#line 182 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 182 "cysystemd/reader.pyx"
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 182 "cysystemd/reader.pyx"
        if (likely(__pyx_t_3)) {

#line 182 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 182 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_3);

#line 182 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 182 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_2, function);

#line 182 "cysystemd/reader.pyx"
        }

#line 182 "cysystemd/reader.pyx"
      }

#line 182 "cysystemd/reader.pyx"
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 182 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 182 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)

#line 182 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 182 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 182 "cysystemd/reader.pyx"
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 182, __pyx_L1_error)

#line 182 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 182 "cysystemd/reader.pyx"
      __pyx_t_4 = ((!__pyx_t_5) != 0);

#line 182 "cysystemd/reader.pyx"
      if (!__pyx_t_4) break;

      /* "cysystemd/reader.pyx":183
 *         c = 0
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))             # <<<<<<<<<<<<<<
 *             c += 1
 *             if c > 255:
 */

#line 183 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 183 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 183 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 183 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_6);

#line 183 "cysystemd/reader.pyx"
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_readlink); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_7);

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 183 "cysystemd/reader.pyx"
      __pyx_t_6 = NULL;

#line 183 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {

#line 183 "cysystemd/reader.pyx"
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);

#line 183 "cysystemd/reader.pyx"
        if (likely(__pyx_t_6)) {

#line 183 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);

#line 183 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_6);

#line 183 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 183 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_7, function);

#line 183 "cysystemd/reader.pyx"
        }

#line 183 "cysystemd/reader.pyx"
      }

#line 183 "cysystemd/reader.pyx"
      __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_path);

#line 183 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 183 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 183 "cysystemd/reader.pyx"
      __pyx_t_7 = NULL;

#line 183 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 183 "cysystemd/reader.pyx"
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);

#line 183 "cysystemd/reader.pyx"
        if (likely(__pyx_t_7)) {

#line 183 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 183 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_7);

#line 183 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 183 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_2, function);

#line 183 "cysystemd/reader.pyx"
        }

#line 183 "cysystemd/reader.pyx"
      }

#line 183 "cysystemd/reader.pyx"
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 183 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 183 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)

#line 183 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 183 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 183 "cysystemd/reader.pyx"
      __pyx_t_1 = 0;

      /* "cysystemd/reader.pyx":184
 *         while not os.path.islink(path):
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1             # <<<<<<<<<<<<<<
 *             if c > 255:
 *                 raise OSError("Link recursive reslolution error")
 */

#line 184 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_c, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)

#line 184 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 184 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_1);

#line 184 "cysystemd/reader.pyx"
      __pyx_t_1 = 0;

      /* "cysystemd/reader.pyx":185
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 *             if c > 255:             # <<<<<<<<<<<<<<
 *                 raise OSError("Link recursive reslolution error")
 * 
 */

#line 185 "cysystemd/reader.pyx"
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_c, __pyx_int_255, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)

#line 185 "cysystemd/reader.pyx"
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 185, __pyx_L1_error)

#line 185 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 185 "cysystemd/reader.pyx"
      if (unlikely(__pyx_t_4)) {

        /* "cysystemd/reader.pyx":186
 *             c += 1
 *             if c > 255:
 *                 raise OSError("Link recursive reslolution error")             # <<<<<<<<<<<<<<
 * 
 *         return _check_file_path(path)
 */

#line 186 "cysystemd/reader.pyx"
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)

#line 186 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_1);

#line 186 "cysystemd/reader.pyx"
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 186 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 186 "cysystemd/reader.pyx"
        __PYX_ERR(0, 186, __pyx_L1_error)

        /* "cysystemd/reader.pyx":185
 *             path = os.path.abspath(os.readlink(path))
 *             c += 1
 *             if c > 255:             # <<<<<<<<<<<<<<
 *                 raise OSError("Link recursive reslolution error")
 * 
 */

#line 185 "cysystemd/reader.pyx"
      }

#line 185 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":188
 *                 raise OSError("Link recursive reslolution error")
 * 
 *         return _check_file_path(path)             # <<<<<<<<<<<<<<
 *     elif not os.path.isfile(path):
 *         raise OSError("It's not a regular file")
 */

#line 188 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_r);

#line 188 "cysystemd/reader.pyx"
    __pyx_t_1 = __pyx_f_9cysystemd_6reader__check_file_path(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)

#line 188 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 188 "cysystemd/reader.pyx"
    __pyx_r = ((PyObject*)__pyx_t_1);

#line 188 "cysystemd/reader.pyx"
    __pyx_t_1 = 0;

#line 188 "cysystemd/reader.pyx"
    goto __pyx_L0;

    /* "cysystemd/reader.pyx":180
 *     if not os.path.exists(path):
 *         raise OSError('File not found')
 *     elif os.path.islink(path):             # <<<<<<<<<<<<<<
 *         c = 0
 *         while not os.path.islink(path):
 */

#line 180 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":189
 * 
 *         return _check_file_path(path)
 *     elif not os.path.isfile(path):             # <<<<<<<<<<<<<<
 *         raise OSError("It's not a regular file")
 *     else:
 */

#line 189 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)

#line 189 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 189 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)

#line 189 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 189 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 189 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)

#line 189 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 189 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 189 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 189 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 189 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 189 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 189 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 189 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 189 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 189 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 189 "cysystemd/reader.pyx"
    }

#line 189 "cysystemd/reader.pyx"
  }

#line 189 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 189 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 189 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)

#line 189 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 189 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 189 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)

#line 189 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 189 "cysystemd/reader.pyx"
  __pyx_t_5 = ((!__pyx_t_4) != 0);

#line 189 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_5)) {

    /* "cysystemd/reader.pyx":190
 *         return _check_file_path(path)
 *     elif not os.path.isfile(path):
 *         raise OSError("It's not a regular file")             # <<<<<<<<<<<<<<
 *     else:
 *         path = os.path.abspath(path)
 */

#line 190 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)

#line 190 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 190 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 190 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 190 "cysystemd/reader.pyx"
    __PYX_ERR(0, 190, __pyx_L1_error)

    /* "cysystemd/reader.pyx":189
 * 
 *         return _check_file_path(path)
 *     elif not os.path.isfile(path):             # <<<<<<<<<<<<<<
 *         raise OSError("It's not a regular file")
 *     else:
 */

#line 189 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":192
 *         raise OSError("It's not a regular file")
 *     else:
 *         path = os.path.abspath(path)             # <<<<<<<<<<<<<<
 * 
 *     return path
 */

#line 192 "cysystemd/reader.pyx"
  /*else*/ {

#line 192 "cysystemd/reader.pyx"
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)

#line 192 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 192 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)

#line 192 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 192 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 192 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)

#line 192 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 192 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 192 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 192 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 192 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 192 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 192 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 192 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 192 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 192 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 192 "cysystemd/reader.pyx"
      }

#line 192 "cysystemd/reader.pyx"
    }

#line 192 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);

#line 192 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 192 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)

#line 192 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 192 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 192 "cysystemd/reader.pyx"
    __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 192 "cysystemd/reader.pyx"
    __pyx_t_1 = 0;

#line 192 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":194
 *         path = os.path.abspath(path)
 * 
 *     return path             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 194 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 194 "cysystemd/reader.pyx"
  if (!(likely(PyString_CheckExact(__pyx_v_path))||((__pyx_v_path) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_path)->tp_name), 0))) __PYX_ERR(0, 194, __pyx_L1_error)

#line 194 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_path);

#line 194 "cysystemd/reader.pyx"
  __pyx_r = ((PyObject*)__pyx_v_path);

#line 194 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":175
 * 
 * 
 * cdef str _check_file_path(object path):             # <<<<<<<<<<<<<<
 *     path = str(path)
 * 
 */

#line 175 "cysystemd/reader.pyx"


#line 175 "cysystemd/reader.pyx"
  /* function exit code */

#line 175 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_7);

#line 175 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader._check_file_path", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 175 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 175 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_c);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_path);

#line 175 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 175 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 175 "cysystemd/reader.pyx"
  return __pyx_r;

#line 175 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":209
 *     max_message_size = 2**20
 * 
 *     def __cinit__(self, JournalReader reader):             # <<<<<<<<<<<<<<
 *         cdef const void *data
 *         cdef size_t length = 0
 */

#line 209 "cysystemd/reader.pyx"


#line 209 "cysystemd/reader.pyx"
/* Python wrapper */

#line 209 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_12JournalEntry_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 209 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_12JournalEntry_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_reader = 0
#line 209 "cysystemd/reader.pyx"
;

#line 209 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 209 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 209 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 209 "cysystemd/reader.pyx"
  int __pyx_r;

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);

#line 209 "cysystemd/reader.pyx"
  {

#line 209 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reader,0};

#line 209 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 209 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 209 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 209 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 209 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 209 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 209 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 209 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 209 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 209 "cysystemd/reader.pyx"
      }

#line 209 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 209 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 209 "cysystemd/reader.pyx"
        case  0:

#line 209 "cysystemd/reader.pyx"
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reader)) != 0)) kw_args--;
        else 
#line 209 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 209 "cysystemd/reader.pyx"
      }

#line 209 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 209 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 209, __pyx_L3_error)

#line 209 "cysystemd/reader.pyx"
      }

#line 209 "cysystemd/reader.pyx"
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {

#line 209 "cysystemd/reader.pyx"
      goto __pyx_L5_argtuple_error;

#line 209 "cysystemd/reader.pyx"
    } else {

#line 209 "cysystemd/reader.pyx"
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 209 "cysystemd/reader.pyx"
    }

#line 209 "cysystemd/reader.pyx"
    __pyx_v_reader = ((struct __pyx_obj_9cysystemd_6reader_JournalReader *)values[0]);

#line 209 "cysystemd/reader.pyx"
  }

#line 209 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 209 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 209 "cysystemd/reader.pyx"
__PYX_ERR(0, 209, __pyx_L3_error)

#line 209 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 209 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 209 "cysystemd/reader.pyx"
  return -1;

#line 209 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;

#line 209 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reader), __pyx_ptype_9cysystemd_6reader_JournalReader, 1, "reader", 0))) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_r = 
#line 209 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry___cinit__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self), __pyx_v_reader);

#line 209 "cysystemd/reader.pyx"


#line 209 "cysystemd/reader.pyx"
  /* function exit code */

#line 209 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 209 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 209 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 209 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 209 "cysystemd/reader.pyx"
  return __pyx_r;

#line 209 "cysystemd/reader.pyx"
}

#line 209 "cysystemd/reader.pyx"


#line 209 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_12JournalEntry___cinit__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_reader) {
  void const *__pyx_v_data
#line 209 "cysystemd/reader.pyx"
;
  size_t __pyx_v_length
#line 209 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 209 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_value = NULL
#line 209 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_key = NULL
#line 209 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_date = NULL
#line 209 "cysystemd/reader.pyx"
;

#line 209 "cysystemd/reader.pyx"
  int __pyx_r;

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 209 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 209 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 209 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 209 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 209 "cysystemd/reader.pyx"
  int __pyx_t_5;

#line 209 "cysystemd/reader.pyx"
  int __pyx_t_6;

#line 209 "cysystemd/reader.pyx"
  int __pyx_t_7;

#line 209 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 209 "cysystemd/reader.pyx"
  PyObject *(*__pyx_t_9)(PyObject *);

#line 209 "cysystemd/reader.pyx"
  int __pyx_t_10;

#line 209 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 209 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 209 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cysystemd/reader.pyx":211
 *     def __cinit__(self, JournalReader reader):
 *         cdef const void *data
 *         cdef size_t length = 0             # <<<<<<<<<<<<<<
 * 
 *         self.__data = {}
 */

#line 211 "cysystemd/reader.pyx"
  __pyx_v_length = 0;

  /* "cysystemd/reader.pyx":213
 *         cdef size_t length = 0
 * 
 *         self.__data = {}             # <<<<<<<<<<<<<<
 *         check_error_code(sd_journal_get_realtime_usec(reader.context, &self.realtime_usec))
 *         check_error_code(sd_journal_get_monotonic_usec(reader.context, &self.monotonic_usec, &self.__boot_id))
 */

#line 213 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)

#line 213 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 213 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 213 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->__pyx___data);

#line 213 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->__pyx___data);

#line 213 "cysystemd/reader.pyx"
  __pyx_v_self->__pyx___data = ((PyObject*)__pyx_t_1);

#line 213 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":214
 * 
 *         self.__data = {}
 *         check_error_code(sd_journal_get_realtime_usec(reader.context, &self.realtime_usec))             # <<<<<<<<<<<<<<
 *         check_error_code(sd_journal_get_monotonic_usec(reader.context, &self.monotonic_usec, &self.__boot_id))
 *         check_error_code(sd_journal_get_cursor(reader.context, &self.cursor))
 */

#line 214 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)

#line 214 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 214 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(sd_journal_get_realtime_usec(__pyx_v_reader->context, (&__pyx_v_self->realtime_usec))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)

#line 214 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 214 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 214 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 214 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 214 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 214 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 214 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 214 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 214 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 214 "cysystemd/reader.pyx"
    }

#line 214 "cysystemd/reader.pyx"
  }

#line 214 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 214 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 214 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 214 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)

#line 214 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 214 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 214 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":215
 *         self.__data = {}
 *         check_error_code(sd_journal_get_realtime_usec(reader.context, &self.realtime_usec))
 *         check_error_code(sd_journal_get_monotonic_usec(reader.context, &self.monotonic_usec, &self.__boot_id))             # <<<<<<<<<<<<<<
 *         check_error_code(sd_journal_get_cursor(reader.context, &self.cursor))
 * 
 */

#line 215 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)

#line 215 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 215 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(sd_journal_get_monotonic_usec(__pyx_v_reader->context, (&__pyx_v_self->monotonic_usec), (&__pyx_v_self->__pyx___boot_id))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)

#line 215 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 215 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 215 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 215 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 215 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 215 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 215 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 215 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 215 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 215 "cysystemd/reader.pyx"
    }

#line 215 "cysystemd/reader.pyx"
  }

#line 215 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 215 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 215 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 215 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)

#line 215 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 215 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 215 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":216
 *         check_error_code(sd_journal_get_realtime_usec(reader.context, &self.realtime_usec))
 *         check_error_code(sd_journal_get_monotonic_usec(reader.context, &self.monotonic_usec, &self.__boot_id))
 *         check_error_code(sd_journal_get_cursor(reader.context, &self.cursor))             # <<<<<<<<<<<<<<
 * 
 *         sd_journal_restart_data(reader.context)
 */

#line 216 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)

#line 216 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 216 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(sd_journal_get_cursor(__pyx_v_reader->context, (&__pyx_v_self->cursor))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error)

#line 216 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 216 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 216 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 216 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 216 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 216 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 216 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 216 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 216 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 216 "cysystemd/reader.pyx"
    }

#line 216 "cysystemd/reader.pyx"
  }

#line 216 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 216 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 216 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 216 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)

#line 216 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 216 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 216 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":218
 *         check_error_code(sd_journal_get_cursor(reader.context, &self.cursor))
 * 
 *         sd_journal_restart_data(reader.context)             # <<<<<<<<<<<<<<
 * 
 *         while True:
 */

#line 218 "cysystemd/reader.pyx"
  sd_journal_restart_data(__pyx_v_reader->context);

  /* "cysystemd/reader.pyx":220
 *         sd_journal_restart_data(reader.context)
 * 
 *         while True:             # <<<<<<<<<<<<<<
 * 
 *             length = 0
 */

#line 220 "cysystemd/reader.pyx"
  while (1) {

    /* "cysystemd/reader.pyx":222
 *         while True:
 * 
 *             length = 0             # <<<<<<<<<<<<<<
 * 
 *             result = sd_journal_enumerate_data(reader.context, <const void **>&data, &length)
 */

#line 222 "cysystemd/reader.pyx"
    __pyx_v_length = 0;

    /* "cysystemd/reader.pyx":224
 *             length = 0
 * 
 *             result = sd_journal_enumerate_data(reader.context, <const void **>&data, &length)             # <<<<<<<<<<<<<<
 * 
 *             if result == 0 or length == 0:
 */

#line 224 "cysystemd/reader.pyx"
    __pyx_v_result = sd_journal_enumerate_data(__pyx_v_reader->context, ((void const **)(&__pyx_v_data)), (&__pyx_v_length));

    /* "cysystemd/reader.pyx":226
 *             result = sd_journal_enumerate_data(reader.context, <const void **>&data, &length)
 * 
 *             if result == 0 or length == 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */

#line 226 "cysystemd/reader.pyx"
    __pyx_t_6 = ((__pyx_v_result == 0) != 0);

#line 226 "cysystemd/reader.pyx"
    if (!__pyx_t_6) {

#line 226 "cysystemd/reader.pyx"
    } else {

#line 226 "cysystemd/reader.pyx"
      __pyx_t_5 = __pyx_t_6;

#line 226 "cysystemd/reader.pyx"
      goto __pyx_L6_bool_binop_done;

#line 226 "cysystemd/reader.pyx"
    }

#line 226 "cysystemd/reader.pyx"
    __pyx_t_6 = ((__pyx_v_length == 0) != 0);

#line 226 "cysystemd/reader.pyx"
    __pyx_t_5 = __pyx_t_6;

#line 226 "cysystemd/reader.pyx"
    __pyx_L6_bool_binop_done:;

#line 226 "cysystemd/reader.pyx"
    if (__pyx_t_5) {

      /* "cysystemd/reader.pyx":227
 * 
 *             if result == 0 or length == 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             if length > self.max_message_size:
 */

#line 227 "cysystemd/reader.pyx"
      goto __pyx_L4_break;

      /* "cysystemd/reader.pyx":226
 *             result = sd_journal_enumerate_data(reader.context, <const void **>&data, &length)
 * 
 *             if result == 0 or length == 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */

#line 226 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":229
 *                 break
 * 
 *             if length > self.max_message_size:             # <<<<<<<<<<<<<<
 *                 log.warning("got message with enormous length %d", length)
 *                 break
 */

#line 229 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)

#line 229 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 229 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_max_message_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)

#line 229 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 229 "cysystemd/reader.pyx"
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)

#line 229 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 229 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 229 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)

#line 229 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 229 "cysystemd/reader.pyx"
    if (__pyx_t_5) {

      /* "cysystemd/reader.pyx":230
 * 
 *             if length > self.max_message_size:
 *                 log.warning("got message with enormous length %d", length)             # <<<<<<<<<<<<<<
 *                 break
 * 
 */

#line 230 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 230 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 230 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 230 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 230 "cysystemd/reader.pyx"
      __pyx_t_4 = NULL;

#line 230 "cysystemd/reader.pyx"
      __pyx_t_7 = 0;

#line 230 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {

#line 230 "cysystemd/reader.pyx"
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);

#line 230 "cysystemd/reader.pyx"
        if (likely(__pyx_t_4)) {

#line 230 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);

#line 230 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_4);

#line 230 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 230 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_1, function);

#line 230 "cysystemd/reader.pyx"
          __pyx_t_7 = 1;

#line 230 "cysystemd/reader.pyx"
        }

#line 230 "cysystemd/reader.pyx"
      }

#line 230 "cysystemd/reader.pyx"
      #if CYTHON_FAST_PYCALL

#line 230 "cysystemd/reader.pyx"
      if (PyFunction_Check(__pyx_t_1)) {

#line 230 "cysystemd/reader.pyx"
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_got_message_with_enormous_length, __pyx_t_2};

#line 230 "cysystemd/reader.pyx"
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 230 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_3);

#line 230 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 230 "cysystemd/reader.pyx"
      } else

#line 230 "cysystemd/reader.pyx"
      #endif

#line 230 "cysystemd/reader.pyx"
      #if CYTHON_FAST_PYCCALL

#line 230 "cysystemd/reader.pyx"
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {

#line 230 "cysystemd/reader.pyx"
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_got_message_with_enormous_length, __pyx_t_2};

#line 230 "cysystemd/reader.pyx"
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 230 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_3);

#line 230 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 230 "cysystemd/reader.pyx"
      } else

#line 230 "cysystemd/reader.pyx"
      #endif

#line 230 "cysystemd/reader.pyx"
      {

#line 230 "cysystemd/reader.pyx"
        __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_8);

#line 230 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 230 "cysystemd/reader.pyx"
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;

#line 230 "cysystemd/reader.pyx"
        }

#line 230 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_kp_s_got_message_with_enormous_length);

#line 230 "cysystemd/reader.pyx"
        __Pyx_GIVEREF(__pyx_kp_s_got_message_with_enormous_length);

#line 230 "cysystemd/reader.pyx"
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_kp_s_got_message_with_enormous_length);

#line 230 "cysystemd/reader.pyx"
        __Pyx_GIVEREF(__pyx_t_2);

#line 230 "cysystemd/reader.pyx"
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);

#line 230 "cysystemd/reader.pyx"
        __pyx_t_2 = 0;

#line 230 "cysystemd/reader.pyx"
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)

#line 230 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_3);

#line 230 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 230 "cysystemd/reader.pyx"
      }

#line 230 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 230 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cysystemd/reader.pyx":231
 *             if length > self.max_message_size:
 *                 log.warning("got message with enormous length %d", length)
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             value = bytes((<char*> data)[:length]).decode(errors='replace')
 */

#line 231 "cysystemd/reader.pyx"
      goto __pyx_L4_break;

      /* "cysystemd/reader.pyx":229
 *                 break
 * 
 *             if length > self.max_message_size:             # <<<<<<<<<<<<<<
 *                 log.warning("got message with enormous length %d", length)
 *                 break
 */

#line 229 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":233
 *                 break
 * 
 *             value = bytes((<char*> data)[:length]).decode(errors='replace')             # <<<<<<<<<<<<<<
 *             if '=' not in value:
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 */

#line 233 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char *)__pyx_v_data) + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 233 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 233 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 233 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 233 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 233 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 233 "cysystemd/reader.pyx"
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_errors, __pyx_n_s_replace) < 0) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 233, __pyx_L1_error)

#line 233 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_8);

#line 233 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 233 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 233 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);

#line 233 "cysystemd/reader.pyx"
    __pyx_t_8 = 0;

    /* "cysystemd/reader.pyx":234
 * 
 *             value = bytes((<char*> data)[:length]).decode(errors='replace')
 *             if '=' not in value:             # <<<<<<<<<<<<<<
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 *                 break
 */

#line 234 "cysystemd/reader.pyx"
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)

#line 234 "cysystemd/reader.pyx"
    __pyx_t_6 = (__pyx_t_5 != 0);

#line 234 "cysystemd/reader.pyx"
    if (__pyx_t_6) {

      /* "cysystemd/reader.pyx":235
 *             value = bytes((<char*> data)[:length]).decode(errors='replace')
 *             if '=' not in value:
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)             # <<<<<<<<<<<<<<
 *                 break
 *             key, value = value.split("=", 1)
 */

#line 235 "cysystemd/reader.pyx"
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 235 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 235 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 235 "cysystemd/reader.pyx"
      __pyx_t_1 = NULL;

#line 235 "cysystemd/reader.pyx"
      __pyx_t_7 = 0;

#line 235 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 235 "cysystemd/reader.pyx"
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);

#line 235 "cysystemd/reader.pyx"
        if (likely(__pyx_t_1)) {

#line 235 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 235 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_1);

#line 235 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 235 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_3, function);

#line 235 "cysystemd/reader.pyx"
          __pyx_t_7 = 1;

#line 235 "cysystemd/reader.pyx"
        }

#line 235 "cysystemd/reader.pyx"
      }

#line 235 "cysystemd/reader.pyx"
      #if CYTHON_FAST_PYCALL

#line 235 "cysystemd/reader.pyx"
      if (PyFunction_Check(__pyx_t_3)) {

#line 235 "cysystemd/reader.pyx"
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_got_unexpected_r_from_sd_journal, __pyx_v_value};

#line 235 "cysystemd/reader.pyx"
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 235 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_8);

#line 235 "cysystemd/reader.pyx"
      } else

#line 235 "cysystemd/reader.pyx"
      #endif

#line 235 "cysystemd/reader.pyx"
      #if CYTHON_FAST_PYCCALL

#line 235 "cysystemd/reader.pyx"
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {

#line 235 "cysystemd/reader.pyx"
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_s_got_unexpected_r_from_sd_journal, __pyx_v_value};

#line 235 "cysystemd/reader.pyx"
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 235 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_8);

#line 235 "cysystemd/reader.pyx"
      } else

#line 235 "cysystemd/reader.pyx"
      #endif

#line 235 "cysystemd/reader.pyx"
      {

#line 235 "cysystemd/reader.pyx"
        __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 235 "cysystemd/reader.pyx"
        if (__pyx_t_1) {

#line 235 "cysystemd/reader.pyx"
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;

#line 235 "cysystemd/reader.pyx"
        }

#line 235 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_kp_s_got_unexpected_r_from_sd_journal);

#line 235 "cysystemd/reader.pyx"
        __Pyx_GIVEREF(__pyx_kp_s_got_unexpected_r_from_sd_journal);

#line 235 "cysystemd/reader.pyx"
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_kp_s_got_unexpected_r_from_sd_journal);

#line 235 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_v_value);

#line 235 "cysystemd/reader.pyx"
        __Pyx_GIVEREF(__pyx_v_value);

#line 235 "cysystemd/reader.pyx"
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_v_value);

#line 235 "cysystemd/reader.pyx"
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)

#line 235 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_8);

#line 235 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 235 "cysystemd/reader.pyx"
      }

#line 235 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 235 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cysystemd/reader.pyx":236
 *             if '=' not in value:
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 *                 break             # <<<<<<<<<<<<<<
 *             key, value = value.split("=", 1)
 * 
 */

#line 236 "cysystemd/reader.pyx"
      goto __pyx_L4_break;

      /* "cysystemd/reader.pyx":234
 * 
 *             value = bytes((<char*> data)[:length]).decode(errors='replace')
 *             if '=' not in value:             # <<<<<<<<<<<<<<
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 *                 break
 */

#line 234 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":237
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 *                 break
 *             key, value = value.split("=", 1)             # <<<<<<<<<<<<<<
 * 
 *             if key in self.__data:
 */

#line 237 "cysystemd/reader.pyx"
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_8);

#line 237 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 237 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 237 "cysystemd/reader.pyx"
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {

#line 237 "cysystemd/reader.pyx"
      PyObject* sequence = __pyx_t_3;

#line 237 "cysystemd/reader.pyx"
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);

#line 237 "cysystemd/reader.pyx"
      if (unlikely(size != 2)) {

#line 237 "cysystemd/reader.pyx"
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);

#line 237 "cysystemd/reader.pyx"
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);

#line 237 "cysystemd/reader.pyx"
        __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      }

#line 237 "cysystemd/reader.pyx"
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 237 "cysystemd/reader.pyx"
      if (likely(PyTuple_CheckExact(sequence))) {

#line 237 "cysystemd/reader.pyx"
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 

#line 237 "cysystemd/reader.pyx"
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 

#line 237 "cysystemd/reader.pyx"
      } else {

#line 237 "cysystemd/reader.pyx"
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 

#line 237 "cysystemd/reader.pyx"
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 

#line 237 "cysystemd/reader.pyx"
      }

#line 237 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_8);

#line 237 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_2);

#line 237 "cysystemd/reader.pyx"
      #else

#line 237 "cysystemd/reader.pyx"
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_8);

#line 237 "cysystemd/reader.pyx"
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 237 "cysystemd/reader.pyx"
      #endif

#line 237 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 237 "cysystemd/reader.pyx"
    } else {

#line 237 "cysystemd/reader.pyx"
      Py_ssize_t index = -1;

#line 237 "cysystemd/reader.pyx"
      __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 237 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 237 "cysystemd/reader.pyx"
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_8)) 
#line 237 "cysystemd/reader.pyx"
goto __pyx_L10_unpacking_failed;

#line 237 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_1); if (unlikely(!__pyx_t_2)) 
#line 237 "cysystemd/reader.pyx"
goto __pyx_L10_unpacking_failed;

#line 237 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 237 "cysystemd/reader.pyx"
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_1), 2) < 0) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      __pyx_t_9 = NULL;

#line 237 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 237 "cysystemd/reader.pyx"
      goto __pyx_L11_unpacking_done;

#line 237 "cysystemd/reader.pyx"
      __pyx_L10_unpacking_failed:;

#line 237 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 237 "cysystemd/reader.pyx"
      __pyx_t_9 = NULL;

#line 237 "cysystemd/reader.pyx"
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);

#line 237 "cysystemd/reader.pyx"
      __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
      __pyx_L11_unpacking_done:;

#line 237 "cysystemd/reader.pyx"
    }

#line 237 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);

#line 237 "cysystemd/reader.pyx"
    __pyx_t_8 = 0;

#line 237 "cysystemd/reader.pyx"
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);

#line 237 "cysystemd/reader.pyx"
    __pyx_t_2 = 0;

    /* "cysystemd/reader.pyx":239
 *             key, value = value.split("=", 1)
 * 
 *             if key in self.__data:             # <<<<<<<<<<<<<<
 *                 if not isinstance(self.__data[key], list):
 *                     self.__data[key] = [self.__data[key]]
 */

#line 239 "cysystemd/reader.pyx"
    if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 239 "cysystemd/reader.pyx"
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");

#line 239 "cysystemd/reader.pyx"
      __PYX_ERR(0, 239, __pyx_L1_error)

#line 239 "cysystemd/reader.pyx"
    }

#line 239 "cysystemd/reader.pyx"
    __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_key, __pyx_v_self->__pyx___data, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)

#line 239 "cysystemd/reader.pyx"
    __pyx_t_5 = (__pyx_t_6 != 0);

#line 239 "cysystemd/reader.pyx"
    if (__pyx_t_5) {

      /* "cysystemd/reader.pyx":240
 * 
 *             if key in self.__data:
 *                 if not isinstance(self.__data[key], list):             # <<<<<<<<<<<<<<
 *                     self.__data[key] = [self.__data[key]]
 *                 self.__data[key].append(value)
 */

#line 240 "cysystemd/reader.pyx"
      if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 240 "cysystemd/reader.pyx"
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 240 "cysystemd/reader.pyx"
        __PYX_ERR(0, 240, __pyx_L1_error)

#line 240 "cysystemd/reader.pyx"
      }

#line 240 "cysystemd/reader.pyx"
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___data, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)

#line 240 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_3);

#line 240 "cysystemd/reader.pyx"
      __pyx_t_5 = PyList_Check(__pyx_t_3); 

#line 240 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 240 "cysystemd/reader.pyx"
      __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);

#line 240 "cysystemd/reader.pyx"
      if (__pyx_t_6) {

        /* "cysystemd/reader.pyx":241
 *             if key in self.__data:
 *                 if not isinstance(self.__data[key], list):
 *                     self.__data[key] = [self.__data[key]]             # <<<<<<<<<<<<<<
 *                 self.__data[key].append(value)
 *             else:
 */

#line 241 "cysystemd/reader.pyx"
        if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 241 "cysystemd/reader.pyx"
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 241 "cysystemd/reader.pyx"
          __PYX_ERR(0, 241, __pyx_L1_error)

#line 241 "cysystemd/reader.pyx"
        }

#line 241 "cysystemd/reader.pyx"
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___data, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)

#line 241 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_3);

#line 241 "cysystemd/reader.pyx"
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)

#line 241 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 241 "cysystemd/reader.pyx"
        __Pyx_GIVEREF(__pyx_t_3);

#line 241 "cysystemd/reader.pyx"
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);

#line 241 "cysystemd/reader.pyx"
        __pyx_t_3 = 0;

#line 241 "cysystemd/reader.pyx"
        if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 241 "cysystemd/reader.pyx"
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 241 "cysystemd/reader.pyx"
          __PYX_ERR(0, 241, __pyx_L1_error)

#line 241 "cysystemd/reader.pyx"
        }

#line 241 "cysystemd/reader.pyx"
        if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___data, __pyx_v_key, __pyx_t_2) < 0)) __PYX_ERR(0, 241, __pyx_L1_error)

#line 241 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cysystemd/reader.pyx":240
 * 
 *             if key in self.__data:
 *                 if not isinstance(self.__data[key], list):             # <<<<<<<<<<<<<<
 *                     self.__data[key] = [self.__data[key]]
 *                 self.__data[key].append(value)
 */

#line 240 "cysystemd/reader.pyx"
      }

      /* "cysystemd/reader.pyx":242
 *                 if not isinstance(self.__data[key], list):
 *                     self.__data[key] = [self.__data[key]]
 *                 self.__data[key].append(value)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.__data[key] = value
 */

#line 242 "cysystemd/reader.pyx"
      if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 242 "cysystemd/reader.pyx"
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 242 "cysystemd/reader.pyx"
        __PYX_ERR(0, 242, __pyx_L1_error)

#line 242 "cysystemd/reader.pyx"
      }

#line 242 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx___data, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)

#line 242 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 242 "cysystemd/reader.pyx"
      __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_value); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 242, __pyx_L1_error)

#line 242 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cysystemd/reader.pyx":239
 *             key, value = value.split("=", 1)
 * 
 *             if key in self.__data:             # <<<<<<<<<<<<<<
 *                 if not isinstance(self.__data[key], list):
 *                     self.__data[key] = [self.__data[key]]
 */

#line 239 "cysystemd/reader.pyx"
      goto __pyx_L12;

#line 239 "cysystemd/reader.pyx"
    }

    /* "cysystemd/reader.pyx":244
 *                 self.__data[key].append(value)
 *             else:
 *                 self.__data[key] = value             # <<<<<<<<<<<<<<
 * 
 *         self._data = self.__data
 */

#line 244 "cysystemd/reader.pyx"
    /*else*/ {

#line 244 "cysystemd/reader.pyx"
      if (unlikely(__pyx_v_self->__pyx___data == Py_None)) {

#line 244 "cysystemd/reader.pyx"
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 244 "cysystemd/reader.pyx"
        __PYX_ERR(0, 244, __pyx_L1_error)

#line 244 "cysystemd/reader.pyx"
      }

#line 244 "cysystemd/reader.pyx"
      if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx___data, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 244, __pyx_L1_error)

#line 244 "cysystemd/reader.pyx"
    }

#line 244 "cysystemd/reader.pyx"
    __pyx_L12:;

#line 244 "cysystemd/reader.pyx"
  }

#line 244 "cysystemd/reader.pyx"
  __pyx_L4_break:;

  /* "cysystemd/reader.pyx":246
 *                 self.__data[key] = value
 * 
 *         self._data = self.__data             # <<<<<<<<<<<<<<
 *         self.__boot_uuid = UUID(bytes=self.__boot_id.bytes[:16])
 *         date = datetime.utcfromtimestamp(self.get_realtime_sec())
 */

#line 246 "cysystemd/reader.pyx"
  __pyx_t_2 = __pyx_v_self->__pyx___data;

#line 246 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_t_2);

#line 246 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_2);

#line 246 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->_data);

#line 246 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->_data);

#line 246 "cysystemd/reader.pyx"
  __pyx_v_self->_data = __pyx_t_2;

#line 246 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":247
 * 
 *         self._data = self.__data
 *         self.__boot_uuid = UUID(bytes=self.__boot_id.bytes[:16])             # <<<<<<<<<<<<<<
 *         date = datetime.utcfromtimestamp(self.get_realtime_sec())
 *         date.replace(tzinfo=timezone.utc)
 */

#line 247 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UUID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)

#line 247 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 247 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)

#line 247 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 247 "cysystemd/reader.pyx"
  __pyx_t_8 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_self->__pyx___boot_id.bytes) + 0, 16 - 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)

#line 247 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_8);

#line 247 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_bytes, __pyx_t_8) < 0) __PYX_ERR(0, 247, __pyx_L1_error)

#line 247 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 247 "cysystemd/reader.pyx"
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)

#line 247 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_8);

#line 247 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 247 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 247 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_8);

#line 247 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->__pyx___boot_uuid);

#line 247 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->__pyx___boot_uuid);

#line 247 "cysystemd/reader.pyx"
  __pyx_v_self->__pyx___boot_uuid = __pyx_t_8;

#line 247 "cysystemd/reader.pyx"
  __pyx_t_8 = 0;

  /* "cysystemd/reader.pyx":248
 *         self._data = self.__data
 *         self.__boot_uuid = UUID(bytes=self.__boot_id.bytes[:16])
 *         date = datetime.utcfromtimestamp(self.get_realtime_sec())             # <<<<<<<<<<<<<<
 *         date.replace(tzinfo=timezone.utc)
 *         self.__date = date
 */

#line 248 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)

#line 248 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 248 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)

#line 248 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 248 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 248 "cysystemd/reader.pyx"
  __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_vtabstruct_9cysystemd_6reader_JournalEntry *)__pyx_v_self->__pyx_vtab)->get_realtime_sec(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)

#line 248 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 248 "cysystemd/reader.pyx"
  __pyx_t_1 = NULL;

#line 248 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 248 "cysystemd/reader.pyx"
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);

#line 248 "cysystemd/reader.pyx"
    if (likely(__pyx_t_1)) {

#line 248 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 248 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_1);

#line 248 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 248 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 248 "cysystemd/reader.pyx"
    }

#line 248 "cysystemd/reader.pyx"
  }

#line 248 "cysystemd/reader.pyx"
  __pyx_t_8 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 248 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 248 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 248 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 248, __pyx_L1_error)

#line 248 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_8);

#line 248 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 248 "cysystemd/reader.pyx"
  __pyx_v_date = __pyx_t_8;

#line 248 "cysystemd/reader.pyx"
  __pyx_t_8 = 0;

  /* "cysystemd/reader.pyx":249
 *         self.__boot_uuid = UUID(bytes=self.__boot_id.bytes[:16])
 *         date = datetime.utcfromtimestamp(self.get_realtime_sec())
 *         date.replace(tzinfo=timezone.utc)             # <<<<<<<<<<<<<<
 *         self.__date = date
 * 
 */

#line 249 "cysystemd/reader.pyx"
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_8);

#line 249 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 249 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_timezone); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 249 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_utc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 249 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 249 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_1) < 0) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 249 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)

#line 249 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 249 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 249 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 249 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":250
 *         date = datetime.utcfromtimestamp(self.get_realtime_sec())
 *         date.replace(tzinfo=timezone.utc)
 *         self.__date = date             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 250 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_date);

#line 250 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_v_date);

#line 250 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->__pyx___date);

#line 250 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->__pyx___date);

#line 250 "cysystemd/reader.pyx"
  __pyx_v_self->__pyx___date = __pyx_v_date;

  /* "cysystemd/reader.pyx":209
 *     max_message_size = 2**20
 * 
 *     def __cinit__(self, JournalReader reader):             # <<<<<<<<<<<<<<
 *         cdef const void *data
 *         cdef size_t length = 0
 */

#line 209 "cysystemd/reader.pyx"


#line 209 "cysystemd/reader.pyx"
  /* function exit code */

#line 209 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 209 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 209 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_8);

#line 209 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 209 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 209 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_value);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_key);

#line 209 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_date);

#line 209 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 209 "cysystemd/reader.pyx"
  return __pyx_r;

#line 209 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":253
 * 
 *     @property
 *     def cursor(self):             # <<<<<<<<<<<<<<
 *         return self.cursor
 * 
 */

#line 253 "cysystemd/reader.pyx"


#line 253 "cysystemd/reader.pyx"
/* Python wrapper */

#line 253 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_6cursor_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 253 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_6cursor_1__get__(PyObject *__pyx_v_self) {

#line 253 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 253 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_6cursor___get__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 253 "cysystemd/reader.pyx"


#line 253 "cysystemd/reader.pyx"
  /* function exit code */

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 253 "cysystemd/reader.pyx"
  return __pyx_r;

#line 253 "cysystemd/reader.pyx"
}

#line 253 "cysystemd/reader.pyx"


#line 253 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_6cursor___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 253 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 253 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 253 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 253 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 253 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":254
 *     @property
 *     def cursor(self):
 *         return self.cursor             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_realtime_sec(self):
 */

#line 254 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 254 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->cursor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)

#line 254 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 254 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 254 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 254 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":253
 * 
 *     @property
 *     def cursor(self):             # <<<<<<<<<<<<<<
 *         return self.cursor
 * 
 */

#line 253 "cysystemd/reader.pyx"


#line 253 "cysystemd/reader.pyx"
  /* function exit code */

#line 253 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 253 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 253 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.cursor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 253 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 253 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 253 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 253 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 253 "cysystemd/reader.pyx"
  return __pyx_r;

#line 253 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":256
 *         return self.cursor
 * 
 *     cpdef double get_realtime_sec(self):             # <<<<<<<<<<<<<<
 *         cdef double result = self.realtime_usec / 1000000.
 *         return result
 */

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_3get_realtime_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 256 "cysystemd/reader.pyx"
static double __pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_v_result
#line 256 "cysystemd/reader.pyx"
;

#line 256 "cysystemd/reader.pyx"
  double __pyx_r;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 256 "cysystemd/reader.pyx"
  double __pyx_t_5;

#line 256 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 256 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 256 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_sec", 0);

#line 256 "cysystemd/reader.pyx"
  /* Check if called by wrapper */

#line 256 "cysystemd/reader.pyx"
  if (unlikely(__pyx_skip_dispatch)) ;

#line 256 "cysystemd/reader.pyx"
  /* Check if overridden in Python */

#line 256 "cysystemd/reader.pyx"
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {

#line 256 "cysystemd/reader.pyx"
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 256 "cysystemd/reader.pyx"
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 256 "cysystemd/reader.pyx"
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {

#line 256 "cysystemd/reader.pyx"
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 256 "cysystemd/reader.pyx"
      #endif

#line 256 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_realtime_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)

#line 256 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 256 "cysystemd/reader.pyx"
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9cysystemd_6reader_12JournalEntry_3get_realtime_sec)) {

#line 256 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; 
#line 256 "cysystemd/reader.pyx"
__pyx_t_4 = NULL;

#line 256 "cysystemd/reader.pyx"
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 256 "cysystemd/reader.pyx"
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 256 "cysystemd/reader.pyx"
          if (likely(__pyx_t_4)) {

#line 256 "cysystemd/reader.pyx"
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 256 "cysystemd/reader.pyx"
            __Pyx_INCREF(__pyx_t_4);

#line 256 "cysystemd/reader.pyx"
            __Pyx_INCREF(function);

#line 256 "cysystemd/reader.pyx"
            __Pyx_DECREF_SET(__pyx_t_3, function);

#line 256 "cysystemd/reader.pyx"
          }

#line 256 "cysystemd/reader.pyx"
        }

#line 256 "cysystemd/reader.pyx"
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 256 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 256 "cysystemd/reader.pyx"
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)

#line 256 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 256 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 256 "cysystemd/reader.pyx"
        __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)

#line 256 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 256 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_5;

#line 256 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 256 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 256 "cysystemd/reader.pyx"
      }

#line 256 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 256 "cysystemd/reader.pyx"
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 256 "cysystemd/reader.pyx"
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));

#line 256 "cysystemd/reader.pyx"
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {

#line 256 "cysystemd/reader.pyx"
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 256 "cysystemd/reader.pyx"
      }

#line 256 "cysystemd/reader.pyx"
      #endif

#line 256 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 256 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 256 "cysystemd/reader.pyx"
    }

#line 256 "cysystemd/reader.pyx"
    #endif

#line 256 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":257
 * 
 *     cpdef double get_realtime_sec(self):
 *         cdef double result = self.realtime_usec / 1000000.             # <<<<<<<<<<<<<<
 *         return result
 * 
 */

#line 257 "cysystemd/reader.pyx"
  __pyx_v_result = (__pyx_v_self->realtime_usec / 1000000.);

  /* "cysystemd/reader.pyx":258
 *     cpdef double get_realtime_sec(self):
 *         cdef double result = self.realtime_usec / 1000000.
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_monotonic_sec(self):
 */

#line 258 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_result;

#line 258 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":256
 *         return self.cursor
 * 
 *     cpdef double get_realtime_sec(self):             # <<<<<<<<<<<<<<
 *         cdef double result = self.realtime_usec / 1000000.
 *         return result
 */

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
  /* function exit code */

#line 256 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 256 "cysystemd/reader.pyx"
  __Pyx_WriteUnraisable("cysystemd.reader.JournalEntry.get_realtime_sec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);

#line 256 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 256 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 256 "cysystemd/reader.pyx"
  return __pyx_r;

#line 256 "cysystemd/reader.pyx"
}

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
/* Python wrapper */

#line 256 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_3get_realtime_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 256 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_3get_realtime_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_sec (wrapper)", 0);
  __pyx_r = 
#line 256 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_2get_realtime_sec(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
  /* function exit code */

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 256 "cysystemd/reader.pyx"
  return __pyx_r;

#line 256 "cysystemd/reader.pyx"
}

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_2get_realtime_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 256 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 256 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 256 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 256 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_sec", 0);

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 256 "cysystemd/reader.pyx"
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_sec(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)

#line 256 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 256 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 256 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 256 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 256 "cysystemd/reader.pyx"


#line 256 "cysystemd/reader.pyx"
  /* function exit code */

#line 256 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 256 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 256 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.get_realtime_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 256 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 256 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 256 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 256 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 256 "cysystemd/reader.pyx"
  return __pyx_r;

#line 256 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":260
 *         return result
 * 
 *     cpdef double get_monotonic_sec(self):             # <<<<<<<<<<<<<<
 *         cdef double result = self.monotonic_usec / 1000000.
 *         return self.monotonic_usec / 1000000.
 */

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_5get_monotonic_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 260 "cysystemd/reader.pyx"
static double __pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch) {
  CYTHON_UNUSED double __pyx_v_result
#line 260 "cysystemd/reader.pyx"
;

#line 260 "cysystemd/reader.pyx"
  double __pyx_r;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 260 "cysystemd/reader.pyx"
  double __pyx_t_5;

#line 260 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 260 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 260 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_sec", 0);

#line 260 "cysystemd/reader.pyx"
  /* Check if called by wrapper */

#line 260 "cysystemd/reader.pyx"
  if (unlikely(__pyx_skip_dispatch)) ;

#line 260 "cysystemd/reader.pyx"
  /* Check if overridden in Python */

#line 260 "cysystemd/reader.pyx"
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {

#line 260 "cysystemd/reader.pyx"
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 260 "cysystemd/reader.pyx"
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 260 "cysystemd/reader.pyx"
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {

#line 260 "cysystemd/reader.pyx"
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 260 "cysystemd/reader.pyx"
      #endif

#line 260 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_monotonic_sec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)

#line 260 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 260 "cysystemd/reader.pyx"
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9cysystemd_6reader_12JournalEntry_5get_monotonic_sec)) {

#line 260 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; 
#line 260 "cysystemd/reader.pyx"
__pyx_t_4 = NULL;

#line 260 "cysystemd/reader.pyx"
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 260 "cysystemd/reader.pyx"
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 260 "cysystemd/reader.pyx"
          if (likely(__pyx_t_4)) {

#line 260 "cysystemd/reader.pyx"
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 260 "cysystemd/reader.pyx"
            __Pyx_INCREF(__pyx_t_4);

#line 260 "cysystemd/reader.pyx"
            __Pyx_INCREF(function);

#line 260 "cysystemd/reader.pyx"
            __Pyx_DECREF_SET(__pyx_t_3, function);

#line 260 "cysystemd/reader.pyx"
          }

#line 260 "cysystemd/reader.pyx"
        }

#line 260 "cysystemd/reader.pyx"
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 260 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 260 "cysystemd/reader.pyx"
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)

#line 260 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 260 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 260 "cysystemd/reader.pyx"
        __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error)

#line 260 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 260 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_5;

#line 260 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 260 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 260 "cysystemd/reader.pyx"
      }

#line 260 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 260 "cysystemd/reader.pyx"
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 260 "cysystemd/reader.pyx"
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));

#line 260 "cysystemd/reader.pyx"
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {

#line 260 "cysystemd/reader.pyx"
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 260 "cysystemd/reader.pyx"
      }

#line 260 "cysystemd/reader.pyx"
      #endif

#line 260 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 260 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 260 "cysystemd/reader.pyx"
    }

#line 260 "cysystemd/reader.pyx"
    #endif

#line 260 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":261
 * 
 *     cpdef double get_monotonic_sec(self):
 *         cdef double result = self.monotonic_usec / 1000000.             # <<<<<<<<<<<<<<
 *         return self.monotonic_usec / 1000000.
 * 
 */

#line 261 "cysystemd/reader.pyx"
  __pyx_v_result = (__pyx_v_self->monotonic_usec / 1000000.);

  /* "cysystemd/reader.pyx":262
 *     cpdef double get_monotonic_sec(self):
 *         cdef double result = self.monotonic_usec / 1000000.
 *         return self.monotonic_usec / 1000000.             # <<<<<<<<<<<<<<
 * 
 *     cpdef uint64_t get_realtime_usec(self):
 */

#line 262 "cysystemd/reader.pyx"
  __pyx_r = (__pyx_v_self->monotonic_usec / 1000000.);

#line 262 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":260
 *         return result
 * 
 *     cpdef double get_monotonic_sec(self):             # <<<<<<<<<<<<<<
 *         cdef double result = self.monotonic_usec / 1000000.
 *         return self.monotonic_usec / 1000000.
 */

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
  /* function exit code */

#line 260 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 260 "cysystemd/reader.pyx"
  __Pyx_WriteUnraisable("cysystemd.reader.JournalEntry.get_monotonic_sec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);

#line 260 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 260 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 260 "cysystemd/reader.pyx"
  return __pyx_r;

#line 260 "cysystemd/reader.pyx"
}

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
/* Python wrapper */

#line 260 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_5get_monotonic_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 260 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_5get_monotonic_sec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_sec (wrapper)", 0);
  __pyx_r = 
#line 260 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_4get_monotonic_sec(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
  /* function exit code */

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 260 "cysystemd/reader.pyx"
  return __pyx_r;

#line 260 "cysystemd/reader.pyx"
}

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4get_monotonic_sec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 260 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 260 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 260 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 260 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_sec", 0);

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 260 "cysystemd/reader.pyx"
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_sec(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)

#line 260 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 260 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 260 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 260 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 260 "cysystemd/reader.pyx"


#line 260 "cysystemd/reader.pyx"
  /* function exit code */

#line 260 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 260 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 260 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.get_monotonic_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 260 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 260 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 260 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 260 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 260 "cysystemd/reader.pyx"
  return __pyx_r;

#line 260 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":264
 *         return self.monotonic_usec / 1000000.
 * 
 *     cpdef uint64_t get_realtime_usec(self):             # <<<<<<<<<<<<<<
 *         return self.realtime_usec
 * 
 */

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_7get_realtime_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 264 "cysystemd/reader.pyx"
static uint64_t __pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch) {

#line 264 "cysystemd/reader.pyx"
  uint64_t __pyx_r;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 264 "cysystemd/reader.pyx"
  uint64_t __pyx_t_5;

#line 264 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 264 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 264 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_usec", 0);

#line 264 "cysystemd/reader.pyx"
  /* Check if called by wrapper */

#line 264 "cysystemd/reader.pyx"
  if (unlikely(__pyx_skip_dispatch)) ;

#line 264 "cysystemd/reader.pyx"
  /* Check if overridden in Python */

#line 264 "cysystemd/reader.pyx"
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {

#line 264 "cysystemd/reader.pyx"
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 264 "cysystemd/reader.pyx"
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 264 "cysystemd/reader.pyx"
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {

#line 264 "cysystemd/reader.pyx"
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 264 "cysystemd/reader.pyx"
      #endif

#line 264 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_realtime_usec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)

#line 264 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 264 "cysystemd/reader.pyx"
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9cysystemd_6reader_12JournalEntry_7get_realtime_usec)) {

#line 264 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; 
#line 264 "cysystemd/reader.pyx"
__pyx_t_4 = NULL;

#line 264 "cysystemd/reader.pyx"
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 264 "cysystemd/reader.pyx"
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 264 "cysystemd/reader.pyx"
          if (likely(__pyx_t_4)) {

#line 264 "cysystemd/reader.pyx"
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 264 "cysystemd/reader.pyx"
            __Pyx_INCREF(__pyx_t_4);

#line 264 "cysystemd/reader.pyx"
            __Pyx_INCREF(function);

#line 264 "cysystemd/reader.pyx"
            __Pyx_DECREF_SET(__pyx_t_3, function);

#line 264 "cysystemd/reader.pyx"
          }

#line 264 "cysystemd/reader.pyx"
        }

#line 264 "cysystemd/reader.pyx"
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 264 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 264 "cysystemd/reader.pyx"
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error)

#line 264 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 264 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 264 "cysystemd/reader.pyx"
        __pyx_t_5 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L1_error)

#line 264 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 264 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_5;

#line 264 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 264 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 264 "cysystemd/reader.pyx"
      }

#line 264 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 264 "cysystemd/reader.pyx"
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 264 "cysystemd/reader.pyx"
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));

#line 264 "cysystemd/reader.pyx"
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {

#line 264 "cysystemd/reader.pyx"
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 264 "cysystemd/reader.pyx"
      }

#line 264 "cysystemd/reader.pyx"
      #endif

#line 264 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 264 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 264 "cysystemd/reader.pyx"
    }

#line 264 "cysystemd/reader.pyx"
    #endif

#line 264 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":265
 * 
 *     cpdef uint64_t get_realtime_usec(self):
 *         return self.realtime_usec             # <<<<<<<<<<<<<<
 * 
 *     cpdef uint64_t get_monotonic_usec(self):
 */

#line 265 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->realtime_usec;

#line 265 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":264
 *         return self.monotonic_usec / 1000000.
 * 
 *     cpdef uint64_t get_realtime_usec(self):             # <<<<<<<<<<<<<<
 *         return self.realtime_usec
 * 
 */

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
  /* function exit code */

#line 264 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 264 "cysystemd/reader.pyx"
  __Pyx_WriteUnraisable("cysystemd.reader.JournalEntry.get_realtime_usec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);

#line 264 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 264 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 264 "cysystemd/reader.pyx"
  return __pyx_r;

#line 264 "cysystemd/reader.pyx"
}

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
/* Python wrapper */

#line 264 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_7get_realtime_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 264 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_7get_realtime_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_usec (wrapper)", 0);
  __pyx_r = 
#line 264 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_6get_realtime_usec(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
  /* function exit code */

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 264 "cysystemd/reader.pyx"
  return __pyx_r;

#line 264 "cysystemd/reader.pyx"
}

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_6get_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 264 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 264 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 264 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 264 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_realtime_usec", 0);

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 264 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_usec(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)

#line 264 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 264 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 264 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 264 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 264 "cysystemd/reader.pyx"


#line 264 "cysystemd/reader.pyx"
  /* function exit code */

#line 264 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 264 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 264 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.get_realtime_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 264 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 264 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 264 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 264 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 264 "cysystemd/reader.pyx"
  return __pyx_r;

#line 264 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":267
 *         return self.realtime_usec
 * 
 *     cpdef uint64_t get_monotonic_usec(self):             # <<<<<<<<<<<<<<
 *         return self.monotonic_usec
 * 
 */

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_9get_monotonic_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 267 "cysystemd/reader.pyx"
static uint64_t __pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, int __pyx_skip_dispatch) {

#line 267 "cysystemd/reader.pyx"
  uint64_t __pyx_r;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 267 "cysystemd/reader.pyx"
  uint64_t __pyx_t_5;

#line 267 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 267 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 267 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_usec", 0);

#line 267 "cysystemd/reader.pyx"
  /* Check if called by wrapper */

#line 267 "cysystemd/reader.pyx"
  if (unlikely(__pyx_skip_dispatch)) ;

#line 267 "cysystemd/reader.pyx"
  /* Check if overridden in Python */

#line 267 "cysystemd/reader.pyx"
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {

#line 267 "cysystemd/reader.pyx"
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 267 "cysystemd/reader.pyx"
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 267 "cysystemd/reader.pyx"
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {

#line 267 "cysystemd/reader.pyx"
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 267 "cysystemd/reader.pyx"
      #endif

#line 267 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_monotonic_usec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)

#line 267 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 267 "cysystemd/reader.pyx"
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9cysystemd_6reader_12JournalEntry_9get_monotonic_usec)) {

#line 267 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; 
#line 267 "cysystemd/reader.pyx"
__pyx_t_4 = NULL;

#line 267 "cysystemd/reader.pyx"
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 267 "cysystemd/reader.pyx"
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 267 "cysystemd/reader.pyx"
          if (likely(__pyx_t_4)) {

#line 267 "cysystemd/reader.pyx"
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 267 "cysystemd/reader.pyx"
            __Pyx_INCREF(__pyx_t_4);

#line 267 "cysystemd/reader.pyx"
            __Pyx_INCREF(function);

#line 267 "cysystemd/reader.pyx"
            __Pyx_DECREF_SET(__pyx_t_3, function);

#line 267 "cysystemd/reader.pyx"
          }

#line 267 "cysystemd/reader.pyx"
        }

#line 267 "cysystemd/reader.pyx"
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 267 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 267 "cysystemd/reader.pyx"
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)

#line 267 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 267 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 267 "cysystemd/reader.pyx"
        __pyx_t_5 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error)

#line 267 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 267 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_5;

#line 267 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 267 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 267 "cysystemd/reader.pyx"
      }

#line 267 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 267 "cysystemd/reader.pyx"
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 267 "cysystemd/reader.pyx"
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));

#line 267 "cysystemd/reader.pyx"
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {

#line 267 "cysystemd/reader.pyx"
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 267 "cysystemd/reader.pyx"
      }

#line 267 "cysystemd/reader.pyx"
      #endif

#line 267 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 267 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 267 "cysystemd/reader.pyx"
    }

#line 267 "cysystemd/reader.pyx"
    #endif

#line 267 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":268
 * 
 *     cpdef uint64_t get_monotonic_usec(self):
 *         return self.monotonic_usec             # <<<<<<<<<<<<<<
 * 
 *     def boot_id(self):
 */

#line 268 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->monotonic_usec;

#line 268 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":267
 *         return self.realtime_usec
 * 
 *     cpdef uint64_t get_monotonic_usec(self):             # <<<<<<<<<<<<<<
 *         return self.monotonic_usec
 * 
 */

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
  /* function exit code */

#line 267 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 267 "cysystemd/reader.pyx"
  __Pyx_WriteUnraisable("cysystemd.reader.JournalEntry.get_monotonic_usec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);

#line 267 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 267 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 267 "cysystemd/reader.pyx"
  return __pyx_r;

#line 267 "cysystemd/reader.pyx"
}

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
/* Python wrapper */

#line 267 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_9get_monotonic_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 267 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_9get_monotonic_usec(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_usec (wrapper)", 0);
  __pyx_r = 
#line 267 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_8get_monotonic_usec(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
  /* function exit code */

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 267 "cysystemd/reader.pyx"
  return __pyx_r;

#line 267 "cysystemd/reader.pyx"
}

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_8get_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 267 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 267 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 267 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 267 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_monotonic_usec", 0);

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 267 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_usec(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)

#line 267 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 267 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 267 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 267 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 267 "cysystemd/reader.pyx"


#line 267 "cysystemd/reader.pyx"
  /* function exit code */

#line 267 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 267 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 267 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.get_monotonic_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 267 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 267 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 267 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 267 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 267 "cysystemd/reader.pyx"
  return __pyx_r;

#line 267 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":270
 *         return self.monotonic_usec
 * 
 *     def boot_id(self):             # <<<<<<<<<<<<<<
 *         return self.boot_id
 * 
 */

#line 270 "cysystemd/reader.pyx"


#line 270 "cysystemd/reader.pyx"
/* Python wrapper */

#line 270 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_11boot_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 270 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_11boot_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 270 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("boot_id (wrapper)", 0);
  __pyx_r = 
#line 270 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_10boot_id(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 270 "cysystemd/reader.pyx"


#line 270 "cysystemd/reader.pyx"
  /* function exit code */

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 270 "cysystemd/reader.pyx"
  return __pyx_r;

#line 270 "cysystemd/reader.pyx"
}

#line 270 "cysystemd/reader.pyx"


#line 270 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_10boot_id(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 270 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 270 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 270 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 270 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 270 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("boot_id", 0);

  /* "cysystemd/reader.pyx":271
 * 
 *     def boot_id(self):
 *         return self.boot_id             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 271 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 271 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_boot_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)

#line 271 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 271 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 271 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 271 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":270
 *         return self.monotonic_usec
 * 
 *     def boot_id(self):             # <<<<<<<<<<<<<<
 *         return self.boot_id
 * 
 */

#line 270 "cysystemd/reader.pyx"


#line 270 "cysystemd/reader.pyx"
  /* function exit code */

#line 270 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 270 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 270 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.boot_id", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 270 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 270 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 270 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 270 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 270 "cysystemd/reader.pyx"
  return __pyx_r;

#line 270 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":274
 * 
 *     @property
 *     def date(self):             # <<<<<<<<<<<<<<
 *         return self.__date
 * 
 */

#line 274 "cysystemd/reader.pyx"


#line 274 "cysystemd/reader.pyx"
/* Python wrapper */

#line 274 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_4date_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 274 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_4date_1__get__(PyObject *__pyx_v_self) {

#line 274 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 274 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_4date___get__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 274 "cysystemd/reader.pyx"


#line 274 "cysystemd/reader.pyx"
  /* function exit code */

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 274 "cysystemd/reader.pyx"
  return __pyx_r;

#line 274 "cysystemd/reader.pyx"
}

#line 274 "cysystemd/reader.pyx"


#line 274 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4date___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 274 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":275
 *     @property
 *     def date(self):
 *         return self.__date             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 275 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 275 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->__pyx___date);

#line 275 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->__pyx___date;

#line 275 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":274
 * 
 *     @property
 *     def date(self):             # <<<<<<<<<<<<<<
 *         return self.__date
 * 
 */

#line 274 "cysystemd/reader.pyx"


#line 274 "cysystemd/reader.pyx"
  /* function exit code */

#line 274 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 274 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 274 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 274 "cysystemd/reader.pyx"
  return __pyx_r;

#line 274 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":278
 * 
 *     @property
 *     def data(self):             # <<<<<<<<<<<<<<
 *         return self._data
 * 
 */

#line 278 "cysystemd/reader.pyx"


#line 278 "cysystemd/reader.pyx"
/* Python wrapper */

#line 278 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_4data_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 278 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_4data_1__get__(PyObject *__pyx_v_self) {

#line 278 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 278 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_4data___get__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 278 "cysystemd/reader.pyx"


#line 278 "cysystemd/reader.pyx"
  /* function exit code */

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 278 "cysystemd/reader.pyx"
  return __pyx_r;

#line 278 "cysystemd/reader.pyx"
}

#line 278 "cysystemd/reader.pyx"


#line 278 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_4data___get__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 278 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":279
 *     @property
 *     def data(self):
 *         return self._data             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */

#line 279 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 279 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->_data);

#line 279 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_self->_data;

#line 279 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":278
 * 
 *     @property
 *     def data(self):             # <<<<<<<<<<<<<<
 *         return self._data
 * 
 */

#line 278 "cysystemd/reader.pyx"


#line 278 "cysystemd/reader.pyx"
  /* function exit code */

#line 278 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 278 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 278 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 278 "cysystemd/reader.pyx"
  return __pyx_r;

#line 278 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":281
 *         return self._data
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.cursor)
 * 
 */

#line 281 "cysystemd/reader.pyx"


#line 281 "cysystemd/reader.pyx"
/* Python wrapper */

#line 281 "cysystemd/reader.pyx"
static void __pyx_pw_9cysystemd_6reader_12JournalEntry_13__dealloc__(PyObject *__pyx_v_self); /*proto*/

#line 281 "cysystemd/reader.pyx"
static void __pyx_pw_9cysystemd_6reader_12JournalEntry_13__dealloc__(PyObject *__pyx_v_self) {

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);

#line 281 "cysystemd/reader.pyx"
  __pyx_pf_9cysystemd_6reader_12JournalEntry_12__dealloc__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 281 "cysystemd/reader.pyx"


#line 281 "cysystemd/reader.pyx"
  /* function exit code */

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 281 "cysystemd/reader.pyx"
}

#line 281 "cysystemd/reader.pyx"


#line 281 "cysystemd/reader.pyx"
static void __pyx_pf_9cysystemd_6reader_12JournalEntry_12__dealloc__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cysystemd/reader.pyx":282
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self.cursor)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */

#line 282 "cysystemd/reader.pyx"
  PyMem_Free(__pyx_v_self->cursor);

  /* "cysystemd/reader.pyx":281
 *         return self._data
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.cursor)
 * 
 */

#line 281 "cysystemd/reader.pyx"


#line 281 "cysystemd/reader.pyx"
  /* function exit code */

#line 281 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 281 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":284
 *         PyMem_Free(self.cursor)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<JournalEntry: %r>" % self.date
 * 
 */

#line 284 "cysystemd/reader.pyx"


#line 284 "cysystemd/reader.pyx"
/* Python wrapper */

#line 284 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_15__repr__(PyObject *__pyx_v_self); /*proto*/

#line 284 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_15__repr__(PyObject *__pyx_v_self) {

#line 284 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = 
#line 284 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_14__repr__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 284 "cysystemd/reader.pyx"


#line 284 "cysystemd/reader.pyx"
  /* function exit code */

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 284 "cysystemd/reader.pyx"
  return __pyx_r;

#line 284 "cysystemd/reader.pyx"
}

#line 284 "cysystemd/reader.pyx"


#line 284 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_14__repr__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 284 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 284 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 284 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 284 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 284 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 284 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cysystemd/reader.pyx":285
 * 
 *     def __repr__(self):
 *         return "<JournalEntry: %r>" % self.date             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, str key):
 */

#line 285 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 285 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)

#line 285 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 285 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_JournalEntry_r, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)

#line 285 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 285 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 285 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_2;

#line 285 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

#line 285 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":284
 *         PyMem_Free(self.cursor)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<JournalEntry: %r>" % self.date
 * 
 */

#line 284 "cysystemd/reader.pyx"


#line 284 "cysystemd/reader.pyx"
  /* function exit code */

#line 284 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 284 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 284 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 284 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 284 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 284 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 284 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 284 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 284 "cysystemd/reader.pyx"
  return __pyx_r;

#line 284 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":287
 *         return "<JournalEntry: %r>" % self.date
 * 
 *     def __getitem__(self, str key):             # <<<<<<<<<<<<<<
 *         return self._data[key]
 * 
 */

#line 287 "cysystemd/reader.pyx"


#line 287 "cysystemd/reader.pyx"
/* Python wrapper */

#line 287 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/

#line 287 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_17__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {

#line 287 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 287 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 287 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 287 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);

#line 287 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyString_Type), 1, "key", 1))) __PYX_ERR(0, 287, __pyx_L1_error)
  __pyx_r = 
#line 287 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_12JournalEntry_16__getitem__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self), ((PyObject*)__pyx_v_key));

#line 287 "cysystemd/reader.pyx"


#line 287 "cysystemd/reader.pyx"
  /* function exit code */

#line 287 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 287 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 287 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 287 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 287 "cysystemd/reader.pyx"
  return __pyx_r;

#line 287 "cysystemd/reader.pyx"
}

#line 287 "cysystemd/reader.pyx"


#line 287 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_16__getitem__(struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, PyObject *__pyx_v_key) {

#line 287 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 287 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 287 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 287 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 287 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cysystemd/reader.pyx":288
 * 
 *     def __getitem__(self, str key):
 *         return self._data[key]             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 288 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 288 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->_data, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)

#line 288 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 288 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 288 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 288 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":287
 *         return "<JournalEntry: %r>" % self.date
 * 
 *     def __getitem__(self, str key):             # <<<<<<<<<<<<<<
 *         return self._data[key]
 * 
 */

#line 287 "cysystemd/reader.pyx"


#line 287 "cysystemd/reader.pyx"
  /* function exit code */

#line 287 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 287 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 287 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 287 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 287 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 287 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 287 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 287 "cysystemd/reader.pyx"
  return __pyx_r;

#line 287 "cysystemd/reader.pyx"
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
/* Python wrapper */

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 1 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = 
#line 1 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_12JournalEntry_18__reduce_cython__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self));

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self) {

#line 1 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 1 "(tree fragment)"
  int __pyx_lineno = 0;

#line 1 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 1 "(tree fragment)"
  int __pyx_clineno = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

#line 2 "(tree fragment)"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)

#line 2 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 2 "(tree fragment)"
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 2 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 2 "(tree fragment)"
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __pyx_L1_error:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 1 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 1 "(tree fragment)"
  __pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
/* Python wrapper */

#line 3 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/

#line 3 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_12JournalEntry_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {

#line 3 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 3 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 3 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = 
#line 3 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_12JournalEntry_20__setstate_cython__(((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
  /* function exit code */

#line 3 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 3 "(tree fragment)"
  return __pyx_r;

#line 3 "(tree fragment)"
}

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_12JournalEntry_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalEntry *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {

#line 3 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 3 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 3 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 3 "(tree fragment)"
  int __pyx_lineno = 0;

#line 3 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 3 "(tree fragment)"
  int __pyx_clineno = 0;

#line 3 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */

#line 4 "(tree fragment)"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)

#line 4 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 4 "(tree fragment)"
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 4 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 4 "(tree fragment)"
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
  /* function exit code */

#line 3 "(tree fragment)"
  __pyx_L1_error:;

#line 3 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 3 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.JournalEntry.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 3 "(tree fragment)"
  __pyx_r = NULL;

#line 3 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 3 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 3 "(tree fragment)"
  return __pyx_r;

#line 3 "(tree fragment)"
}

/* "cysystemd/reader.pyx":296
 *     cdef object flags
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.state = READER_NULL
 *         self.flags = None
 */

#line 296 "cysystemd/reader.pyx"


#line 296 "cysystemd/reader.pyx"
/* Python wrapper */

#line 296 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_13JournalReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 296 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_13JournalReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {

#line 296 "cysystemd/reader.pyx"
  int __pyx_r;

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);

#line 296 "cysystemd/reader.pyx"
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;
#line 296 "cysystemd/reader.pyx"
}

#line 296 "cysystemd/reader.pyx"
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = 
#line 296 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader___init__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 296 "cysystemd/reader.pyx"


#line 296 "cysystemd/reader.pyx"
  /* function exit code */

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 296 "cysystemd/reader.pyx"
  return __pyx_r;

#line 296 "cysystemd/reader.pyx"
}

#line 296 "cysystemd/reader.pyx"


#line 296 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_13JournalReader___init__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 296 "cysystemd/reader.pyx"
  int __pyx_r;

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cysystemd/reader.pyx":297
 * 
 *     def __init__(self):
 *         self.state = READER_NULL             # <<<<<<<<<<<<<<
 *         self.flags = None
 * 
 */

#line 297 "cysystemd/reader.pyx"
  __pyx_v_self->state = __pyx_e_9cysystemd_6reader_READER_NULL;

  /* "cysystemd/reader.pyx":298
 *     def __init__(self):
 *         self.state = READER_NULL
 *         self.flags = None             # <<<<<<<<<<<<<<
 * 
 *     def open(self, flags=JournalOpenMode.CURRENT_USER):
 */

#line 298 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_None);

#line 298 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(Py_None);

#line 298 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->flags);

#line 298 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->flags);

#line 298 "cysystemd/reader.pyx"
  __pyx_v_self->flags = Py_None;

  /* "cysystemd/reader.pyx":296
 *     cdef object flags
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.state = READER_NULL
 *         self.flags = None
 */

#line 296 "cysystemd/reader.pyx"


#line 296 "cysystemd/reader.pyx"
  /* function exit code */

#line 296 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 296 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 296 "cysystemd/reader.pyx"
  return __pyx_r;

#line 296 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":300
 *         self.flags = None
 * 
 *     def open(self, flags=JournalOpenMode.CURRENT_USER):             # <<<<<<<<<<<<<<
 *         self.flags = JournalOpenMode(int(flags))
 * 
 */

#line 300 "cysystemd/reader.pyx"


#line 300 "cysystemd/reader.pyx"
/* Python wrapper */

#line 300 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_3open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 300 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_3open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flags = 0
#line 300 "cysystemd/reader.pyx"
;

#line 300 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 300 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 300 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open (wrapper)", 0);

#line 300 "cysystemd/reader.pyx"
  {

#line 300 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags,0};

#line 300 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 300 "cysystemd/reader.pyx"
    values[0] = __pyx_k__13;

#line 300 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 300 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 300 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 300 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 300 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 300 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 300 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 300 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 300 "cysystemd/reader.pyx"
      }

#line 300 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 300 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 300 "cysystemd/reader.pyx"
        case  0:

#line 300 "cysystemd/reader.pyx"
        if (kw_args > 0) {

#line 300 "cysystemd/reader.pyx"
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags);

#line 300 "cysystemd/reader.pyx"
          if (value) { values[0] = value; kw_args--; }

#line 300 "cysystemd/reader.pyx"
        }

#line 300 "cysystemd/reader.pyx"
      }

#line 300 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 300 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open") < 0)) __PYX_ERR(0, 300, __pyx_L3_error)

#line 300 "cysystemd/reader.pyx"
      }

#line 300 "cysystemd/reader.pyx"
    } else {

#line 300 "cysystemd/reader.pyx"
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: 
#line 300 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 300 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  0: 
#line 300 "cysystemd/reader.pyx"
break;
        default: 
#line 300 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 300 "cysystemd/reader.pyx"
      }

#line 300 "cysystemd/reader.pyx"
    }

#line 300 "cysystemd/reader.pyx"
    __pyx_v_flags = values[0];

#line 300 "cysystemd/reader.pyx"
  }

#line 300 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 300 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("open", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 300 "cysystemd/reader.pyx"
__PYX_ERR(0, 300, __pyx_L3_error)

#line 300 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 300 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.open", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 300 "cysystemd/reader.pyx"
  return NULL;

#line 300 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 300 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_2open(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_flags);

#line 300 "cysystemd/reader.pyx"


#line 300 "cysystemd/reader.pyx"
  /* function exit code */

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 300 "cysystemd/reader.pyx"
  return __pyx_r;

#line 300 "cysystemd/reader.pyx"
}

#line 300 "cysystemd/reader.pyx"


#line 300 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_2open(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_flags) {

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 300 "cysystemd/reader.pyx"
  int __pyx_t_9;

#line 300 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 300 "cysystemd/reader.pyx"
  int __pyx_t_11;

#line 300 "cysystemd/reader.pyx"
  int __pyx_t_12;

#line 300 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 300 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 300 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open", 0);

  /* "cysystemd/reader.pyx":301
 * 
 *     def open(self, flags=JournalOpenMode.CURRENT_USER):
 *         self.flags = JournalOpenMode(int(flags))             # <<<<<<<<<<<<<<
 * 
 *         with self._lock(opening=True):
 */

#line 301 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_JournalOpenMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)

#line 301 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 301 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)

#line 301 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 301 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 301 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 301 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 301 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 301 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 301 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 301 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 301 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 301 "cysystemd/reader.pyx"
    }

#line 301 "cysystemd/reader.pyx"
  }

#line 301 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 301 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 301 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 301 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)

#line 301 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 301 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 301 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 301 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_v_self->flags);

#line 301 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_v_self->flags);

#line 301 "cysystemd/reader.pyx"
  __pyx_v_self->flags = __pyx_t_1;

#line 301 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":303
 *         self.flags = JournalOpenMode(int(flags))
 * 
 *         with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))
 * 
 */

#line 303 "cysystemd/reader.pyx"
  /*with:*/ {

#line 303 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 303 "cysystemd/reader.pyx"
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_opening, Py_True) < 0) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 303 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 303 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L3_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
    __pyx_t_4 = NULL;

#line 303 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {

#line 303 "cysystemd/reader.pyx"
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
      if (likely(__pyx_t_4)) {

#line 303 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_4);

#line 303 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 303 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_1, function);

#line 303 "cysystemd/reader.pyx"
      }

#line 303 "cysystemd/reader.pyx"
    }

#line 303 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 303 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L3_error)

#line 303 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 303 "cysystemd/reader.pyx"
    /*try:*/ {

#line 303 "cysystemd/reader.pyx"
      {

#line 303 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_declare

#line 303 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_assign

#line 303 "cysystemd/reader.pyx"
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_6);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_7);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":304
 * 
 *         with self._lock(opening=True):
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))             # <<<<<<<<<<<<<<
 * 
 *     def open_directory(self, path):
 */

#line 304 "cysystemd/reader.pyx"
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L7_error)

#line 304 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 304 "cysystemd/reader.pyx"
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->flags, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L7_error)

#line 304 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 304 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L7_error)

#line 304 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 304 "cysystemd/reader.pyx"
          __pyx_t_1 = __Pyx_PyInt_From_int(sd_journal_open((&__pyx_v_self->context), __pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L7_error)

#line 304 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 304 "cysystemd/reader.pyx"
          __pyx_t_4 = NULL;

#line 304 "cysystemd/reader.pyx"
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 304 "cysystemd/reader.pyx"
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 304 "cysystemd/reader.pyx"
            if (likely(__pyx_t_4)) {

#line 304 "cysystemd/reader.pyx"
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 304 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_4);

#line 304 "cysystemd/reader.pyx"
              __Pyx_INCREF(function);

#line 304 "cysystemd/reader.pyx"
              __Pyx_DECREF_SET(__pyx_t_2, function);

#line 304 "cysystemd/reader.pyx"
            }

#line 304 "cysystemd/reader.pyx"
          }

#line 304 "cysystemd/reader.pyx"
          __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);

#line 304 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 304 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 304 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L7_error)

#line 304 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 304 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 304 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cysystemd/reader.pyx":303
 *         self.flags = JournalOpenMode(int(flags))
 * 
 *         with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))
 * 
 */

#line 303 "cysystemd/reader.pyx"
        }

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 303 "cysystemd/reader.pyx"
        goto __pyx_L12_try_end;

#line 303 "cysystemd/reader.pyx"
        __pyx_L7_error:;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 303 "cysystemd/reader.pyx"
        /*except:*/ {

#line 303 "cysystemd/reader.pyx"
          __Pyx_AddTraceback("cysystemd.reader.JournalReader.open", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 303 "cysystemd/reader.pyx"
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 303, __pyx_L9_except_error)

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L9_except_error)

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_4);

#line 303 "cysystemd/reader.pyx"
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL);

#line 303 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 303 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 303 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L9_except_error)

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_10);

#line 303 "cysystemd/reader.pyx"
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);

#line 303 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 303 "cysystemd/reader.pyx"
          if (__pyx_t_11 < 0) __PYX_ERR(0, 303, __pyx_L9_except_error)

#line 303 "cysystemd/reader.pyx"
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);

#line 303 "cysystemd/reader.pyx"
          if (__pyx_t_12) {

#line 303 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_3);

#line 303 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_2);

#line 303 "cysystemd/reader.pyx"
            __Pyx_XGIVEREF(__pyx_t_1);

#line 303 "cysystemd/reader.pyx"
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
#line 303 "cysystemd/reader.pyx"


#line 303 "cysystemd/reader.pyx"
            __PYX_ERR(0, 303, __pyx_L9_except_error)

#line 303 "cysystemd/reader.pyx"
          }

#line 303 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 303 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 303 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 303 "cysystemd/reader.pyx"
          goto __pyx_L8_exception_handled;

#line 303 "cysystemd/reader.pyx"
        }

#line 303 "cysystemd/reader.pyx"
        __pyx_L9_except_error:;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        goto __pyx_L1_error;

#line 303 "cysystemd/reader.pyx"
        __pyx_L8_exception_handled:;

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 303 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 303 "cysystemd/reader.pyx"
        __pyx_L12_try_end:;

#line 303 "cysystemd/reader.pyx"
      }

#line 303 "cysystemd/reader.pyx"
    }

#line 303 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 303 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 303 "cysystemd/reader.pyx"
        if (__pyx_t_5) {

#line 303 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__14, NULL);

#line 303 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 303 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 303 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 303 "cysystemd/reader.pyx"
        }

#line 303 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 303 "cysystemd/reader.pyx"
      }

#line 303 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 303 "cysystemd/reader.pyx"
    }

#line 303 "cysystemd/reader.pyx"
    goto __pyx_L16;

#line 303 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 303 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 303 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 303 "cysystemd/reader.pyx"
    __pyx_L16:;

#line 303 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":300
 *         self.flags = None
 * 
 *     def open(self, flags=JournalOpenMode.CURRENT_USER):             # <<<<<<<<<<<<<<
 *         self.flags = JournalOpenMode(int(flags))
 * 
 */

#line 300 "cysystemd/reader.pyx"


#line 300 "cysystemd/reader.pyx"
  /* function exit code */

#line 300 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 300 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 300 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 300 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 300 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 300 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 300 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 300 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.open", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 300 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 300 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 300 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 300 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 300 "cysystemd/reader.pyx"
  return __pyx_r;

#line 300 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":306
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))
 * 
 *     def open_directory(self, path):             # <<<<<<<<<<<<<<
 *         path = _check_dir_path(path)
 * 
 */

#line 306 "cysystemd/reader.pyx"


#line 306 "cysystemd/reader.pyx"
/* Python wrapper */

#line 306 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_5open_directory(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/

#line 306 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_5open_directory(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open_directory (wrapper)", 0);
  __pyx_r = 
#line 306 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_4open_directory(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((PyObject *)__pyx_v_path));

#line 306 "cysystemd/reader.pyx"


#line 306 "cysystemd/reader.pyx"
  /* function exit code */

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 306 "cysystemd/reader.pyx"
  return __pyx_r;

#line 306 "cysystemd/reader.pyx"
}

#line 306 "cysystemd/reader.pyx"


#line 306 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_4open_directory(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_cstr = NULL
#line 306 "cysystemd/reader.pyx"
;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 306 "cysystemd/reader.pyx"
  char const *__pyx_t_9;

#line 306 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 306 "cysystemd/reader.pyx"
  int __pyx_t_11;

#line 306 "cysystemd/reader.pyx"
  int __pyx_t_12;

#line 306 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 306 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 306 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open_directory", 0);

#line 306 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_path);

  /* "cysystemd/reader.pyx":307
 * 
 *     def open_directory(self, path):
 *         path = _check_dir_path(path)             # <<<<<<<<<<<<<<
 * 
 *         with self._lock(opening=True):
 */

#line 307 "cysystemd/reader.pyx"
  __pyx_t_1 = __pyx_f_9cysystemd_6reader__check_dir_path(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)

#line 307 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 307 "cysystemd/reader.pyx"
  __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_1);

#line 307 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":309
 *         path = _check_dir_path(path)
 * 
 *         with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *             cstr = path.encode()
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))
 */

#line 309 "cysystemd/reader.pyx"
  /*with:*/ {

#line 309 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 309 "cysystemd/reader.pyx"
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_opening, Py_True) < 0) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 309 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 309 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L3_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 309 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {

#line 309 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 309 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 309 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 309 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_1, function);

#line 309 "cysystemd/reader.pyx"
      }

#line 309 "cysystemd/reader.pyx"
    }

#line 309 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 309 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L3_error)

#line 309 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 309 "cysystemd/reader.pyx"
    /*try:*/ {

#line 309 "cysystemd/reader.pyx"
      {

#line 309 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_declare

#line 309 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_assign

#line 309 "cysystemd/reader.pyx"
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_6);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_7);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":310
 * 
 *         with self._lock(opening=True):
 *             cstr = path.encode()             # <<<<<<<<<<<<<<
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))
 * 
 */

#line 310 "cysystemd/reader.pyx"
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L7_error)

#line 310 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 310 "cysystemd/reader.pyx"
          __pyx_t_1 = NULL;

#line 310 "cysystemd/reader.pyx"
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 310 "cysystemd/reader.pyx"
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);

#line 310 "cysystemd/reader.pyx"
            if (likely(__pyx_t_1)) {

#line 310 "cysystemd/reader.pyx"
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 310 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_1);

#line 310 "cysystemd/reader.pyx"
              __Pyx_INCREF(function);

#line 310 "cysystemd/reader.pyx"
              __Pyx_DECREF_SET(__pyx_t_2, function);

#line 310 "cysystemd/reader.pyx"
            }

#line 310 "cysystemd/reader.pyx"
          }

#line 310 "cysystemd/reader.pyx"
          __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 310 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 310 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L7_error)

#line 310 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 310 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 310 "cysystemd/reader.pyx"
          __pyx_v_cstr = __pyx_t_3;

#line 310 "cysystemd/reader.pyx"
          __pyx_t_3 = 0;

          /* "cysystemd/reader.pyx":311
 *         with self._lock(opening=True):
 *             cstr = path.encode()
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))             # <<<<<<<<<<<<<<
 * 
 *     def open_files(self, *file_names):
 */

#line 311 "cysystemd/reader.pyx"
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L7_error)

#line 311 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 311 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_cstr); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L7_error)

#line 311 "cysystemd/reader.pyx"
          __pyx_t_1 = __Pyx_PyInt_From_int(sd_journal_open_directory((&__pyx_v_self->context), __pyx_t_9, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L7_error)

#line 311 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 311 "cysystemd/reader.pyx"
          __pyx_t_5 = NULL;

#line 311 "cysystemd/reader.pyx"
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 311 "cysystemd/reader.pyx"
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 311 "cysystemd/reader.pyx"
            if (likely(__pyx_t_5)) {

#line 311 "cysystemd/reader.pyx"
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 311 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_5);

#line 311 "cysystemd/reader.pyx"
              __Pyx_INCREF(function);

#line 311 "cysystemd/reader.pyx"
              __Pyx_DECREF_SET(__pyx_t_2, function);

#line 311 "cysystemd/reader.pyx"
            }

#line 311 "cysystemd/reader.pyx"
          }

#line 311 "cysystemd/reader.pyx"
          __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);

#line 311 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 311 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 311 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L7_error)

#line 311 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 311 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 311 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cysystemd/reader.pyx":309
 *         path = _check_dir_path(path)
 * 
 *         with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *             cstr = path.encode()
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))
 */

#line 309 "cysystemd/reader.pyx"
        }

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 309 "cysystemd/reader.pyx"
        goto __pyx_L12_try_end;

#line 309 "cysystemd/reader.pyx"
        __pyx_L7_error:;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 309 "cysystemd/reader.pyx"
        /*except:*/ {

#line 309 "cysystemd/reader.pyx"
          __Pyx_AddTraceback("cysystemd.reader.JournalReader.open_directory", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 309 "cysystemd/reader.pyx"
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 309, __pyx_L9_except_error)

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L9_except_error)

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_5);

#line 309 "cysystemd/reader.pyx"
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);

#line 309 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 309 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 309 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L9_except_error)

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_10);

#line 309 "cysystemd/reader.pyx"
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10);

#line 309 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 309 "cysystemd/reader.pyx"
          if (__pyx_t_11 < 0) __PYX_ERR(0, 309, __pyx_L9_except_error)

#line 309 "cysystemd/reader.pyx"
          __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0);

#line 309 "cysystemd/reader.pyx"
          if (__pyx_t_12) {

#line 309 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_3);

#line 309 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_2);

#line 309 "cysystemd/reader.pyx"
            __Pyx_XGIVEREF(__pyx_t_1);

#line 309 "cysystemd/reader.pyx"
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
#line 309 "cysystemd/reader.pyx"


#line 309 "cysystemd/reader.pyx"
            __PYX_ERR(0, 309, __pyx_L9_except_error)

#line 309 "cysystemd/reader.pyx"
          }

#line 309 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 309 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 309 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 309 "cysystemd/reader.pyx"
          goto __pyx_L8_exception_handled;

#line 309 "cysystemd/reader.pyx"
        }

#line 309 "cysystemd/reader.pyx"
        __pyx_L9_except_error:;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        goto __pyx_L1_error;

#line 309 "cysystemd/reader.pyx"
        __pyx_L8_exception_handled:;

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 309 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 309 "cysystemd/reader.pyx"
        __pyx_L12_try_end:;

#line 309 "cysystemd/reader.pyx"
      }

#line 309 "cysystemd/reader.pyx"
    }

#line 309 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 309 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 309 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 309 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 309 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 309 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 309, __pyx_L1_error)

#line 309 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 309 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 309 "cysystemd/reader.pyx"
        }

#line 309 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 309 "cysystemd/reader.pyx"
      }

#line 309 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 309 "cysystemd/reader.pyx"
    }

#line 309 "cysystemd/reader.pyx"
    goto __pyx_L16;

#line 309 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 309 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 309 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 309 "cysystemd/reader.pyx"
    __pyx_L16:;

#line 309 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":306
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))
 * 
 *     def open_directory(self, path):             # <<<<<<<<<<<<<<
 *         path = _check_dir_path(path)
 * 
 */

#line 306 "cysystemd/reader.pyx"


#line 306 "cysystemd/reader.pyx"
  /* function exit code */

#line 306 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 306 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 306 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 306 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.open_directory", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 306 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 306 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_cstr);

#line 306 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_path);

#line 306 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 306 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 306 "cysystemd/reader.pyx"
  return __pyx_r;

#line 306 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":313
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))
 * 
 *     def open_files(self, *file_names):             # <<<<<<<<<<<<<<
 *         file_names = tuple(map(_check_file_path, file_names))
 * 
 */

#line 313 "cysystemd/reader.pyx"


#line 313 "cysystemd/reader.pyx"
/* Python wrapper */

#line 313 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_7open_files(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 313 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_7open_files(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file_names = 0
#line 313 "cysystemd/reader.pyx"
;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open_files (wrapper)", 0);

#line 313 "cysystemd/reader.pyx"
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "open_files", 0))) return NULL;

#line 313 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_args);

#line 313 "cysystemd/reader.pyx"
  __pyx_v_file_names = __pyx_args;
  __pyx_r = 
#line 313 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_6open_files(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_file_names);

#line 313 "cysystemd/reader.pyx"


#line 313 "cysystemd/reader.pyx"
  /* function exit code */

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_file_names);

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 313 "cysystemd/reader.pyx"
  return __pyx_r;

#line 313 "cysystemd/reader.pyx"
}

#line 313 "cysystemd/reader.pyx"


#line 313 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6open_files(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_file_names) {
  char **__pyx_v_paths
#line 313 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_i = NULL
#line 313 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_s = NULL
#line 313 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_cstr = NULL
#line 313 "cysystemd/reader.pyx"
;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 313 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_3;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 313 "cysystemd/reader.pyx"
  char *__pyx_t_7;

#line 313 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_8;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_9 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_11 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_12 = NULL;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_13 = NULL;

#line 313 "cysystemd/reader.pyx"
  int __pyx_t_14;

#line 313 "cysystemd/reader.pyx"
  int __pyx_t_15;

#line 313 "cysystemd/reader.pyx"
  int __pyx_t_16;

#line 313 "cysystemd/reader.pyx"
  int __pyx_t_17;

#line 313 "cysystemd/reader.pyx"
  char const *__pyx_t_18;

#line 313 "cysystemd/reader.pyx"
  PyObject *__pyx_t_19 = NULL;

#line 313 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 313 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 313 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("open_files", 0);

#line 313 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_file_names);

  /* "cysystemd/reader.pyx":314
 * 
 *     def open_files(self, *file_names):
 *         file_names = tuple(map(_check_file_path, file_names))             # <<<<<<<<<<<<<<
 * 
 *         cdef char **paths = <char **>PyMem_Malloc(len(file_names) * sizeof(char*))
 */

#line 314 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_CFunc_str____object___to_py(__pyx_f_9cysystemd_6reader__check_file_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)

#line 314 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 314 "cysystemd/reader.pyx"
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)

#line 314 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 314 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 314 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);

#line 314 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_file_names);

#line 314 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_v_file_names);

#line 314 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_file_names);

#line 314 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 314 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)

#line 314 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 314 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 314 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)

#line 314 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 314 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 314 "cysystemd/reader.pyx"
  __Pyx_DECREF_SET(__pyx_v_file_names, ((PyObject*)__pyx_t_2));

#line 314 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":316
 *         file_names = tuple(map(_check_file_path, file_names))
 * 
 *         cdef char **paths = <char **>PyMem_Malloc(len(file_names) * sizeof(char*))             # <<<<<<<<<<<<<<
 * 
 *         for i, s in enumerate(file_names):
 */

#line 316 "cysystemd/reader.pyx"
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v_file_names); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 316, __pyx_L1_error)

#line 316 "cysystemd/reader.pyx"
  __pyx_v_paths = ((char **)PyMem_Malloc((__pyx_t_3 * (sizeof(char *)))));

  /* "cysystemd/reader.pyx":318
 *         cdef char **paths = <char **>PyMem_Malloc(len(file_names) * sizeof(char*))
 * 
 *         for i, s in enumerate(file_names):             # <<<<<<<<<<<<<<
 *             cstr = s.encode()
 *             paths[i] = cstr
 */

#line 318 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_int_0);

#line 318 "cysystemd/reader.pyx"
  __pyx_t_2 = __pyx_int_0;

#line 318 "cysystemd/reader.pyx"
  __pyx_t_1 = __pyx_v_file_names; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;

#line 318 "cysystemd/reader.pyx"
  for (;;) {

#line 318 "cysystemd/reader.pyx"
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;

#line 318 "cysystemd/reader.pyx"
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 318 "cysystemd/reader.pyx"
    __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 318, __pyx_L1_error)

#line 318 "cysystemd/reader.pyx"
    #else

#line 318 "cysystemd/reader.pyx"
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error)

#line 318 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 318 "cysystemd/reader.pyx"
    #endif

#line 318 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);

#line 318 "cysystemd/reader.pyx"
    __pyx_t_4 = 0;

#line 318 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_t_2);

#line 318 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);

#line 318 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error)

#line 318 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 318 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2);

#line 318 "cysystemd/reader.pyx"
    __pyx_t_2 = __pyx_t_4;

#line 318 "cysystemd/reader.pyx"
    __pyx_t_4 = 0;

    /* "cysystemd/reader.pyx":319
 * 
 *         for i, s in enumerate(file_names):
 *             cstr = s.encode()             # <<<<<<<<<<<<<<
 *             paths[i] = cstr
 * 
 */

#line 319 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error)

#line 319 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 319 "cysystemd/reader.pyx"
    __pyx_t_6 = NULL;

#line 319 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {

#line 319 "cysystemd/reader.pyx"
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);

#line 319 "cysystemd/reader.pyx"
      if (likely(__pyx_t_6)) {

#line 319 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);

#line 319 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_6);

#line 319 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 319 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_5, function);

#line 319 "cysystemd/reader.pyx"
      }

#line 319 "cysystemd/reader.pyx"
    }

#line 319 "cysystemd/reader.pyx"
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);

#line 319 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 319 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)

#line 319 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 319 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 319 "cysystemd/reader.pyx"
    __Pyx_XDECREF_SET(__pyx_v_cstr, __pyx_t_4);

#line 319 "cysystemd/reader.pyx"
    __pyx_t_4 = 0;

    /* "cysystemd/reader.pyx":320
 *         for i, s in enumerate(file_names):
 *             cstr = s.encode()
 *             paths[i] = cstr             # <<<<<<<<<<<<<<
 * 
 *         try:
 */

#line 320 "cysystemd/reader.pyx"
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_cstr); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L1_error)

#line 320 "cysystemd/reader.pyx"
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L1_error)

#line 320 "cysystemd/reader.pyx"
    (__pyx_v_paths[__pyx_t_8]) = __pyx_t_7;

    /* "cysystemd/reader.pyx":318
 *         cdef char **paths = <char **>PyMem_Malloc(len(file_names) * sizeof(char*))
 * 
 *         for i, s in enumerate(file_names):             # <<<<<<<<<<<<<<
 *             cstr = s.encode()
 *             paths[i] = cstr
 */

#line 318 "cysystemd/reader.pyx"
  }

#line 318 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 318 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":322
 *             paths[i] = cstr
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             with self._lock(opening=True):
 *                 check_error_code(sd_journal_open_files(&self.context, paths, 0))
 */

#line 322 "cysystemd/reader.pyx"
  /*try:*/ {

    /* "cysystemd/reader.pyx":323
 * 
 *         try:
 *             with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *                 check_error_code(sd_journal_open_files(&self.context, paths, 0))
 *         finally:
 */

#line 323 "cysystemd/reader.pyx"
    /*with:*/ {

#line 323 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 323 "cysystemd/reader.pyx"
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_opening, Py_True) < 0) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_4);

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 323 "cysystemd/reader.pyx"
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_9);

#line 323 "cysystemd/reader.pyx"
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L8_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
      __pyx_t_5 = NULL;

#line 323 "cysystemd/reader.pyx"
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 323 "cysystemd/reader.pyx"
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
        if (likely(__pyx_t_5)) {

#line 323 "cysystemd/reader.pyx"
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
          __Pyx_INCREF(__pyx_t_5);

#line 323 "cysystemd/reader.pyx"
          __Pyx_INCREF(function);

#line 323 "cysystemd/reader.pyx"
          __Pyx_DECREF_SET(__pyx_t_2, function);

#line 323 "cysystemd/reader.pyx"
        }

#line 323 "cysystemd/reader.pyx"
      }

#line 323 "cysystemd/reader.pyx"
      __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 323 "cysystemd/reader.pyx"
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L8_error)

#line 323 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 323 "cysystemd/reader.pyx"
      /*try:*/ {

#line 323 "cysystemd/reader.pyx"
        {

#line 323 "cysystemd/reader.pyx"
          __Pyx_PyThreadState_declare

#line 323 "cysystemd/reader.pyx"
          __Pyx_PyThreadState_assign

#line 323 "cysystemd/reader.pyx"
          __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGOTREF(__pyx_t_10);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGOTREF(__pyx_t_11);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGOTREF(__pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          /*try:*/ {

            /* "cysystemd/reader.pyx":324
 *         try:
 *             with self._lock(opening=True):
 *                 check_error_code(sd_journal_open_files(&self.context, paths, 0))             # <<<<<<<<<<<<<<
 *         finally:
 *             PyMem_Free(paths)
 */

#line 324 "cysystemd/reader.pyx"
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L12_error)

#line 324 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_1);

#line 324 "cysystemd/reader.pyx"
            __pyx_t_2 = __Pyx_PyInt_From_int(sd_journal_open_files((&__pyx_v_self->context), __pyx_v_paths, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L12_error)

#line 324 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 324 "cysystemd/reader.pyx"
            __pyx_t_5 = NULL;

#line 324 "cysystemd/reader.pyx"
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {

#line 324 "cysystemd/reader.pyx"
              __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);

#line 324 "cysystemd/reader.pyx"
              if (likely(__pyx_t_5)) {

#line 324 "cysystemd/reader.pyx"
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);

#line 324 "cysystemd/reader.pyx"
                __Pyx_INCREF(__pyx_t_5);

#line 324 "cysystemd/reader.pyx"
                __Pyx_INCREF(function);

#line 324 "cysystemd/reader.pyx"
                __Pyx_DECREF_SET(__pyx_t_1, function);

#line 324 "cysystemd/reader.pyx"
              }

#line 324 "cysystemd/reader.pyx"
            }

#line 324 "cysystemd/reader.pyx"
            __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);

#line 324 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 324 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 324 "cysystemd/reader.pyx"
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L12_error)

#line 324 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_4);

#line 324 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 324 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cysystemd/reader.pyx":323
 * 
 *         try:
 *             with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *                 check_error_code(sd_journal_open_files(&self.context, paths, 0))
 *         finally:
 */

#line 323 "cysystemd/reader.pyx"
          }

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

#line 323 "cysystemd/reader.pyx"
          goto __pyx_L17_try_end;

#line 323 "cysystemd/reader.pyx"
          __pyx_L12_error:;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 323 "cysystemd/reader.pyx"
          /*except:*/ {

#line 323 "cysystemd/reader.pyx"
            __Pyx_AddTraceback("cysystemd.reader.JournalReader.open_files", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 323 "cysystemd/reader.pyx"
            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 323, __pyx_L14_except_error)

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_4);

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_1);

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
            __pyx_t_5 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L14_except_error)

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_5);

#line 323 "cysystemd/reader.pyx"
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL);

#line 323 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

#line 323 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 323 "cysystemd/reader.pyx"
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 323, __pyx_L14_except_error)

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_13);

#line 323 "cysystemd/reader.pyx"
            __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13);

#line 323 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

#line 323 "cysystemd/reader.pyx"
            if (__pyx_t_14 < 0) __PYX_ERR(0, 323, __pyx_L14_except_error)

#line 323 "cysystemd/reader.pyx"
            __pyx_t_15 = ((!(__pyx_t_14 != 0)) != 0);

#line 323 "cysystemd/reader.pyx"
            if (__pyx_t_15) {

#line 323 "cysystemd/reader.pyx"
              __Pyx_GIVEREF(__pyx_t_4);

#line 323 "cysystemd/reader.pyx"
              __Pyx_GIVEREF(__pyx_t_1);

#line 323 "cysystemd/reader.pyx"
              __Pyx_XGIVEREF(__pyx_t_2);

#line 323 "cysystemd/reader.pyx"
              __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_2);
              __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
#line 323 "cysystemd/reader.pyx"


#line 323 "cysystemd/reader.pyx"
              __PYX_ERR(0, 323, __pyx_L14_except_error)

#line 323 "cysystemd/reader.pyx"
            }

#line 323 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 323 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 323 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 323 "cysystemd/reader.pyx"
            goto __pyx_L13_exception_handled;

#line 323 "cysystemd/reader.pyx"
          }

#line 323 "cysystemd/reader.pyx"
          __pyx_L14_except_error:;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_10);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_11);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          goto __pyx_L6_error;

#line 323 "cysystemd/reader.pyx"
          __pyx_L13_exception_handled:;

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_10);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_11);

#line 323 "cysystemd/reader.pyx"
          __Pyx_XGIVEREF(__pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);

#line 323 "cysystemd/reader.pyx"
          __pyx_L17_try_end:;

#line 323 "cysystemd/reader.pyx"
        }

#line 323 "cysystemd/reader.pyx"
      }

#line 323 "cysystemd/reader.pyx"
      /*finally:*/ {

#line 323 "cysystemd/reader.pyx"
        /*normal exit:*/{

#line 323 "cysystemd/reader.pyx"
          if (__pyx_t_9) {

#line 323 "cysystemd/reader.pyx"
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__14, NULL);

#line 323 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

#line 323 "cysystemd/reader.pyx"
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 323, __pyx_L6_error)

#line 323 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_12);

#line 323 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

#line 323 "cysystemd/reader.pyx"
          }

#line 323 "cysystemd/reader.pyx"
          goto __pyx_L11;

#line 323 "cysystemd/reader.pyx"
        }

#line 323 "cysystemd/reader.pyx"
        __pyx_L11:;

#line 323 "cysystemd/reader.pyx"
      }

#line 323 "cysystemd/reader.pyx"
      goto __pyx_L21;

#line 323 "cysystemd/reader.pyx"
      __pyx_L8_error:;

#line 323 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

#line 323 "cysystemd/reader.pyx"
      goto __pyx_L6_error;

#line 323 "cysystemd/reader.pyx"
      __pyx_L21:;

#line 323 "cysystemd/reader.pyx"
    }

#line 323 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":326
 *                 check_error_code(sd_journal_open_files(&self.context, paths, 0))
 *         finally:
 *             PyMem_Free(paths)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 326 "cysystemd/reader.pyx"
  /*finally:*/ {

#line 326 "cysystemd/reader.pyx"
    /*normal exit:*/{

#line 326 "cysystemd/reader.pyx"
      PyMem_Free(__pyx_v_paths);

#line 326 "cysystemd/reader.pyx"
      goto __pyx_L7;

#line 326 "cysystemd/reader.pyx"
    }

#line 326 "cysystemd/reader.pyx"
    __pyx_L6_error:;

#line 326 "cysystemd/reader.pyx"
    /*exception exit:*/{

#line 326 "cysystemd/reader.pyx"
      __Pyx_PyThreadState_declare

#line 326 "cysystemd/reader.pyx"
      __Pyx_PyThreadState_assign

#line 326 "cysystemd/reader.pyx"
      __pyx_t_9 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_13 = 0; __pyx_t_19 = 0;

#line 326 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 326 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 326 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 326 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 326 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 326 "cysystemd/reader.pyx"
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_13, &__pyx_t_19);

#line 326 "cysystemd/reader.pyx"
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_12, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_12, &__pyx_t_11);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_9);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_12);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_11);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_10);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_13);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_19);

#line 326 "cysystemd/reader.pyx"
      __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;

#line 326 "cysystemd/reader.pyx"
      {

#line 326 "cysystemd/reader.pyx"
        PyMem_Free(__pyx_v_paths);

#line 326 "cysystemd/reader.pyx"
      }

#line 326 "cysystemd/reader.pyx"
      if (PY_MAJOR_VERSION >= 3) {

#line 326 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_10);

#line 326 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_13);

#line 326 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_19);

#line 326 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_13, __pyx_t_19);

#line 326 "cysystemd/reader.pyx"
      }

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_9);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_12);

#line 326 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_11);

#line 326 "cysystemd/reader.pyx"
      __Pyx_ErrRestore(__pyx_t_9, __pyx_t_12, __pyx_t_11);

#line 326 "cysystemd/reader.pyx"
      __pyx_t_9 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_13 = 0; __pyx_t_19 = 0;

#line 326 "cysystemd/reader.pyx"
      __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;

#line 326 "cysystemd/reader.pyx"
      goto __pyx_L1_error;

#line 326 "cysystemd/reader.pyx"
    }

#line 326 "cysystemd/reader.pyx"
    __pyx_L7:;

#line 326 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":313
 *             check_error_code(sd_journal_open_directory(&self.context, cstr, 0))
 * 
 *     def open_files(self, *file_names):             # <<<<<<<<<<<<<<
 *         file_names = tuple(map(_check_file_path, file_names))
 * 
 */

#line 313 "cysystemd/reader.pyx"


#line 313 "cysystemd/reader.pyx"
  /* function exit code */

#line 313 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 313 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 313 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 313 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.open_files", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 313 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 313 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_file_names);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_i);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_s);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_cstr);

#line 313 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 313 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 313 "cysystemd/reader.pyx"
  return __pyx_r;

#line 313 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":329
 * 
 *     @property
 *     def data_threshold(self):             # <<<<<<<<<<<<<<
 *         cdef size_t result
 *         cdef int rcode
 */

#line 329 "cysystemd/reader.pyx"


#line 329 "cysystemd/reader.pyx"
/* Python wrapper */

#line 329 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 329 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_1__get__(PyObject *__pyx_v_self) {

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 329 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 329 "cysystemd/reader.pyx"


#line 329 "cysystemd/reader.pyx"
  /* function exit code */

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 329 "cysystemd/reader.pyx"
  return __pyx_r;

#line 329 "cysystemd/reader.pyx"
}

#line 329 "cysystemd/reader.pyx"


#line 329 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {
  size_t __pyx_v_result
#line 329 "cysystemd/reader.pyx"
;
  int __pyx_v_rcode
#line 329 "cysystemd/reader.pyx"
;

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 329 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 329 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 329 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 329 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":333
 *         cdef int rcode
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             rcode = sd_journal_get_data_threshold(self.context, &result)
 * 
 */

#line 333 "cysystemd/reader.pyx"
  {

#line 333 "cysystemd/reader.pyx"
      #ifdef WITH_THREAD

#line 333 "cysystemd/reader.pyx"
      PyThreadState *_save;

#line 333 "cysystemd/reader.pyx"
      Py_UNBLOCK_THREADS

#line 333 "cysystemd/reader.pyx"
      __Pyx_FastGIL_Remember();

#line 333 "cysystemd/reader.pyx"
      #endif

#line 333 "cysystemd/reader.pyx"
      /*try:*/ {

        /* "cysystemd/reader.pyx":334
 * 
 *         with nogil:
 *             rcode = sd_journal_get_data_threshold(self.context, &result)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(rcode)
 */

#line 334 "cysystemd/reader.pyx"
        __pyx_v_rcode = sd_journal_get_data_threshold(__pyx_v_self->context, (&__pyx_v_result));

#line 334 "cysystemd/reader.pyx"
      }

      /* "cysystemd/reader.pyx":333
 *         cdef int rcode
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             rcode = sd_journal_get_data_threshold(self.context, &result)
 * 
 */

#line 333 "cysystemd/reader.pyx"
      /*finally:*/ {

#line 333 "cysystemd/reader.pyx"
        /*normal exit:*/{

#line 333 "cysystemd/reader.pyx"
          #ifdef WITH_THREAD

#line 333 "cysystemd/reader.pyx"
          __Pyx_FastGIL_Forget();

#line 333 "cysystemd/reader.pyx"
          Py_BLOCK_THREADS

#line 333 "cysystemd/reader.pyx"
          #endif

#line 333 "cysystemd/reader.pyx"
          goto __pyx_L5;

#line 333 "cysystemd/reader.pyx"
        }

#line 333 "cysystemd/reader.pyx"
        __pyx_L5:;

#line 333 "cysystemd/reader.pyx"
      }

#line 333 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":336
 *             rcode = sd_journal_get_data_threshold(self.context, &result)
 * 
 *         check_error_code(rcode)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */

#line 336 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)

#line 336 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 336 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)

#line 336 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 336 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 336 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 336 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 336 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 336 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 336 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 336 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 336 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 336 "cysystemd/reader.pyx"
    }

#line 336 "cysystemd/reader.pyx"
  }

#line 336 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 336 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 336 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 336 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)

#line 336 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 336 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 336 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":337
 * 
 *         check_error_code(rcode)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @data_threshold.setter
 */

#line 337 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 337 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)

#line 337 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 337 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 337 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 337 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":329
 * 
 *     @property
 *     def data_threshold(self):             # <<<<<<<<<<<<<<
 *         cdef size_t result
 *         cdef int rcode
 */

#line 329 "cysystemd/reader.pyx"


#line 329 "cysystemd/reader.pyx"
  /* function exit code */

#line 329 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 329 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 329 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 329 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 329 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 329 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.data_threshold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 329 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 329 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 329 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 329 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 329 "cysystemd/reader.pyx"
  return __pyx_r;

#line 329 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":340
 * 
 *     @data_threshold.setter
 *     def data_threshold(self, size):             # <<<<<<<<<<<<<<
 *         cdef size_t sz = size
 *         cdef int result
 */

#line 340 "cysystemd/reader.pyx"


#line 340 "cysystemd/reader.pyx"
/* Python wrapper */

#line 340 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/

#line 340 "cysystemd/reader.pyx"
static int __pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_size) {

#line 340 "cysystemd/reader.pyx"
  int __pyx_r;

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = 
#line 340 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold_2__set__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((PyObject *)__pyx_v_size));

#line 340 "cysystemd/reader.pyx"


#line 340 "cysystemd/reader.pyx"
  /* function exit code */

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 340 "cysystemd/reader.pyx"
  return __pyx_r;

#line 340 "cysystemd/reader.pyx"
}

#line 340 "cysystemd/reader.pyx"


#line 340 "cysystemd/reader.pyx"
static int __pyx_pf_9cysystemd_6reader_13JournalReader_14data_threshold_2__set__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_size) {
  size_t __pyx_v_sz
#line 340 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 340 "cysystemd/reader.pyx"
;

#line 340 "cysystemd/reader.pyx"
  int __pyx_r;

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 340 "cysystemd/reader.pyx"
  size_t __pyx_t_1;

#line 340 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 340 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 340 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 340 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 340 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 340 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 340 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cysystemd/reader.pyx":341
 *     @data_threshold.setter
 *     def data_threshold(self, size):
 *         cdef size_t sz = size             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 341 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L1_error)

#line 341 "cysystemd/reader.pyx"
  __pyx_v_sz = __pyx_t_1;

  /* "cysystemd/reader.pyx":344
 *         cdef int result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_set_data_threshold(self.context, sz)
 * 
 */

#line 344 "cysystemd/reader.pyx"
  {

#line 344 "cysystemd/reader.pyx"
      #ifdef WITH_THREAD

#line 344 "cysystemd/reader.pyx"
      PyThreadState *_save;

#line 344 "cysystemd/reader.pyx"
      Py_UNBLOCK_THREADS

#line 344 "cysystemd/reader.pyx"
      __Pyx_FastGIL_Remember();

#line 344 "cysystemd/reader.pyx"
      #endif

#line 344 "cysystemd/reader.pyx"
      /*try:*/ {

        /* "cysystemd/reader.pyx":345
 * 
 *         with nogil:
 *             result = sd_journal_set_data_threshold(self.context, sz)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 345 "cysystemd/reader.pyx"
        __pyx_v_result = sd_journal_set_data_threshold(__pyx_v_self->context, __pyx_v_sz);

#line 345 "cysystemd/reader.pyx"
      }

      /* "cysystemd/reader.pyx":344
 *         cdef int result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_set_data_threshold(self.context, sz)
 * 
 */

#line 344 "cysystemd/reader.pyx"
      /*finally:*/ {

#line 344 "cysystemd/reader.pyx"
        /*normal exit:*/{

#line 344 "cysystemd/reader.pyx"
          #ifdef WITH_THREAD

#line 344 "cysystemd/reader.pyx"
          __Pyx_FastGIL_Forget();

#line 344 "cysystemd/reader.pyx"
          Py_BLOCK_THREADS

#line 344 "cysystemd/reader.pyx"
          #endif

#line 344 "cysystemd/reader.pyx"
          goto __pyx_L5;

#line 344 "cysystemd/reader.pyx"
        }

#line 344 "cysystemd/reader.pyx"
        __pyx_L5:;

#line 344 "cysystemd/reader.pyx"
      }

#line 344 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":347
 *             result = sd_journal_set_data_threshold(self.context, sz)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 347 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)

#line 347 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 347 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)

#line 347 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 347 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 347 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 347 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 347 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 347 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 347 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 347 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 347 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 347 "cysystemd/reader.pyx"
    }

#line 347 "cysystemd/reader.pyx"
  }

#line 347 "cysystemd/reader.pyx"
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);

#line 347 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 347 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 347 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error)

#line 347 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 347 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 347 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":340
 * 
 *     @data_threshold.setter
 *     def data_threshold(self, size):             # <<<<<<<<<<<<<<
 *         cdef size_t sz = size
 *         cdef int result
 */

#line 340 "cysystemd/reader.pyx"


#line 340 "cysystemd/reader.pyx"
  /* function exit code */

#line 340 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 340 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 340 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 340 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 340 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 340 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 340 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 340 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.data_threshold.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 340 "cysystemd/reader.pyx"
  __pyx_r = -1;

#line 340 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 340 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 340 "cysystemd/reader.pyx"
  return __pyx_r;

#line 340 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":350
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_CLOSED
 * 
 */

#line 350 "cysystemd/reader.pyx"


#line 350 "cysystemd/reader.pyx"
/* Python wrapper */

#line 350 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6closed_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 350 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6closed_1__get__(PyObject *__pyx_v_self) {

#line 350 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 350 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_6closed___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 350 "cysystemd/reader.pyx"


#line 350 "cysystemd/reader.pyx"
  /* function exit code */

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 350 "cysystemd/reader.pyx"
  return __pyx_r;

#line 350 "cysystemd/reader.pyx"
}

#line 350 "cysystemd/reader.pyx"


#line 350 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6closed___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 350 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 350 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 350 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 350 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 350 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":351
 *     @property
 *     def closed(self):
 *         return self.state == READER_CLOSED             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 351 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 351 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->state == __pyx_e_9cysystemd_6reader_READER_CLOSED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)

#line 351 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 351 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 351 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 351 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":350
 * 
 *     @property
 *     def closed(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_CLOSED
 * 
 */

#line 350 "cysystemd/reader.pyx"


#line 350 "cysystemd/reader.pyx"
  /* function exit code */

#line 350 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 350 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 350 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 350 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 350 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 350 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 350 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 350 "cysystemd/reader.pyx"
  return __pyx_r;

#line 350 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":354
 * 
 *     @property
 *     def locked(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_LOCKED
 * 
 */

#line 354 "cysystemd/reader.pyx"


#line 354 "cysystemd/reader.pyx"
/* Python wrapper */

#line 354 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6locked_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 354 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6locked_1__get__(PyObject *__pyx_v_self) {

#line 354 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 354 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_6locked___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 354 "cysystemd/reader.pyx"


#line 354 "cysystemd/reader.pyx"
  /* function exit code */

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 354 "cysystemd/reader.pyx"
  return __pyx_r;

#line 354 "cysystemd/reader.pyx"
}

#line 354 "cysystemd/reader.pyx"


#line 354 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6locked___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 354 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 354 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 354 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 354 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 354 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":355
 *     @property
 *     def locked(self):
 *         return self.state == READER_LOCKED             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 355 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 355 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->state == __pyx_e_9cysystemd_6reader_READER_LOCKED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)

#line 355 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 355 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 355 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 355 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":354
 * 
 *     @property
 *     def locked(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_LOCKED
 * 
 */

#line 354 "cysystemd/reader.pyx"


#line 354 "cysystemd/reader.pyx"
  /* function exit code */

#line 354 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 354 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 354 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.locked.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 354 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 354 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 354 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 354 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 354 "cysystemd/reader.pyx"
  return __pyx_r;

#line 354 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":358
 * 
 *     @property
 *     def idle(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_OPENED
 * 
 */

#line 358 "cysystemd/reader.pyx"


#line 358 "cysystemd/reader.pyx"
/* Python wrapper */

#line 358 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_4idle_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 358 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_4idle_1__get__(PyObject *__pyx_v_self) {

#line 358 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 358 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_4idle___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 358 "cysystemd/reader.pyx"


#line 358 "cysystemd/reader.pyx"
  /* function exit code */

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 358 "cysystemd/reader.pyx"
  return __pyx_r;

#line 358 "cysystemd/reader.pyx"
}

#line 358 "cysystemd/reader.pyx"


#line 358 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_4idle___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 358 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 358 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 358 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 358 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 358 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":359
 *     @property
 *     def idle(self):
 *         return self.state == READER_OPENED             # <<<<<<<<<<<<<<
 * 
 *     @contextmanager
 */

#line 359 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 359 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->state == __pyx_e_9cysystemd_6reader_READER_OPENED)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)

#line 359 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 359 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 359 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 359 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":358
 * 
 *     @property
 *     def idle(self):             # <<<<<<<<<<<<<<
 *         return self.state == READER_OPENED
 * 
 */

#line 358 "cysystemd/reader.pyx"


#line 358 "cysystemd/reader.pyx"
  /* function exit code */

#line 358 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 358 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 358 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.idle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 358 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 358 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 358 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 358 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 358 "cysystemd/reader.pyx"
  return __pyx_r;

#line 358 "cysystemd/reader.pyx"
}

#line 358 "cysystemd/reader.pyx"
static PyObject *__pyx_gb_9cysystemd_6reader_13JournalReader_10generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cysystemd/reader.pyx":362
 * 
 *     @contextmanager
 *     def _lock(self, opening=False):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 */

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
/* Python wrapper */

#line 362 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_9_lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 362 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_9_lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_opening = 0
#line 362 "cysystemd/reader.pyx"
;

#line 362 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 362 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 362 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("_lock (wrapper)", 0);

#line 362 "cysystemd/reader.pyx"
  {

#line 362 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opening,0};

#line 362 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 362 "cysystemd/reader.pyx"
    values[0] = ((PyObject *)Py_False);

#line 362 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 362 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 362 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 362 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 362 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 362 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 362 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 362 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 362 "cysystemd/reader.pyx"
      }

#line 362 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 362 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 362 "cysystemd/reader.pyx"
        case  0:

#line 362 "cysystemd/reader.pyx"
        if (kw_args > 0) {

#line 362 "cysystemd/reader.pyx"
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opening);

#line 362 "cysystemd/reader.pyx"
          if (value) { values[0] = value; kw_args--; }

#line 362 "cysystemd/reader.pyx"
        }

#line 362 "cysystemd/reader.pyx"
      }

#line 362 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 362 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_lock") < 0)) __PYX_ERR(0, 362, __pyx_L3_error)

#line 362 "cysystemd/reader.pyx"
      }

#line 362 "cysystemd/reader.pyx"
    } else {

#line 362 "cysystemd/reader.pyx"
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: 
#line 362 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 362 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  0: 
#line 362 "cysystemd/reader.pyx"
break;
        default: 
#line 362 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 362 "cysystemd/reader.pyx"
      }

#line 362 "cysystemd/reader.pyx"
    }

#line 362 "cysystemd/reader.pyx"
    __pyx_v_opening = values[0];

#line 362 "cysystemd/reader.pyx"
  }

#line 362 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 362 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_lock", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 362 "cysystemd/reader.pyx"
__PYX_ERR(0, 362, __pyx_L3_error)

#line 362 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 362 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader._lock", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
  return NULL;

#line 362 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 362 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_8_lock(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_opening);

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
  /* function exit code */

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
  return __pyx_r;

#line 362 "cysystemd/reader.pyx"
}

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_8_lock(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_opening) {
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *__pyx_cur_scope
#line 362 "cysystemd/reader.pyx"
;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 362 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 362 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 362 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("_lock", 0);

#line 362 "cysystemd/reader.pyx"
  __pyx_cur_scope = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct_1__lock(__pyx_ptype_9cysystemd_6reader___pyx_scope_struct_1__lock, __pyx_empty_tuple, NULL);

#line 362 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_cur_scope)) {

#line 362 "cysystemd/reader.pyx"
    __pyx_cur_scope = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)Py_None);

#line 362 "cysystemd/reader.pyx"
    __Pyx_INCREF(Py_None);

#line 362 "cysystemd/reader.pyx"
    __PYX_ERR(0, 362, __pyx_L1_error)

#line 362 "cysystemd/reader.pyx"
  } else {

#line 362 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_cur_scope);

#line 362 "cysystemd/reader.pyx"
  }

#line 362 "cysystemd/reader.pyx"
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;

#line 362 "cysystemd/reader.pyx"
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

#line 362 "cysystemd/reader.pyx"
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

#line 362 "cysystemd/reader.pyx"
  __pyx_cur_scope->__pyx_v_opening = __pyx_v_opening;

#line 362 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_opening);

#line 362 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_opening);

#line 362 "cysystemd/reader.pyx"
  {

#line 362 "cysystemd/reader.pyx"
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cysystemd_6reader_13JournalReader_10generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_lock, __pyx_n_s_JournalReader__lock, __pyx_n_s_cysystemd_reader); if (unlikely(!gen)) __PYX_ERR(0, 362, __pyx_L1_error)

#line 362 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_cur_scope);

#line 362 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
    return (PyObject *) gen;

#line 362 "cysystemd/reader.pyx"
  }

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
  /* function exit code */

#line 362 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 362 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader._lock", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 362 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 362 "cysystemd/reader.pyx"
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));

#line 362 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
  return __pyx_r;

#line 362 "cysystemd/reader.pyx"
}

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
static PyObject *__pyx_gb_9cysystemd_6reader_13JournalReader_10generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{

#line 362 "cysystemd/reader.pyx"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *__pyx_cur_scope = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)__pyx_generator->closure);

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 362 "cysystemd/reader.pyx"
  int __pyx_t_2;

#line 362 "cysystemd/reader.pyx"
  int __pyx_t_3;

#line 362 "cysystemd/reader.pyx"
  int __pyx_t_4;

#line 362 "cysystemd/reader.pyx"
  int __pyx_t_5;

#line 362 "cysystemd/reader.pyx"
  char const *__pyx_t_6;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_9 = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_11 = NULL;

#line 362 "cysystemd/reader.pyx"
  PyObject *__pyx_t_12 = NULL;

#line 362 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 362 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 362 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("_lock", 0);

#line 362 "cysystemd/reader.pyx"
  switch (__pyx_generator->resume_label) {

#line 362 "cysystemd/reader.pyx"
    case 0: goto __pyx_L3_first_run;

#line 362 "cysystemd/reader.pyx"
    case 1: goto __pyx_L10_resume_from_yield;

#line 362 "cysystemd/reader.pyx"
    default: /* CPython raises the right error here */

#line 362 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
    return NULL;

#line 362 "cysystemd/reader.pyx"
  }

#line 362 "cysystemd/reader.pyx"
  __pyx_L3_first_run:;

#line 362 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 362, __pyx_L1_error)

  /* "cysystemd/reader.pyx":363
 *     @contextmanager
 *     def _lock(self, opening=False):
 *         if self.closed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:
 */

#line 363 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)

#line 363 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 363 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)

#line 363 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 363 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_2)) {

    /* "cysystemd/reader.pyx":364
 *     def _lock(self, opening=False):
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")             # <<<<<<<<<<<<<<
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")
 */

#line 364 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)

#line 364 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 364 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 364 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 364 "cysystemd/reader.pyx"
    __PYX_ERR(0, 364, __pyx_L1_error)

    /* "cysystemd/reader.pyx":363
 *     @contextmanager
 *     def _lock(self, opening=False):
 *         if self.closed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:
 */

#line 363 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":365
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:
 */

#line 365 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_locked); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)

#line 365 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 365 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)

#line 365 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 365 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_2)) {

    /* "cysystemd/reader.pyx":366
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")             # <<<<<<<<<<<<<<
 *         elif opening and self.state != READER_NULL:
 *             raise RuntimeError("Can't reopen opened reader")
 */

#line 366 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)

#line 366 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 366 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 366 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 366 "cysystemd/reader.pyx"
    __PYX_ERR(0, 366, __pyx_L1_error)

    /* "cysystemd/reader.pyx":365
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:
 */

#line 365 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":367
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Can't reopen opened reader")
 * 
 */

#line 367 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_opening); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 367, __pyx_L1_error)

#line 367 "cysystemd/reader.pyx"
  if (__pyx_t_3) {

#line 367 "cysystemd/reader.pyx"
  } else {

#line 367 "cysystemd/reader.pyx"
    __pyx_t_2 = __pyx_t_3;

#line 367 "cysystemd/reader.pyx"
    goto __pyx_L5_bool_binop_done;

#line 367 "cysystemd/reader.pyx"
  }

#line 367 "cysystemd/reader.pyx"
  __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_self->state != __pyx_e_9cysystemd_6reader_READER_NULL) != 0);

#line 367 "cysystemd/reader.pyx"
  __pyx_t_2 = __pyx_t_3;

#line 367 "cysystemd/reader.pyx"
  __pyx_L5_bool_binop_done:;

#line 367 "cysystemd/reader.pyx"
  if (unlikely(__pyx_t_2)) {

    /* "cysystemd/reader.pyx":368
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:
 *             raise RuntimeError("Can't reopen opened reader")             # <<<<<<<<<<<<<<
 * 
 *         self.state = READER_LOCKED
 */

#line 368 "cysystemd/reader.pyx"
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)

#line 368 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 368 "cysystemd/reader.pyx"
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 368 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 368 "cysystemd/reader.pyx"
    __PYX_ERR(0, 368, __pyx_L1_error)

    /* "cysystemd/reader.pyx":367
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Can't reopen opened reader")
 * 
 */

#line 367 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":370
 *             raise RuntimeError("Can't reopen opened reader")
 * 
 *         self.state = READER_LOCKED             # <<<<<<<<<<<<<<
 * 
 *         try:
 */

#line 370 "cysystemd/reader.pyx"
  __pyx_cur_scope->__pyx_v_self->state = __pyx_e_9cysystemd_6reader_READER_LOCKED;

  /* "cysystemd/reader.pyx":372
 *         self.state = READER_LOCKED
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             yield
 *         finally:
 */

#line 372 "cysystemd/reader.pyx"
  /*try:*/ {

    /* "cysystemd/reader.pyx":373
 * 
 *         try:
 *             yield             # <<<<<<<<<<<<<<
 *         finally:
 *             self.state = READER_OPENED
 */

#line 373 "cysystemd/reader.pyx"
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 373 "cysystemd/reader.pyx"
    __Pyx_XGIVEREF(__pyx_r);

#line 373 "cysystemd/reader.pyx"
    __Pyx_RefNannyFinishContext();

#line 373 "cysystemd/reader.pyx"
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);

#line 373 "cysystemd/reader.pyx"
    /* return from generator, yielding value */

#line 373 "cysystemd/reader.pyx"
    __pyx_generator->resume_label = 1;

#line 373 "cysystemd/reader.pyx"
    return __pyx_r;

#line 373 "cysystemd/reader.pyx"
    __pyx_L10_resume_from_yield:;

#line 373 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 373, __pyx_L8_error)

#line 373 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":375
 *             yield
 *         finally:
 *             self.state = READER_OPENED             # <<<<<<<<<<<<<<
 * 
 *     def seek_head(self):
 */

#line 375 "cysystemd/reader.pyx"
  /*finally:*/ {

#line 375 "cysystemd/reader.pyx"
    /*normal exit:*/{

#line 375 "cysystemd/reader.pyx"
      __pyx_cur_scope->__pyx_v_self->state = __pyx_e_9cysystemd_6reader_READER_OPENED;

#line 375 "cysystemd/reader.pyx"
      goto __pyx_L9;

#line 375 "cysystemd/reader.pyx"
    }

#line 375 "cysystemd/reader.pyx"
    __pyx_L8_error:;

#line 375 "cysystemd/reader.pyx"
    /*exception exit:*/{

#line 375 "cysystemd/reader.pyx"
      __Pyx_PyThreadState_assign

#line 375 "cysystemd/reader.pyx"
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;

#line 375 "cysystemd/reader.pyx"
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 375 "cysystemd/reader.pyx"
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);

#line 375 "cysystemd/reader.pyx"
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_7);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_8);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_9);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_10);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_11);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGOTREF(__pyx_t_12);

#line 375 "cysystemd/reader.pyx"
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;

#line 375 "cysystemd/reader.pyx"
      {

#line 375 "cysystemd/reader.pyx"
        __pyx_cur_scope->__pyx_v_self->state = __pyx_e_9cysystemd_6reader_READER_OPENED;

#line 375 "cysystemd/reader.pyx"
      }

#line 375 "cysystemd/reader.pyx"
      if (PY_MAJOR_VERSION >= 3) {

#line 375 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_10);

#line 375 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_11);

#line 375 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_12);

#line 375 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);

#line 375 "cysystemd/reader.pyx"
      }

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_7);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_8);

#line 375 "cysystemd/reader.pyx"
      __Pyx_XGIVEREF(__pyx_t_9);

#line 375 "cysystemd/reader.pyx"
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);

#line 375 "cysystemd/reader.pyx"
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;

#line 375 "cysystemd/reader.pyx"
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;

#line 375 "cysystemd/reader.pyx"
      goto __pyx_L1_error;

#line 375 "cysystemd/reader.pyx"
    }

#line 375 "cysystemd/reader.pyx"
    __pyx_L9:;

#line 375 "cysystemd/reader.pyx"
  }

#line 375 "cysystemd/reader.pyx"
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "cysystemd/reader.pyx":362
 * 
 *     @contextmanager
 *     def _lock(self, opening=False):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 */

#line 362 "cysystemd/reader.pyx"


#line 362 "cysystemd/reader.pyx"
  /* function exit code */

#line 362 "cysystemd/reader.pyx"
  PyErr_SetNone(PyExc_StopIteration);

#line 362 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 362 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 362 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 362 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("_lock", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 362 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 362 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;

#line 362 "cysystemd/reader.pyx"
  #if !CYTHON_USE_EXC_INFO_STACK

#line 362 "cysystemd/reader.pyx"
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);

#line 362 "cysystemd/reader.pyx"
  #endif

#line 362 "cysystemd/reader.pyx"
  __pyx_generator->resume_label = -1;

#line 362 "cysystemd/reader.pyx"
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);

#line 362 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 362 "cysystemd/reader.pyx"
  return __pyx_r;

#line 362 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":377
 *             self.state = READER_OPENED
 * 
 *     def seek_head(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 377 "cysystemd/reader.pyx"


#line 377 "cysystemd/reader.pyx"
/* Python wrapper */

#line 377 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_12seek_head(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 377 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_12seek_head(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_head (wrapper)", 0);
  __pyx_r = 
#line 377 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_11seek_head(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 377 "cysystemd/reader.pyx"


#line 377 "cysystemd/reader.pyx"
  /* function exit code */

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 377 "cysystemd/reader.pyx"
  return __pyx_r;

#line 377 "cysystemd/reader.pyx"
}

#line 377 "cysystemd/reader.pyx"


#line 377 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_11seek_head(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {
  int __pyx_v_result
#line 377 "cysystemd/reader.pyx"
;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 377 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 377 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 377 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 377 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_head", 0);

  /* "cysystemd/reader.pyx":380
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_head(self.context)
 * 
 */

#line 380 "cysystemd/reader.pyx"
  /*with:*/ {

#line 380 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)

#line 380 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 380 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 380 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 380 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 380 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 380 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 380 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 380 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 380 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 380 "cysystemd/reader.pyx"
      }

#line 380 "cysystemd/reader.pyx"
    }

#line 380 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 380 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 380 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)

#line 380 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 380 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 380 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)

#line 380 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 380 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L3_error)

#line 380 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 380 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 380 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 380 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 380 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 380 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 380 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 380 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 380 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 380 "cysystemd/reader.pyx"
      }

#line 380 "cysystemd/reader.pyx"
    }

#line 380 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 380 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 380 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L3_error)

#line 380 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 380 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 380 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 380 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 380 "cysystemd/reader.pyx"
    /*try:*/ {

#line 380 "cysystemd/reader.pyx"
      {

#line 380 "cysystemd/reader.pyx"
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */

#line 380 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":381
 * 
 *         with self._lock():
 *             result = sd_journal_seek_head(self.context)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 381 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_seek_head(__pyx_v_self->context);

          /* "cysystemd/reader.pyx":380
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_head(self.context)
 * 
 */

#line 380 "cysystemd/reader.pyx"
        }

#line 380 "cysystemd/reader.pyx"
      }

#line 380 "cysystemd/reader.pyx"
    }

#line 380 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 380 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 380 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 380 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 380 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 380 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 380, __pyx_L1_error)

#line 380 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 380 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 380 "cysystemd/reader.pyx"
        }

#line 380 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 380 "cysystemd/reader.pyx"
      }

#line 380 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 380 "cysystemd/reader.pyx"
    }

#line 380 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 380 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 380 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 380 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 380 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 380 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":383
 *             result = sd_journal_seek_head(self.context)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *         return True
 */

#line 383 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)

#line 383 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 383 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)

#line 383 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 383 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 383 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 383 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 383 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 383 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 383 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 383 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 383 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 383 "cysystemd/reader.pyx"
    }

#line 383 "cysystemd/reader.pyx"
  }

#line 383 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 383 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 383 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 383 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)

#line 383 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 383 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 383 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":385
 *         check_error_code(result)
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def seek_tail(self):
 */

#line 385 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 385 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_True);

#line 385 "cysystemd/reader.pyx"
  __pyx_r = Py_True;

#line 385 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":377
 *             self.state = READER_OPENED
 * 
 *     def seek_head(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 377 "cysystemd/reader.pyx"


#line 377 "cysystemd/reader.pyx"
  /* function exit code */

#line 377 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 377 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 377 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 377 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 377 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 377 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_head", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 377 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 377 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 377 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 377 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 377 "cysystemd/reader.pyx"
  return __pyx_r;

#line 377 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":387
 *         return True
 * 
 *     def seek_tail(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 387 "cysystemd/reader.pyx"


#line 387 "cysystemd/reader.pyx"
/* Python wrapper */

#line 387 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_14seek_tail(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 387 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_14seek_tail(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_tail (wrapper)", 0);
  __pyx_r = 
#line 387 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_13seek_tail(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 387 "cysystemd/reader.pyx"


#line 387 "cysystemd/reader.pyx"
  /* function exit code */

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 387 "cysystemd/reader.pyx"
  return __pyx_r;

#line 387 "cysystemd/reader.pyx"
}

#line 387 "cysystemd/reader.pyx"


#line 387 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_13seek_tail(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {
  int __pyx_v_result
#line 387 "cysystemd/reader.pyx"
;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 387 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 387 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 387 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 387 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_tail", 0);

  /* "cysystemd/reader.pyx":390
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_tail(self.context)
 * 
 */

#line 390 "cysystemd/reader.pyx"
  /*with:*/ {

#line 390 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)

#line 390 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 390 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 390 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 390 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 390 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 390 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 390 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 390 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 390 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 390 "cysystemd/reader.pyx"
      }

#line 390 "cysystemd/reader.pyx"
    }

#line 390 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 390 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 390 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)

#line 390 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 390 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 390 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 390, __pyx_L1_error)

#line 390 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 390 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L3_error)

#line 390 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 390 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 390 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 390 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 390 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 390 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 390 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 390 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 390 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 390 "cysystemd/reader.pyx"
      }

#line 390 "cysystemd/reader.pyx"
    }

#line 390 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 390 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 390 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L3_error)

#line 390 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 390 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 390 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 390 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 390 "cysystemd/reader.pyx"
    /*try:*/ {

#line 390 "cysystemd/reader.pyx"
      {

#line 390 "cysystemd/reader.pyx"
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */

#line 390 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":391
 * 
 *         with self._lock():
 *             result = sd_journal_seek_tail(self.context)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 391 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_seek_tail(__pyx_v_self->context);

          /* "cysystemd/reader.pyx":390
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_tail(self.context)
 * 
 */

#line 390 "cysystemd/reader.pyx"
        }

#line 390 "cysystemd/reader.pyx"
      }

#line 390 "cysystemd/reader.pyx"
    }

#line 390 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 390 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 390 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 390 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 390 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 390 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 390, __pyx_L1_error)

#line 390 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 390 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 390 "cysystemd/reader.pyx"
        }

#line 390 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 390 "cysystemd/reader.pyx"
      }

#line 390 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 390 "cysystemd/reader.pyx"
    }

#line 390 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 390 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 390 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 390 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 390 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 390 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":393
 *             result = sd_journal_seek_tail(self.context)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

#line 393 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)

#line 393 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 393 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error)

#line 393 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 393 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 393 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 393 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 393 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 393 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 393 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 393 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 393 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 393 "cysystemd/reader.pyx"
    }

#line 393 "cysystemd/reader.pyx"
  }

#line 393 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 393 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 393 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 393 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)

#line 393 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 393 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 393 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":394
 * 
 *         check_error_code(result)
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def seek_monotonic_usec(self, boot_id: UUID, uint64_t usec):
 */

#line 394 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 394 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_True);

#line 394 "cysystemd/reader.pyx"
  __pyx_r = Py_True;

#line 394 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":387
 *         return True
 * 
 *     def seek_tail(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 387 "cysystemd/reader.pyx"


#line 387 "cysystemd/reader.pyx"
  /* function exit code */

#line 387 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 387 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 387 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 387 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 387 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 387 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_tail", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 387 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 387 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 387 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 387 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 387 "cysystemd/reader.pyx"
  return __pyx_r;

#line 387 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":396
 *         return True
 * 
 *     def seek_monotonic_usec(self, boot_id: UUID, uint64_t usec):             # <<<<<<<<<<<<<<
 *         cdef sd_id128_t cboot_id
 *         cdef int result
 */

#line 396 "cysystemd/reader.pyx"


#line 396 "cysystemd/reader.pyx"
/* Python wrapper */

#line 396 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_16seek_monotonic_usec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 396 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_16seek_monotonic_usec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_boot_id = 0
#line 396 "cysystemd/reader.pyx"
;
  uint64_t __pyx_v_usec
#line 396 "cysystemd/reader.pyx"
;

#line 396 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 396 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 396 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_monotonic_usec (wrapper)", 0);

#line 396 "cysystemd/reader.pyx"
  {

#line 396 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_boot_id,&__pyx_n_s_usec,0};

#line 396 "cysystemd/reader.pyx"
    PyObject* values[2] = {0,0};

#line 396 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 396 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 396 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 396 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  2: 
#line 396 "cysystemd/reader.pyx"
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 396 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  1: 
#line 396 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 396 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 396 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 396 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 396 "cysystemd/reader.pyx"
      }

#line 396 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 396 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 396 "cysystemd/reader.pyx"
        case  0:

#line 396 "cysystemd/reader.pyx"
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boot_id)) != 0)) kw_args--;
        else 
#line 396 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 396 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 396 "cysystemd/reader.pyx"
        case  1:

#line 396 "cysystemd/reader.pyx"
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_usec)) != 0)) kw_args--;

#line 396 "cysystemd/reader.pyx"
        else {
          __Pyx_RaiseArgtupleInvalid("seek_monotonic_usec", 1, 2, 2, 1); 
#line 396 "cysystemd/reader.pyx"
__PYX_ERR(0, 396, __pyx_L3_error)

#line 396 "cysystemd/reader.pyx"
        }

#line 396 "cysystemd/reader.pyx"
      }

#line 396 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 396 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek_monotonic_usec") < 0)) __PYX_ERR(0, 396, __pyx_L3_error)

#line 396 "cysystemd/reader.pyx"
      }

#line 396 "cysystemd/reader.pyx"
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {

#line 396 "cysystemd/reader.pyx"
      goto __pyx_L5_argtuple_error;

#line 396 "cysystemd/reader.pyx"
    } else {

#line 396 "cysystemd/reader.pyx"
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 396 "cysystemd/reader.pyx"
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 396 "cysystemd/reader.pyx"
    }

#line 396 "cysystemd/reader.pyx"
    __pyx_v_boot_id = values[0];

#line 396 "cysystemd/reader.pyx"
    __pyx_v_usec = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_usec == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L3_error)

#line 396 "cysystemd/reader.pyx"
  }

#line 396 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 396 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("seek_monotonic_usec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); 
#line 396 "cysystemd/reader.pyx"
__PYX_ERR(0, 396, __pyx_L3_error)

#line 396 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 396 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_monotonic_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 396 "cysystemd/reader.pyx"
  return NULL;

#line 396 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 396 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_15seek_monotonic_usec(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_boot_id, __pyx_v_usec);

#line 396 "cysystemd/reader.pyx"


#line 396 "cysystemd/reader.pyx"
  /* function exit code */

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 396 "cysystemd/reader.pyx"
  return __pyx_r;

#line 396 "cysystemd/reader.pyx"
}

#line 396 "cysystemd/reader.pyx"


#line 396 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_15seek_monotonic_usec(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_boot_id, uint64_t __pyx_v_usec) {
  sd_id128_t __pyx_v_cboot_id
#line 396 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 396 "cysystemd/reader.pyx"
;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 396 "cysystemd/reader.pyx"
  uint8_t __pyx_t_2[16];

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 396 "cysystemd/reader.pyx"
  PyObject *__pyx_t_9 = NULL;

#line 396 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 396 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 396 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_monotonic_usec", 0);

  /* "cysystemd/reader.pyx":400
 *         cdef int result
 * 
 *         cboot_id.bytes = boot_id.bytes             # <<<<<<<<<<<<<<
 * 
 *         with self._lock():
 */

#line 400 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_boot_id, __pyx_n_s_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)

#line 400 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 400 "cysystemd/reader.pyx"
  if (unlikely(__Pyx_carray_from_py_uint8_t(__pyx_t_1, __pyx_t_2, 16) < 0)) __PYX_ERR(0, 400, __pyx_L1_error)

#line 400 "cysystemd/reader.pyx"
  memcpy(&(__pyx_v_cboot_id.bytes[0]), __pyx_t_2, sizeof(__pyx_v_cboot_id.bytes[0]) * (16));

#line 400 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":402
 *         cboot_id.bytes = boot_id.bytes
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_monotonic_usec(self.context, cboot_id, usec)
 * 
 */

#line 402 "cysystemd/reader.pyx"
  /*with:*/ {

#line 402 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)

#line 402 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 402 "cysystemd/reader.pyx"
    __pyx_t_4 = NULL;

#line 402 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 402 "cysystemd/reader.pyx"
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 402 "cysystemd/reader.pyx"
      if (likely(__pyx_t_4)) {

#line 402 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 402 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_4);

#line 402 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 402 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 402 "cysystemd/reader.pyx"
      }

#line 402 "cysystemd/reader.pyx"
    }

#line 402 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 402 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 402 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)

#line 402 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 402 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 402 "cysystemd/reader.pyx"
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)

#line 402 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_5);

#line 402 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L3_error)

#line 402 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 402 "cysystemd/reader.pyx"
    __pyx_t_6 = NULL;

#line 402 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {

#line 402 "cysystemd/reader.pyx"
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);

#line 402 "cysystemd/reader.pyx"
      if (likely(__pyx_t_6)) {

#line 402 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);

#line 402 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_6);

#line 402 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 402 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_4, function);

#line 402 "cysystemd/reader.pyx"
      }

#line 402 "cysystemd/reader.pyx"
    }

#line 402 "cysystemd/reader.pyx"
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);

#line 402 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 402 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L3_error)

#line 402 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 402 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 402 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 402 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 402 "cysystemd/reader.pyx"
    /*try:*/ {

#line 402 "cysystemd/reader.pyx"
      {

#line 402 "cysystemd/reader.pyx"
        (void)__pyx_t_7; (void)__pyx_t_8; (void)__pyx_t_9; /* mark used */

#line 402 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":403
 * 
 *         with self._lock():
 *             result = sd_journal_seek_monotonic_usec(self.context, cboot_id, usec)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 403 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_seek_monotonic_usec(__pyx_v_self->context, __pyx_v_cboot_id, __pyx_v_usec);

          /* "cysystemd/reader.pyx":402
 *         cboot_id.bytes = boot_id.bytes
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_monotonic_usec(self.context, cboot_id, usec)
 * 
 */

#line 402 "cysystemd/reader.pyx"
        }

#line 402 "cysystemd/reader.pyx"
      }

#line 402 "cysystemd/reader.pyx"
    }

#line 402 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 402 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 402 "cysystemd/reader.pyx"
        if (__pyx_t_5) {

#line 402 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__14, NULL);

#line 402 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 402 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 402, __pyx_L1_error)

#line 402 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_9);

#line 402 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

#line 402 "cysystemd/reader.pyx"
        }

#line 402 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 402 "cysystemd/reader.pyx"
      }

#line 402 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 402 "cysystemd/reader.pyx"
    }

#line 402 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 402 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 402 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 402 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 402 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 402 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":405
 *             result = sd_journal_seek_monotonic_usec(self.context, cboot_id, usec)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

#line 405 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error)

#line 405 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 405 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)

#line 405 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 405 "cysystemd/reader.pyx"
  __pyx_t_6 = NULL;

#line 405 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 405 "cysystemd/reader.pyx"
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);

#line 405 "cysystemd/reader.pyx"
    if (likely(__pyx_t_6)) {

#line 405 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 405 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_6);

#line 405 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 405 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 405 "cysystemd/reader.pyx"
    }

#line 405 "cysystemd/reader.pyx"
  }

#line 405 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);

#line 405 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 405 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 405 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)

#line 405 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 405 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 405 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":406
 * 
 *         check_error_code(result)
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def seek_realtime_usec(self, uint64_t usec):
 */

#line 406 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 406 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_True);

#line 406 "cysystemd/reader.pyx"
  __pyx_r = Py_True;

#line 406 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":396
 *         return True
 * 
 *     def seek_monotonic_usec(self, boot_id: UUID, uint64_t usec):             # <<<<<<<<<<<<<<
 *         cdef sd_id128_t cboot_id
 *         cdef int result
 */

#line 396 "cysystemd/reader.pyx"


#line 396 "cysystemd/reader.pyx"
  /* function exit code */

#line 396 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 396 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 396 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 396 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 396 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 396 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_monotonic_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 396 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 396 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 396 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 396 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 396 "cysystemd/reader.pyx"
  return __pyx_r;

#line 396 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":408
 *         return True
 * 
 *     def seek_realtime_usec(self, uint64_t usec):             # <<<<<<<<<<<<<<
 *         cdef uint64_t cusec = usec
 *         cdef int result
 */

#line 408 "cysystemd/reader.pyx"


#line 408 "cysystemd/reader.pyx"
/* Python wrapper */

#line 408 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_18seek_realtime_usec(PyObject *__pyx_v_self, PyObject *__pyx_arg_usec); /*proto*/

#line 408 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_18seek_realtime_usec(PyObject *__pyx_v_self, PyObject *__pyx_arg_usec) {
  uint64_t __pyx_v_usec
#line 408 "cysystemd/reader.pyx"
;

#line 408 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 408 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 408 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_realtime_usec (wrapper)", 0);

#line 408 "cysystemd/reader.pyx"
  assert(__pyx_arg_usec); {

#line 408 "cysystemd/reader.pyx"
    __pyx_v_usec = __Pyx_PyInt_As_uint64_t(__pyx_arg_usec); if (unlikely((__pyx_v_usec == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L3_error)

#line 408 "cysystemd/reader.pyx"
  }

#line 408 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 408 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 408 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_realtime_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 408 "cysystemd/reader.pyx"
  return NULL;

#line 408 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 408 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_17seek_realtime_usec(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((uint64_t)__pyx_v_usec));

#line 408 "cysystemd/reader.pyx"


#line 408 "cysystemd/reader.pyx"
  /* function exit code */

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 408 "cysystemd/reader.pyx"
  return __pyx_r;

#line 408 "cysystemd/reader.pyx"
}

#line 408 "cysystemd/reader.pyx"


#line 408 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_17seek_realtime_usec(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_usec) {
  uint64_t __pyx_v_cusec
#line 408 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 408 "cysystemd/reader.pyx"
;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 408 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 408 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 408 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 408 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_realtime_usec", 0);

  /* "cysystemd/reader.pyx":409
 * 
 *     def seek_realtime_usec(self, uint64_t usec):
 *         cdef uint64_t cusec = usec             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 409 "cysystemd/reader.pyx"
  __pyx_v_cusec = __pyx_v_usec;

  /* "cysystemd/reader.pyx":412
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_realtime_usec(self.context, cusec)
 * 
 */

#line 412 "cysystemd/reader.pyx"
  /*with:*/ {

#line 412 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)

#line 412 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 412 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 412 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 412 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 412 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 412 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 412 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 412 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 412 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 412 "cysystemd/reader.pyx"
      }

#line 412 "cysystemd/reader.pyx"
    }

#line 412 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 412 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 412 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)

#line 412 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 412 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 412 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)

#line 412 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 412 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L3_error)

#line 412 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 412 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 412 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 412 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 412 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 412 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 412 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 412 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 412 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 412 "cysystemd/reader.pyx"
      }

#line 412 "cysystemd/reader.pyx"
    }

#line 412 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 412 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 412 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L3_error)

#line 412 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 412 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 412 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 412 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 412 "cysystemd/reader.pyx"
    /*try:*/ {

#line 412 "cysystemd/reader.pyx"
      {

#line 412 "cysystemd/reader.pyx"
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */

#line 412 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":413
 * 
 *         with self._lock():
 *             result = sd_journal_seek_realtime_usec(self.context, cusec)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 413 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_seek_realtime_usec(__pyx_v_self->context, __pyx_v_cusec);

          /* "cysystemd/reader.pyx":412
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_realtime_usec(self.context, cusec)
 * 
 */

#line 412 "cysystemd/reader.pyx"
        }

#line 412 "cysystemd/reader.pyx"
      }

#line 412 "cysystemd/reader.pyx"
    }

#line 412 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 412 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 412 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 412 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 412 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 412 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)

#line 412 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 412 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 412 "cysystemd/reader.pyx"
        }

#line 412 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 412 "cysystemd/reader.pyx"
      }

#line 412 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 412 "cysystemd/reader.pyx"
    }

#line 412 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 412 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 412 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 412 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 412 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 412 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":415
 *             result = sd_journal_seek_realtime_usec(self.context, cusec)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

#line 415 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)

#line 415 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 415 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)

#line 415 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 415 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 415 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 415 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 415 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 415 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 415 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 415 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 415 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 415 "cysystemd/reader.pyx"
    }

#line 415 "cysystemd/reader.pyx"
  }

#line 415 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 415 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 415 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 415 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)

#line 415 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 415 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 415 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":416
 * 
 *         check_error_code(result)
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def seek_cursor(self, bytes cursor):
 */

#line 416 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 416 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_True);

#line 416 "cysystemd/reader.pyx"
  __pyx_r = Py_True;

#line 416 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":408
 *         return True
 * 
 *     def seek_realtime_usec(self, uint64_t usec):             # <<<<<<<<<<<<<<
 *         cdef uint64_t cusec = usec
 *         cdef int result
 */

#line 408 "cysystemd/reader.pyx"


#line 408 "cysystemd/reader.pyx"
  /* function exit code */

#line 408 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 408 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 408 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 408 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 408 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 408 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_realtime_usec", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 408 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 408 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 408 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 408 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 408 "cysystemd/reader.pyx"
  return __pyx_r;

#line 408 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":418
 *         return True
 * 
 *     def seek_cursor(self, bytes cursor):             # <<<<<<<<<<<<<<
 *         cdef char* ccursor = cursor
 *         cdef int result
 */

#line 418 "cysystemd/reader.pyx"


#line 418 "cysystemd/reader.pyx"
/* Python wrapper */

#line 418 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_20seek_cursor(PyObject *__pyx_v_self, PyObject *__pyx_v_cursor); /*proto*/

#line 418 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_20seek_cursor(PyObject *__pyx_v_self, PyObject *__pyx_v_cursor) {

#line 418 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 418 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 418 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_cursor (wrapper)", 0);

#line 418 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cursor), (&PyBytes_Type), 1, "cursor", 1))) __PYX_ERR(0, 418, __pyx_L1_error)
  __pyx_r = 
#line 418 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_19seek_cursor(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((PyObject*)__pyx_v_cursor));

#line 418 "cysystemd/reader.pyx"


#line 418 "cysystemd/reader.pyx"
  /* function exit code */

#line 418 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 418 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 418 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 418 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 418 "cysystemd/reader.pyx"
  return __pyx_r;

#line 418 "cysystemd/reader.pyx"
}

#line 418 "cysystemd/reader.pyx"


#line 418 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_19seek_cursor(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_cursor) {
  char *__pyx_v_ccursor
#line 418 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 418 "cysystemd/reader.pyx"
;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 418 "cysystemd/reader.pyx"
  char *__pyx_t_1;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 418 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 418 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 418 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 418 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("seek_cursor", 0);

  /* "cysystemd/reader.pyx":419
 * 
 *     def seek_cursor(self, bytes cursor):
 *         cdef char* ccursor = cursor             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 419 "cysystemd/reader.pyx"
  if (unlikely(__pyx_v_cursor == Py_None)) {

#line 419 "cysystemd/reader.pyx"
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");

#line 419 "cysystemd/reader.pyx"
    __PYX_ERR(0, 419, __pyx_L1_error)

#line 419 "cysystemd/reader.pyx"
  }

#line 419 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_cursor); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)

#line 419 "cysystemd/reader.pyx"
  __pyx_v_ccursor = __pyx_t_1;

  /* "cysystemd/reader.pyx":422
 *         cdef int result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_cursor(self.context, ccursor)
 * 
 */

#line 422 "cysystemd/reader.pyx"
  {

#line 422 "cysystemd/reader.pyx"
      #ifdef WITH_THREAD

#line 422 "cysystemd/reader.pyx"
      PyThreadState *_save;

#line 422 "cysystemd/reader.pyx"
      Py_UNBLOCK_THREADS

#line 422 "cysystemd/reader.pyx"
      __Pyx_FastGIL_Remember();

#line 422 "cysystemd/reader.pyx"
      #endif

#line 422 "cysystemd/reader.pyx"
      /*try:*/ {

        /* "cysystemd/reader.pyx":423
 * 
 *         with nogil:
 *             result = sd_journal_seek_cursor(self.context, ccursor)             # <<<<<<<<<<<<<<
 * 
 *         check_error_code(result)
 */

#line 423 "cysystemd/reader.pyx"
        __pyx_v_result = sd_journal_seek_cursor(__pyx_v_self->context, __pyx_v_ccursor);

#line 423 "cysystemd/reader.pyx"
      }

      /* "cysystemd/reader.pyx":422
 *         cdef int result
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_seek_cursor(self.context, ccursor)
 * 
 */

#line 422 "cysystemd/reader.pyx"
      /*finally:*/ {

#line 422 "cysystemd/reader.pyx"
        /*normal exit:*/{

#line 422 "cysystemd/reader.pyx"
          #ifdef WITH_THREAD

#line 422 "cysystemd/reader.pyx"
          __Pyx_FastGIL_Forget();

#line 422 "cysystemd/reader.pyx"
          Py_BLOCK_THREADS

#line 422 "cysystemd/reader.pyx"
          #endif

#line 422 "cysystemd/reader.pyx"
          goto __pyx_L5;

#line 422 "cysystemd/reader.pyx"
        }

#line 422 "cysystemd/reader.pyx"
        __pyx_L5:;

#line 422 "cysystemd/reader.pyx"
      }

#line 422 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":425
 *             result = sd_journal_seek_cursor(self.context, ccursor)
 * 
 *         check_error_code(result)             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

#line 425 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)

#line 425 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 425 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)

#line 425 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 425 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 425 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 425 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 425 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 425 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 425 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 425 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 425 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 425 "cysystemd/reader.pyx"
    }

#line 425 "cysystemd/reader.pyx"
  }

#line 425 "cysystemd/reader.pyx"
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);

#line 425 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 425 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 425 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)

#line 425 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 425 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 425 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":426
 * 
 *         check_error_code(result)
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):
 */

#line 426 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 426 "cysystemd/reader.pyx"
  __Pyx_INCREF(Py_True);

#line 426 "cysystemd/reader.pyx"
  __pyx_r = Py_True;

#line 426 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":418
 *         return True
 * 
 *     def seek_cursor(self, bytes cursor):             # <<<<<<<<<<<<<<
 *         cdef char* ccursor = cursor
 *         cdef int result
 */

#line 418 "cysystemd/reader.pyx"


#line 418 "cysystemd/reader.pyx"
  /* function exit code */

#line 418 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 418 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 418 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 418 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 418 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 418 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.seek_cursor", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 418 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 418 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 418 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 418 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 418 "cysystemd/reader.pyx"
  return __pyx_r;

#line 418 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":428
 *         return True
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout_usec = timeout * 1000000
 *         cdef int result
 */

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_22wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 428 "cysystemd/reader.pyx"
static PyObject *__pyx_f_9cysystemd_6reader_13JournalReader_wait(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait *__pyx_optional_args) {

#line 428 "cysystemd/reader.pyx"
  uint32_t __pyx_v_timeout = __pyx_k__18;
  uint64_t __pyx_v_timeout_usec
#line 428 "cysystemd/reader.pyx"
;
  int __pyx_v_result
#line 428 "cysystemd/reader.pyx"
;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_9 = NULL;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 428 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 428 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 428 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("wait", 0);

#line 428 "cysystemd/reader.pyx"
  if (__pyx_optional_args) {

#line 428 "cysystemd/reader.pyx"
    if (__pyx_optional_args->__pyx_n > 0) {

#line 428 "cysystemd/reader.pyx"
      __pyx_v_timeout = __pyx_optional_args->timeout;

#line 428 "cysystemd/reader.pyx"
    }

#line 428 "cysystemd/reader.pyx"
  }

#line 428 "cysystemd/reader.pyx"
  /* Check if called by wrapper */

#line 428 "cysystemd/reader.pyx"
  if (unlikely(__pyx_skip_dispatch)) ;

#line 428 "cysystemd/reader.pyx"
  /* Check if overridden in Python */

#line 428 "cysystemd/reader.pyx"
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {

#line 428 "cysystemd/reader.pyx"
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 428 "cysystemd/reader.pyx"
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 428 "cysystemd/reader.pyx"
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {

#line 428 "cysystemd/reader.pyx"
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 428 "cysystemd/reader.pyx"
      #endif

#line 428 "cysystemd/reader.pyx"
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
      __Pyx_GOTREF(__pyx_t_1);

#line 428 "cysystemd/reader.pyx"
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9cysystemd_6reader_13JournalReader_22wait)) {

#line 428 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_r);

#line 428 "cysystemd/reader.pyx"
        __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_timeout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_3);

#line 428 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
#line 428 "cysystemd/reader.pyx"
__pyx_t_5 = NULL;

#line 428 "cysystemd/reader.pyx"
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {

#line 428 "cysystemd/reader.pyx"
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);

#line 428 "cysystemd/reader.pyx"
          if (likely(__pyx_t_5)) {

#line 428 "cysystemd/reader.pyx"
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);

#line 428 "cysystemd/reader.pyx"
            __Pyx_INCREF(__pyx_t_5);

#line 428 "cysystemd/reader.pyx"
            __Pyx_INCREF(function);

#line 428 "cysystemd/reader.pyx"
            __Pyx_DECREF_SET(__pyx_t_4, function);

#line 428 "cysystemd/reader.pyx"
          }

#line 428 "cysystemd/reader.pyx"
        }

#line 428 "cysystemd/reader.pyx"
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);

#line 428 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 428 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 428 "cysystemd/reader.pyx"
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
        __Pyx_GOTREF(__pyx_t_2);

#line 428 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 428 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_2;

#line 428 "cysystemd/reader.pyx"
        __pyx_t_2 = 0;

#line 428 "cysystemd/reader.pyx"
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 428 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 428 "cysystemd/reader.pyx"
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));

#line 428 "cysystemd/reader.pyx"
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));

#line 428 "cysystemd/reader.pyx"
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {

#line 428 "cysystemd/reader.pyx"
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
      #endif

#line 428 "cysystemd/reader.pyx"
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 428 "cysystemd/reader.pyx"
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS

#line 428 "cysystemd/reader.pyx"
    }

#line 428 "cysystemd/reader.pyx"
    #endif

#line 428 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":429
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):
 *         cdef uint64_t timeout_usec = timeout * 1000000             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 429 "cysystemd/reader.pyx"
  __pyx_v_timeout_usec = (__pyx_v_timeout * 0xF4240);

  /* "cysystemd/reader.pyx":432
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 result = sd_journal_wait(self.context, timeout_usec)
 */

#line 432 "cysystemd/reader.pyx"
  /*with:*/ {

#line 432 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)

#line 432 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 432 "cysystemd/reader.pyx"
    __pyx_t_4 = NULL;

#line 432 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 432 "cysystemd/reader.pyx"
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 432 "cysystemd/reader.pyx"
      if (likely(__pyx_t_4)) {

#line 432 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 432 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_4);

#line 432 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 432 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 432 "cysystemd/reader.pyx"
      }

#line 432 "cysystemd/reader.pyx"
    }

#line 432 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 432 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 432 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)

#line 432 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 432 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 432 "cysystemd/reader.pyx"
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)

#line 432 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_6);

#line 432 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L3_error)

#line 432 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 432 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 432 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {

#line 432 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);

#line 432 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 432 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);

#line 432 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 432 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 432 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_4, function);

#line 432 "cysystemd/reader.pyx"
      }

#line 432 "cysystemd/reader.pyx"
    }

#line 432 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);

#line 432 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 432 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L3_error)

#line 432 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 432 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 432 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 432 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 432 "cysystemd/reader.pyx"
    /*try:*/ {

#line 432 "cysystemd/reader.pyx"
      {

#line 432 "cysystemd/reader.pyx"
        (void)__pyx_t_7; (void)__pyx_t_8; (void)__pyx_t_9; /* mark used */

#line 432 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":433
 * 
 *         with self._lock():
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_wait(self.context, timeout_usec)
 * 
 */

#line 433 "cysystemd/reader.pyx"
          {

#line 433 "cysystemd/reader.pyx"
              #ifdef WITH_THREAD

#line 433 "cysystemd/reader.pyx"
              PyThreadState *_save;

#line 433 "cysystemd/reader.pyx"
              Py_UNBLOCK_THREADS

#line 433 "cysystemd/reader.pyx"
              __Pyx_FastGIL_Remember();

#line 433 "cysystemd/reader.pyx"
              #endif

#line 433 "cysystemd/reader.pyx"
              /*try:*/ {

                /* "cysystemd/reader.pyx":434
 *         with self._lock():
 *             with nogil:
 *                 result = sd_journal_wait(self.context, timeout_usec)             # <<<<<<<<<<<<<<
 * 
 *         return JournalEvent(check_error_code(result))
 */

#line 434 "cysystemd/reader.pyx"
                __pyx_v_result = sd_journal_wait(__pyx_v_self->context, __pyx_v_timeout_usec);

#line 434 "cysystemd/reader.pyx"
              }

              /* "cysystemd/reader.pyx":433
 * 
 *         with self._lock():
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_wait(self.context, timeout_usec)
 * 
 */

#line 433 "cysystemd/reader.pyx"
              /*finally:*/ {

#line 433 "cysystemd/reader.pyx"
                /*normal exit:*/{

#line 433 "cysystemd/reader.pyx"
                  #ifdef WITH_THREAD

#line 433 "cysystemd/reader.pyx"
                  __Pyx_FastGIL_Forget();

#line 433 "cysystemd/reader.pyx"
                  Py_BLOCK_THREADS

#line 433 "cysystemd/reader.pyx"
                  #endif

#line 433 "cysystemd/reader.pyx"
                  goto __pyx_L15;

#line 433 "cysystemd/reader.pyx"
                }

#line 433 "cysystemd/reader.pyx"
                __pyx_L15:;

#line 433 "cysystemd/reader.pyx"
              }

#line 433 "cysystemd/reader.pyx"
          }

          /* "cysystemd/reader.pyx":432
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 result = sd_journal_wait(self.context, timeout_usec)
 */

#line 432 "cysystemd/reader.pyx"
        }

#line 432 "cysystemd/reader.pyx"
      }

#line 432 "cysystemd/reader.pyx"
    }

#line 432 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 432 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 432 "cysystemd/reader.pyx"
        if (__pyx_t_6) {

#line 432 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__14, NULL);

#line 432 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 432 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 432, __pyx_L1_error)

#line 432 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_9);

#line 432 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

#line 432 "cysystemd/reader.pyx"
        }

#line 432 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 432 "cysystemd/reader.pyx"
      }

#line 432 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 432 "cysystemd/reader.pyx"
    }

#line 432 "cysystemd/reader.pyx"
    goto __pyx_L16;

#line 432 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 432 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 432 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 432 "cysystemd/reader.pyx"
    __pyx_L16:;

#line 432 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":436
 *                 result = sd_journal_wait(self.context, timeout_usec)
 * 
 *         return JournalEvent(check_error_code(result))             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */

#line 436 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 436 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_JournalEvent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)

#line 436 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 436 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)

#line 436 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 436 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L1_error)

#line 436 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_5);

#line 436 "cysystemd/reader.pyx"
  __pyx_t_10 = NULL;

#line 436 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 436 "cysystemd/reader.pyx"
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);

#line 436 "cysystemd/reader.pyx"
    if (likely(__pyx_t_10)) {

#line 436 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 436 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_10);

#line 436 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 436 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 436 "cysystemd/reader.pyx"
    }

#line 436 "cysystemd/reader.pyx"
  }

#line 436 "cysystemd/reader.pyx"
  __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);

#line 436 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 436 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 436 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error)

#line 436 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 436 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 436 "cysystemd/reader.pyx"
  __pyx_t_3 = NULL;

#line 436 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 436 "cysystemd/reader.pyx"
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 436 "cysystemd/reader.pyx"
    if (likely(__pyx_t_3)) {

#line 436 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 436 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_3);

#line 436 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 436 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 436 "cysystemd/reader.pyx"
    }

#line 436 "cysystemd/reader.pyx"
  }

#line 436 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);

#line 436 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 436 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 436 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)

#line 436 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 436 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 436 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 436 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 436 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":428
 *         return True
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout_usec = timeout * 1000000
 *         cdef int result
 */

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
  /* function exit code */

#line 428 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_10);

#line 428 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 428 "cysystemd/reader.pyx"
  __pyx_r = 0;

#line 428 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 428 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 428 "cysystemd/reader.pyx"
  return __pyx_r;

#line 428 "cysystemd/reader.pyx"
}

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
/* Python wrapper */

#line 428 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_22wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 428 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_22wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint32_t __pyx_v_timeout
#line 428 "cysystemd/reader.pyx"
;

#line 428 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 428 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 428 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);

#line 428 "cysystemd/reader.pyx"
  {

#line 428 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};

#line 428 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 428 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 428 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 428 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 428 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 428 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 428 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 428 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 428 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 428 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 428 "cysystemd/reader.pyx"
        case  0:

#line 428 "cysystemd/reader.pyx"
        if (kw_args > 0) {

#line 428 "cysystemd/reader.pyx"
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);

#line 428 "cysystemd/reader.pyx"
          if (value) { values[0] = value; kw_args--; }

#line 428 "cysystemd/reader.pyx"
        }

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 428 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") < 0)) __PYX_ERR(0, 428, __pyx_L3_error)

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
    } else {

#line 428 "cysystemd/reader.pyx"
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: 
#line 428 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 428 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  0: 
#line 428 "cysystemd/reader.pyx"
break;
        default: 
#line 428 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 428 "cysystemd/reader.pyx"
      }

#line 428 "cysystemd/reader.pyx"
    }

#line 428 "cysystemd/reader.pyx"
    if (values[0]) {

#line 428 "cysystemd/reader.pyx"
      __pyx_v_timeout = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_timeout == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)

#line 428 "cysystemd/reader.pyx"
    } else {

#line 428 "cysystemd/reader.pyx"
      __pyx_v_timeout = __pyx_k__18;

#line 428 "cysystemd/reader.pyx"
    }

#line 428 "cysystemd/reader.pyx"
  }

#line 428 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 428 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 428 "cysystemd/reader.pyx"
__PYX_ERR(0, 428, __pyx_L3_error)

#line 428 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 428 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 428 "cysystemd/reader.pyx"
  return NULL;

#line 428 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 428 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_21wait(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_timeout);

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
  /* function exit code */

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 428 "cysystemd/reader.pyx"
  return __pyx_r;

#line 428 "cysystemd/reader.pyx"
}

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_21wait(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint32_t __pyx_v_timeout) {

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 428 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 428 "cysystemd/reader.pyx"
  struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait __pyx_t_2;

#line 428 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 428 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 428 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("wait", 0);

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 428 "cysystemd/reader.pyx"
  __pyx_t_2.__pyx_n = 1;

#line 428 "cysystemd/reader.pyx"
  __pyx_t_2.timeout = __pyx_v_timeout;

#line 428 "cysystemd/reader.pyx"
  __pyx_t_1 = __pyx_vtabptr_9cysystemd_6reader_JournalReader->wait(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 428 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 428 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 428 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 428 "cysystemd/reader.pyx"


#line 428 "cysystemd/reader.pyx"
  /* function exit code */

#line 428 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 428 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 428 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 428 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 428 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 428 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 428 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 428 "cysystemd/reader.pyx"
  return __pyx_r;

#line 428 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":438
 *         return JournalEvent(check_error_code(result))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.next, None)
 * 
 */

#line 438 "cysystemd/reader.pyx"


#line 438 "cysystemd/reader.pyx"
/* Python wrapper */

#line 438 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_24__iter__(PyObject *__pyx_v_self); /*proto*/

#line 438 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_24__iter__(PyObject *__pyx_v_self) {

#line 438 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = 
#line 438 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_23__iter__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 438 "cysystemd/reader.pyx"


#line 438 "cysystemd/reader.pyx"
  /* function exit code */

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 438 "cysystemd/reader.pyx"
  return __pyx_r;

#line 438 "cysystemd/reader.pyx"
}

#line 438 "cysystemd/reader.pyx"


#line 438 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_23__iter__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 438 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 438 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 438 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 438 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 438 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 438 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "cysystemd/reader.pyx":439
 * 
 *     def __iter__(self):
 *         return iter(self.next, None)             # <<<<<<<<<<<<<<
 * 
 *     def next(self, uint64_t skip=0):
 */

#line 439 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 439 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)

#line 439 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 439 "cysystemd/reader.pyx"
  __pyx_t_2 = PyCallIter_New(__pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)

#line 439 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 439 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 439 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_2;

#line 439 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

#line 439 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":438
 *         return JournalEvent(check_error_code(result))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.next, None)
 * 
 */

#line 438 "cysystemd/reader.pyx"


#line 438 "cysystemd/reader.pyx"
  /* function exit code */

#line 438 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 438 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 438 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 438 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 438 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 438 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 438 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 438 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 438 "cysystemd/reader.pyx"
  return __pyx_r;

#line 438 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":441
 *         return iter(self.next, None)
 * 
 *     def next(self, uint64_t skip=0):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 441 "cysystemd/reader.pyx"


#line 441 "cysystemd/reader.pyx"
/* Python wrapper */

#line 441 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_26next(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 441 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_26next(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint64_t __pyx_v_skip
#line 441 "cysystemd/reader.pyx"
;

#line 441 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 441 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 441 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("next (wrapper)", 0);

#line 441 "cysystemd/reader.pyx"
  {

#line 441 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_skip,0};

#line 441 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 441 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 441 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 441 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 441 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 441 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 441 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 441 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 441 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 441 "cysystemd/reader.pyx"
      }

#line 441 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 441 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 441 "cysystemd/reader.pyx"
        case  0:

#line 441 "cysystemd/reader.pyx"
        if (kw_args > 0) {

#line 441 "cysystemd/reader.pyx"
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip);

#line 441 "cysystemd/reader.pyx"
          if (value) { values[0] = value; kw_args--; }

#line 441 "cysystemd/reader.pyx"
        }

#line 441 "cysystemd/reader.pyx"
      }

#line 441 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 441 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "next") < 0)) __PYX_ERR(0, 441, __pyx_L3_error)

#line 441 "cysystemd/reader.pyx"
      }

#line 441 "cysystemd/reader.pyx"
    } else {

#line 441 "cysystemd/reader.pyx"
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: 
#line 441 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 441 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  0: 
#line 441 "cysystemd/reader.pyx"
break;
        default: 
#line 441 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 441 "cysystemd/reader.pyx"
      }

#line 441 "cysystemd/reader.pyx"
    }

#line 441 "cysystemd/reader.pyx"
    if (values[0]) {

#line 441 "cysystemd/reader.pyx"
      __pyx_v_skip = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_skip == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L3_error)

#line 441 "cysystemd/reader.pyx"
    } else {

#line 441 "cysystemd/reader.pyx"
      __pyx_v_skip = ((uint64_t)0);

#line 441 "cysystemd/reader.pyx"
    }

#line 441 "cysystemd/reader.pyx"
  }

#line 441 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 441 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("next", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 441 "cysystemd/reader.pyx"
__PYX_ERR(0, 441, __pyx_L3_error)

#line 441 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 441 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.next", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 441 "cysystemd/reader.pyx"
  return NULL;

#line 441 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 441 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_25next(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_skip);

#line 441 "cysystemd/reader.pyx"


#line 441 "cysystemd/reader.pyx"
  /* function exit code */

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 441 "cysystemd/reader.pyx"
  return __pyx_r;

#line 441 "cysystemd/reader.pyx"
}

#line 441 "cysystemd/reader.pyx"


#line 441 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_25next(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip) {
  int __pyx_v_result
#line 441 "cysystemd/reader.pyx"
;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 441 "cysystemd/reader.pyx"
  int __pyx_t_9;

#line 441 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 441 "cysystemd/reader.pyx"
  int __pyx_t_11;

#line 441 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 441 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 441 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("next", 0);

  /* "cysystemd/reader.pyx":444
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             if skip:
 *                 result = sd_journal_next_skip(self.context, skip)
 */

#line 444 "cysystemd/reader.pyx"
  /*with:*/ {

#line 444 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)

#line 444 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 444 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 444 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 444 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 444 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 444 "cysystemd/reader.pyx"
      }

#line 444 "cysystemd/reader.pyx"
    }

#line 444 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 444 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)

#line 444 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 444 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 444 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)

#line 444 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 444 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L3_error)

#line 444 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 444 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 444 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 444 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 444 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 444 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 444 "cysystemd/reader.pyx"
      }

#line 444 "cysystemd/reader.pyx"
    }

#line 444 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 444 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L3_error)

#line 444 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 444 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 444 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 444 "cysystemd/reader.pyx"
    /*try:*/ {

#line 444 "cysystemd/reader.pyx"
      {

#line 444 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_declare

#line 444 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_assign

#line 444 "cysystemd/reader.pyx"
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_6);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_7);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":445
 * 
 *         with self._lock():
 *             if skip:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_next_skip(self.context, skip)
 *             else:
 */

#line 445 "cysystemd/reader.pyx"
          __pyx_t_9 = (__pyx_v_skip != 0);

#line 445 "cysystemd/reader.pyx"
          if (__pyx_t_9) {

            /* "cysystemd/reader.pyx":446
 *         with self._lock():
 *             if skip:
 *                 result = sd_journal_next_skip(self.context, skip)             # <<<<<<<<<<<<<<
 *             else:
 *                 result = sd_journal_next(self.context)
 */

#line 446 "cysystemd/reader.pyx"
            __pyx_v_result = sd_journal_next_skip(__pyx_v_self->context, __pyx_v_skip);

            /* "cysystemd/reader.pyx":445
 * 
 *         with self._lock():
 *             if skip:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_next_skip(self.context, skip)
 *             else:
 */

#line 445 "cysystemd/reader.pyx"
            goto __pyx_L13;

#line 445 "cysystemd/reader.pyx"
          }

          /* "cysystemd/reader.pyx":448
 *                 result = sd_journal_next_skip(self.context, skip)
 *             else:
 *                 result = sd_journal_next(self.context)             # <<<<<<<<<<<<<<
 * 
 *             if check_error_code(result) > 0:
 */

#line 448 "cysystemd/reader.pyx"
          /*else*/ {

#line 448 "cysystemd/reader.pyx"
            __pyx_v_result = sd_journal_next(__pyx_v_self->context);

#line 448 "cysystemd/reader.pyx"
          }

#line 448 "cysystemd/reader.pyx"
          __pyx_L13:;

          /* "cysystemd/reader.pyx":450
 *                 result = sd_journal_next(self.context)
 * 
 *             if check_error_code(result) > 0:             # <<<<<<<<<<<<<<
 *                 return JournalEntry(self)
 * 
 */

#line 450 "cysystemd/reader.pyx"
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L7_error)

#line 450 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 450 "cysystemd/reader.pyx"
          __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L7_error)

#line 450 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 450 "cysystemd/reader.pyx"
          __pyx_t_5 = NULL;

#line 450 "cysystemd/reader.pyx"
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 450 "cysystemd/reader.pyx"
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 450 "cysystemd/reader.pyx"
            if (likely(__pyx_t_5)) {

#line 450 "cysystemd/reader.pyx"
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 450 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_5);

#line 450 "cysystemd/reader.pyx"
              __Pyx_INCREF(function);

#line 450 "cysystemd/reader.pyx"
              __Pyx_DECREF_SET(__pyx_t_2, function);

#line 450 "cysystemd/reader.pyx"
            }

#line 450 "cysystemd/reader.pyx"
          }

#line 450 "cysystemd/reader.pyx"
          __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 450 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 450 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 450 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L7_error)

#line 450 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 450 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 450 "cysystemd/reader.pyx"
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L7_error)

#line 450 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 450 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 450, __pyx_L7_error)

#line 450 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 450 "cysystemd/reader.pyx"
          if (__pyx_t_9) {

            /* "cysystemd/reader.pyx":451
 * 
 *             if check_error_code(result) > 0:
 *                 return JournalEntry(self)             # <<<<<<<<<<<<<<
 * 
 *     def skip_next(self, uint64_t skip):
 */

#line 451 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_r);

#line 451 "cysystemd/reader.pyx"
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9cysystemd_6reader_JournalEntry), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L7_error)

#line 451 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 451 "cysystemd/reader.pyx"
            __pyx_r = __pyx_t_2;

#line 451 "cysystemd/reader.pyx"
            __pyx_t_2 = 0;

#line 451 "cysystemd/reader.pyx"
            goto __pyx_L11_try_return;

            /* "cysystemd/reader.pyx":450
 *                 result = sd_journal_next(self.context)
 * 
 *             if check_error_code(result) > 0:             # <<<<<<<<<<<<<<
 *                 return JournalEntry(self)
 * 
 */

#line 450 "cysystemd/reader.pyx"
          }

          /* "cysystemd/reader.pyx":444
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             if skip:
 *                 result = sd_journal_next_skip(self.context, skip)
 */

#line 444 "cysystemd/reader.pyx"
        }

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 444 "cysystemd/reader.pyx"
        goto __pyx_L12_try_end;

#line 444 "cysystemd/reader.pyx"
        __pyx_L7_error:;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 444 "cysystemd/reader.pyx"
        /*except:*/ {

#line 444 "cysystemd/reader.pyx"
          __Pyx_AddTraceback("cysystemd.reader.JournalReader.next", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 444 "cysystemd/reader.pyx"
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 444, __pyx_L9_except_error)

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L9_except_error)

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_5);

#line 444 "cysystemd/reader.pyx"
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 444 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 444, __pyx_L9_except_error)

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_10);

#line 444 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 444 "cysystemd/reader.pyx"
          if (__pyx_t_9 < 0) __PYX_ERR(0, 444, __pyx_L9_except_error)

#line 444 "cysystemd/reader.pyx"
          __pyx_t_11 = ((!(__pyx_t_9 != 0)) != 0);

#line 444 "cysystemd/reader.pyx"
          if (__pyx_t_11) {

#line 444 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_2);

#line 444 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_1);

#line 444 "cysystemd/reader.pyx"
            __Pyx_XGIVEREF(__pyx_t_3);

#line 444 "cysystemd/reader.pyx"
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3);
            __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
#line 444 "cysystemd/reader.pyx"


#line 444 "cysystemd/reader.pyx"
            __PYX_ERR(0, 444, __pyx_L9_except_error)

#line 444 "cysystemd/reader.pyx"
          }

#line 444 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 444 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 444 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 444 "cysystemd/reader.pyx"
          goto __pyx_L8_exception_handled;

#line 444 "cysystemd/reader.pyx"
        }

#line 444 "cysystemd/reader.pyx"
        __pyx_L9_except_error:;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        goto __pyx_L1_error;

#line 444 "cysystemd/reader.pyx"
        __pyx_L11_try_return:;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        goto __pyx_L4_return;

#line 444 "cysystemd/reader.pyx"
        __pyx_L8_exception_handled:;

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 444 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 444 "cysystemd/reader.pyx"
        __pyx_L12_try_end:;

#line 444 "cysystemd/reader.pyx"
      }

#line 444 "cysystemd/reader.pyx"
    }

#line 444 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 444 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 444 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 444 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 444 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 444, __pyx_L1_error)

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 444 "cysystemd/reader.pyx"
        }

#line 444 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 444 "cysystemd/reader.pyx"
      }

#line 444 "cysystemd/reader.pyx"
      __pyx_L4_return: {

#line 444 "cysystemd/reader.pyx"
        __pyx_t_8 = __pyx_r;

#line 444 "cysystemd/reader.pyx"
        __pyx_r = 0;

#line 444 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 444 "cysystemd/reader.pyx"
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 444 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __pyx_L1_error)

#line 444 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_7);

#line 444 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 444 "cysystemd/reader.pyx"
        }

#line 444 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_8;

#line 444 "cysystemd/reader.pyx"
        __pyx_t_8 = 0;

#line 444 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 444 "cysystemd/reader.pyx"
      }

#line 444 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 444 "cysystemd/reader.pyx"
    }

#line 444 "cysystemd/reader.pyx"
    goto __pyx_L18;

#line 444 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 444 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 444 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 444 "cysystemd/reader.pyx"
    __pyx_L18:;

#line 444 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":441
 *         return iter(self.next, None)
 * 
 *     def next(self, uint64_t skip=0):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 441 "cysystemd/reader.pyx"


#line 441 "cysystemd/reader.pyx"
  /* function exit code */

#line 441 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 441 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 441 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 441 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 441 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 441 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 441 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 441 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.next", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 441 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 441 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 441 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 441 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 441 "cysystemd/reader.pyx"
  return __pyx_r;

#line 441 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":453
 *                 return JournalEntry(self)
 * 
 *     def skip_next(self, uint64_t skip):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 453 "cysystemd/reader.pyx"


#line 453 "cysystemd/reader.pyx"
/* Python wrapper */

#line 453 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_28skip_next(PyObject *__pyx_v_self, PyObject *__pyx_arg_skip); /*proto*/

#line 453 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_28skip_next(PyObject *__pyx_v_self, PyObject *__pyx_arg_skip) {
  uint64_t __pyx_v_skip
#line 453 "cysystemd/reader.pyx"
;

#line 453 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 453 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 453 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("skip_next (wrapper)", 0);

#line 453 "cysystemd/reader.pyx"
  assert(__pyx_arg_skip); {

#line 453 "cysystemd/reader.pyx"
    __pyx_v_skip = __Pyx_PyInt_As_uint64_t(__pyx_arg_skip); if (unlikely((__pyx_v_skip == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 453, __pyx_L3_error)

#line 453 "cysystemd/reader.pyx"
  }

#line 453 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 453 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 453 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.skip_next", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 453 "cysystemd/reader.pyx"
  return NULL;

#line 453 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 453 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_27skip_next(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((uint64_t)__pyx_v_skip));

#line 453 "cysystemd/reader.pyx"


#line 453 "cysystemd/reader.pyx"
  /* function exit code */

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 453 "cysystemd/reader.pyx"
  return __pyx_r;

#line 453 "cysystemd/reader.pyx"
}

#line 453 "cysystemd/reader.pyx"


#line 453 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_27skip_next(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip) {
  int __pyx_v_result
#line 453 "cysystemd/reader.pyx"
;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 453 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 453 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 453 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 453 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("skip_next", 0);

  /* "cysystemd/reader.pyx":456
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_next_skip(self.context, skip)
 * 
 */

#line 456 "cysystemd/reader.pyx"
  /*with:*/ {

#line 456 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)

#line 456 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 456 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 456 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 456 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 456 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 456 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 456 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 456 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 456 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 456 "cysystemd/reader.pyx"
      }

#line 456 "cysystemd/reader.pyx"
    }

#line 456 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 456 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 456 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)

#line 456 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 456 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 456 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)

#line 456 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 456 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L3_error)

#line 456 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 456 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 456 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 456 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 456 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 456 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 456 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 456 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 456 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 456 "cysystemd/reader.pyx"
      }

#line 456 "cysystemd/reader.pyx"
    }

#line 456 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 456 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 456 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L3_error)

#line 456 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 456 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 456 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 456 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 456 "cysystemd/reader.pyx"
    /*try:*/ {

#line 456 "cysystemd/reader.pyx"
      {

#line 456 "cysystemd/reader.pyx"
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */

#line 456 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":457
 * 
 *         with self._lock():
 *             result = sd_journal_next_skip(self.context, skip)             # <<<<<<<<<<<<<<
 * 
 *         return check_error_code(result)
 */

#line 457 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_next_skip(__pyx_v_self->context, __pyx_v_skip);

          /* "cysystemd/reader.pyx":456
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_next_skip(self.context, skip)
 * 
 */

#line 456 "cysystemd/reader.pyx"
        }

#line 456 "cysystemd/reader.pyx"
      }

#line 456 "cysystemd/reader.pyx"
    }

#line 456 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 456 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 456 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 456 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 456 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 456 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 456, __pyx_L1_error)

#line 456 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 456 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 456 "cysystemd/reader.pyx"
        }

#line 456 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 456 "cysystemd/reader.pyx"
      }

#line 456 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 456 "cysystemd/reader.pyx"
    }

#line 456 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 456 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 456 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 456 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 456 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 456 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":459
 *             result = sd_journal_next_skip(self.context, skip)
 * 
 *         return check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *     def previous(self, uint64_t skip=0):
 */

#line 459 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 459 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error)

#line 459 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 459 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)

#line 459 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 459 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 459 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 459 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 459 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 459 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 459 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 459 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 459 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 459 "cysystemd/reader.pyx"
    }

#line 459 "cysystemd/reader.pyx"
  }

#line 459 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 459 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 459 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 459 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)

#line 459 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 459 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 459 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 459 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 459 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":453
 *                 return JournalEntry(self)
 * 
 *     def skip_next(self, uint64_t skip):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 453 "cysystemd/reader.pyx"


#line 453 "cysystemd/reader.pyx"
  /* function exit code */

#line 453 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 453 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 453 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 453 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 453 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 453 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.skip_next", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 453 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 453 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 453 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 453 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 453 "cysystemd/reader.pyx"
  return __pyx_r;

#line 453 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":461
 *         return check_error_code(result)
 * 
 *     def previous(self, uint64_t skip=0):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 461 "cysystemd/reader.pyx"


#line 461 "cysystemd/reader.pyx"
/* Python wrapper */

#line 461 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_30previous(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/

#line 461 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_30previous(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint64_t __pyx_v_skip
#line 461 "cysystemd/reader.pyx"
;

#line 461 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 461 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 461 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("previous (wrapper)", 0);

#line 461 "cysystemd/reader.pyx"
  {

#line 461 "cysystemd/reader.pyx"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_skip,0};

#line 461 "cysystemd/reader.pyx"
    PyObject* values[1] = {0};

#line 461 "cysystemd/reader.pyx"
    if (unlikely(__pyx_kwds)) {

#line 461 "cysystemd/reader.pyx"
      Py_ssize_t kw_args;

#line 461 "cysystemd/reader.pyx"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 461 "cysystemd/reader.pyx"
      switch (pos_args) {
        case  1: 
#line 461 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 461 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;

#line 461 "cysystemd/reader.pyx"
        case  0: break;
        default: 
#line 461 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 461 "cysystemd/reader.pyx"
      }

#line 461 "cysystemd/reader.pyx"
      kw_args = PyDict_Size(__pyx_kwds);

#line 461 "cysystemd/reader.pyx"
      switch (pos_args) {

#line 461 "cysystemd/reader.pyx"
        case  0:

#line 461 "cysystemd/reader.pyx"
        if (kw_args > 0) {

#line 461 "cysystemd/reader.pyx"
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip);

#line 461 "cysystemd/reader.pyx"
          if (value) { values[0] = value; kw_args--; }

#line 461 "cysystemd/reader.pyx"
        }

#line 461 "cysystemd/reader.pyx"
      }

#line 461 "cysystemd/reader.pyx"
      if (unlikely(kw_args > 0)) {

#line 461 "cysystemd/reader.pyx"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "previous") < 0)) __PYX_ERR(0, 461, __pyx_L3_error)

#line 461 "cysystemd/reader.pyx"
      }

#line 461 "cysystemd/reader.pyx"
    } else {

#line 461 "cysystemd/reader.pyx"
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: 
#line 461 "cysystemd/reader.pyx"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 461 "cysystemd/reader.pyx"
        CYTHON_FALLTHROUGH;
        case  0: 
#line 461 "cysystemd/reader.pyx"
break;
        default: 
#line 461 "cysystemd/reader.pyx"
goto __pyx_L5_argtuple_error;

#line 461 "cysystemd/reader.pyx"
      }

#line 461 "cysystemd/reader.pyx"
    }

#line 461 "cysystemd/reader.pyx"
    if (values[0]) {

#line 461 "cysystemd/reader.pyx"
      __pyx_v_skip = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_skip == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L3_error)

#line 461 "cysystemd/reader.pyx"
    } else {

#line 461 "cysystemd/reader.pyx"
      __pyx_v_skip = ((uint64_t)0);

#line 461 "cysystemd/reader.pyx"
    }

#line 461 "cysystemd/reader.pyx"
  }

#line 461 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 461 "cysystemd/reader.pyx"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("previous", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); 
#line 461 "cysystemd/reader.pyx"
__PYX_ERR(0, 461, __pyx_L3_error)

#line 461 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 461 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.previous", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 461 "cysystemd/reader.pyx"
  return NULL;

#line 461 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 461 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_29previous(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), __pyx_v_skip);

#line 461 "cysystemd/reader.pyx"


#line 461 "cysystemd/reader.pyx"
  /* function exit code */

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 461 "cysystemd/reader.pyx"
  return __pyx_r;

#line 461 "cysystemd/reader.pyx"
}

#line 461 "cysystemd/reader.pyx"


#line 461 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_29previous(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip) {
  int __pyx_v_result
#line 461 "cysystemd/reader.pyx"
;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 461 "cysystemd/reader.pyx"
  int __pyx_t_9;

#line 461 "cysystemd/reader.pyx"
  PyObject *__pyx_t_10 = NULL;

#line 461 "cysystemd/reader.pyx"
  int __pyx_t_11;

#line 461 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 461 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 461 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("previous", 0);

  /* "cysystemd/reader.pyx":464
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             if skip:
 *                 result = sd_journal_previous_skip(self.context, skip)
 */

#line 464 "cysystemd/reader.pyx"
  /*with:*/ {

#line 464 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)

#line 464 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 464 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 464 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 464 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 464 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 464 "cysystemd/reader.pyx"
      }

#line 464 "cysystemd/reader.pyx"
    }

#line 464 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 464 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)

#line 464 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 464 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 464 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)

#line 464 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 464 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L3_error)

#line 464 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 464 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 464 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 464 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 464 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 464 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 464 "cysystemd/reader.pyx"
      }

#line 464 "cysystemd/reader.pyx"
    }

#line 464 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 464 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L3_error)

#line 464 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 464 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 464 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 464 "cysystemd/reader.pyx"
    /*try:*/ {

#line 464 "cysystemd/reader.pyx"
      {

#line 464 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_declare

#line 464 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_assign

#line 464 "cysystemd/reader.pyx"
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_6);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_7);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":465
 * 
 *         with self._lock():
 *             if skip:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_previous_skip(self.context, skip)
 *             else:
 */

#line 465 "cysystemd/reader.pyx"
          __pyx_t_9 = (__pyx_v_skip != 0);

#line 465 "cysystemd/reader.pyx"
          if (__pyx_t_9) {

            /* "cysystemd/reader.pyx":466
 *         with self._lock():
 *             if skip:
 *                 result = sd_journal_previous_skip(self.context, skip)             # <<<<<<<<<<<<<<
 *             else:
 *                 result = sd_journal_previous(self.context)
 */

#line 466 "cysystemd/reader.pyx"
            __pyx_v_result = sd_journal_previous_skip(__pyx_v_self->context, __pyx_v_skip);

            /* "cysystemd/reader.pyx":465
 * 
 *         with self._lock():
 *             if skip:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_previous_skip(self.context, skip)
 *             else:
 */

#line 465 "cysystemd/reader.pyx"
            goto __pyx_L13;

#line 465 "cysystemd/reader.pyx"
          }

          /* "cysystemd/reader.pyx":468
 *                 result = sd_journal_previous_skip(self.context, skip)
 *             else:
 *                 result = sd_journal_previous(self.context)             # <<<<<<<<<<<<<<
 * 
 *             if check_error_code(result) > 0:
 */

#line 468 "cysystemd/reader.pyx"
          /*else*/ {

#line 468 "cysystemd/reader.pyx"
            __pyx_v_result = sd_journal_previous(__pyx_v_self->context);

#line 468 "cysystemd/reader.pyx"
          }

#line 468 "cysystemd/reader.pyx"
          __pyx_L13:;

          /* "cysystemd/reader.pyx":470
 *                 result = sd_journal_previous(self.context)
 * 
 *             if check_error_code(result) > 0:             # <<<<<<<<<<<<<<
 *                 return JournalEntry(self)
 * 
 */

#line 470 "cysystemd/reader.pyx"
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L7_error)

#line 470 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 470 "cysystemd/reader.pyx"
          __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L7_error)

#line 470 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 470 "cysystemd/reader.pyx"
          __pyx_t_5 = NULL;

#line 470 "cysystemd/reader.pyx"
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 470 "cysystemd/reader.pyx"
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 470 "cysystemd/reader.pyx"
            if (likely(__pyx_t_5)) {

#line 470 "cysystemd/reader.pyx"
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 470 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_5);

#line 470 "cysystemd/reader.pyx"
              __Pyx_INCREF(function);

#line 470 "cysystemd/reader.pyx"
              __Pyx_DECREF_SET(__pyx_t_2, function);

#line 470 "cysystemd/reader.pyx"
            }

#line 470 "cysystemd/reader.pyx"
          }

#line 470 "cysystemd/reader.pyx"
          __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 470 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 470 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 470 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L7_error)

#line 470 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 470 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 470 "cysystemd/reader.pyx"
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L7_error)

#line 470 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 470 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 470, __pyx_L7_error)

#line 470 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 470 "cysystemd/reader.pyx"
          if (__pyx_t_9) {

            /* "cysystemd/reader.pyx":471
 * 
 *             if check_error_code(result) > 0:
 *                 return JournalEntry(self)             # <<<<<<<<<<<<<<
 * 
 *     def skip_previous(self, uint64_t skip):
 */

#line 471 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_r);

#line 471 "cysystemd/reader.pyx"
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9cysystemd_6reader_JournalEntry), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L7_error)

#line 471 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 471 "cysystemd/reader.pyx"
            __pyx_r = __pyx_t_2;

#line 471 "cysystemd/reader.pyx"
            __pyx_t_2 = 0;

#line 471 "cysystemd/reader.pyx"
            goto __pyx_L11_try_return;

            /* "cysystemd/reader.pyx":470
 *                 result = sd_journal_previous(self.context)
 * 
 *             if check_error_code(result) > 0:             # <<<<<<<<<<<<<<
 *                 return JournalEntry(self)
 * 
 */

#line 470 "cysystemd/reader.pyx"
          }

          /* "cysystemd/reader.pyx":464
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             if skip:
 *                 result = sd_journal_previous_skip(self.context, skip)
 */

#line 464 "cysystemd/reader.pyx"
        }

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 464 "cysystemd/reader.pyx"
        goto __pyx_L12_try_end;

#line 464 "cysystemd/reader.pyx"
        __pyx_L7_error:;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 464 "cysystemd/reader.pyx"
        /*except:*/ {

#line 464 "cysystemd/reader.pyx"
          __Pyx_AddTraceback("cysystemd.reader.JournalReader.previous", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 464 "cysystemd/reader.pyx"
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 464, __pyx_L9_except_error)

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L9_except_error)

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_5);

#line 464 "cysystemd/reader.pyx"
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 464 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 464, __pyx_L9_except_error)

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_10);

#line 464 "cysystemd/reader.pyx"
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

#line 464 "cysystemd/reader.pyx"
          if (__pyx_t_9 < 0) __PYX_ERR(0, 464, __pyx_L9_except_error)

#line 464 "cysystemd/reader.pyx"
          __pyx_t_11 = ((!(__pyx_t_9 != 0)) != 0);

#line 464 "cysystemd/reader.pyx"
          if (__pyx_t_11) {

#line 464 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_2);

#line 464 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_1);

#line 464 "cysystemd/reader.pyx"
            __Pyx_XGIVEREF(__pyx_t_3);

#line 464 "cysystemd/reader.pyx"
            __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3);
            __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
#line 464 "cysystemd/reader.pyx"


#line 464 "cysystemd/reader.pyx"
            __PYX_ERR(0, 464, __pyx_L9_except_error)

#line 464 "cysystemd/reader.pyx"
          }

#line 464 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 464 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 464 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 464 "cysystemd/reader.pyx"
          goto __pyx_L8_exception_handled;

#line 464 "cysystemd/reader.pyx"
        }

#line 464 "cysystemd/reader.pyx"
        __pyx_L9_except_error:;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        goto __pyx_L1_error;

#line 464 "cysystemd/reader.pyx"
        __pyx_L11_try_return:;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        goto __pyx_L4_return;

#line 464 "cysystemd/reader.pyx"
        __pyx_L8_exception_handled:;

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 464 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 464 "cysystemd/reader.pyx"
        __pyx_L12_try_end:;

#line 464 "cysystemd/reader.pyx"
      }

#line 464 "cysystemd/reader.pyx"
    }

#line 464 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 464 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 464 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 464 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 464 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error)

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 464 "cysystemd/reader.pyx"
        }

#line 464 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 464 "cysystemd/reader.pyx"
      }

#line 464 "cysystemd/reader.pyx"
      __pyx_L4_return: {

#line 464 "cysystemd/reader.pyx"
        __pyx_t_8 = __pyx_r;

#line 464 "cysystemd/reader.pyx"
        __pyx_r = 0;

#line 464 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 464 "cysystemd/reader.pyx"
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 464 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 464, __pyx_L1_error)

#line 464 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_7);

#line 464 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 464 "cysystemd/reader.pyx"
        }

#line 464 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_8;

#line 464 "cysystemd/reader.pyx"
        __pyx_t_8 = 0;

#line 464 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 464 "cysystemd/reader.pyx"
      }

#line 464 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 464 "cysystemd/reader.pyx"
    }

#line 464 "cysystemd/reader.pyx"
    goto __pyx_L18;

#line 464 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 464 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 464 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 464 "cysystemd/reader.pyx"
    __pyx_L18:;

#line 464 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":461
 *         return check_error_code(result)
 * 
 *     def previous(self, uint64_t skip=0):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 461 "cysystemd/reader.pyx"


#line 461 "cysystemd/reader.pyx"
  /* function exit code */

#line 461 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 461 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 461 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 461 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 461 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 461 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 461 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 461 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.previous", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 461 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 461 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 461 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 461 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 461 "cysystemd/reader.pyx"
  return __pyx_r;

#line 461 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":473
 *                 return JournalEntry(self)
 * 
 *     def skip_previous(self, uint64_t skip):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 473 "cysystemd/reader.pyx"


#line 473 "cysystemd/reader.pyx"
/* Python wrapper */

#line 473 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_32skip_previous(PyObject *__pyx_v_self, PyObject *__pyx_arg_skip); /*proto*/

#line 473 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_32skip_previous(PyObject *__pyx_v_self, PyObject *__pyx_arg_skip) {
  uint64_t __pyx_v_skip
#line 473 "cysystemd/reader.pyx"
;

#line 473 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 473 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 473 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("skip_previous (wrapper)", 0);

#line 473 "cysystemd/reader.pyx"
  assert(__pyx_arg_skip); {

#line 473 "cysystemd/reader.pyx"
    __pyx_v_skip = __Pyx_PyInt_As_uint64_t(__pyx_arg_skip); if (unlikely((__pyx_v_skip == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L3_error)

#line 473 "cysystemd/reader.pyx"
  }

#line 473 "cysystemd/reader.pyx"
  goto __pyx_L4_argument_unpacking_done;

#line 473 "cysystemd/reader.pyx"
  __pyx_L3_error:;

#line 473 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.skip_previous", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 473 "cysystemd/reader.pyx"
  return NULL;

#line 473 "cysystemd/reader.pyx"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 473 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_31skip_previous(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((uint64_t)__pyx_v_skip));

#line 473 "cysystemd/reader.pyx"


#line 473 "cysystemd/reader.pyx"
  /* function exit code */

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 473 "cysystemd/reader.pyx"
  return __pyx_r;

#line 473 "cysystemd/reader.pyx"
}

#line 473 "cysystemd/reader.pyx"


#line 473 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_31skip_previous(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, uint64_t __pyx_v_skip) {
  int __pyx_v_result
#line 473 "cysystemd/reader.pyx"
;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 473 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 473 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 473 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 473 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("skip_previous", 0);

  /* "cysystemd/reader.pyx":476
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_previous_skip(self.context, skip)
 * 
 */

#line 476 "cysystemd/reader.pyx"
  /*with:*/ {

#line 476 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)

#line 476 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 476 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 476 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 476 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 476 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 476 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 476 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 476 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 476 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 476 "cysystemd/reader.pyx"
      }

#line 476 "cysystemd/reader.pyx"
    }

#line 476 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 476 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 476 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)

#line 476 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 476 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 476 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error)

#line 476 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 476 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L3_error)

#line 476 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 476 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 476 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 476 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 476 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 476 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 476 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 476 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 476 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 476 "cysystemd/reader.pyx"
      }

#line 476 "cysystemd/reader.pyx"
    }

#line 476 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 476 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 476 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L3_error)

#line 476 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 476 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 476 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 476 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 476 "cysystemd/reader.pyx"
    /*try:*/ {

#line 476 "cysystemd/reader.pyx"
      {

#line 476 "cysystemd/reader.pyx"
        (void)__pyx_t_6; (void)__pyx_t_7; (void)__pyx_t_8; /* mark used */

#line 476 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":477
 * 
 *         with self._lock():
 *             result = sd_journal_previous_skip(self.context, skip)             # <<<<<<<<<<<<<<
 * 
 *         return check_error_code(result)
 */

#line 477 "cysystemd/reader.pyx"
          __pyx_v_result = sd_journal_previous_skip(__pyx_v_self->context, __pyx_v_skip);

          /* "cysystemd/reader.pyx":476
 *         cdef int result
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             result = sd_journal_previous_skip(self.context, skip)
 * 
 */

#line 476 "cysystemd/reader.pyx"
        }

#line 476 "cysystemd/reader.pyx"
      }

#line 476 "cysystemd/reader.pyx"
    }

#line 476 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 476 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 476 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 476 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 476 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 476 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 476, __pyx_L1_error)

#line 476 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 476 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 476 "cysystemd/reader.pyx"
        }

#line 476 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 476 "cysystemd/reader.pyx"
      }

#line 476 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 476 "cysystemd/reader.pyx"
    }

#line 476 "cysystemd/reader.pyx"
    goto __pyx_L13;

#line 476 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 476 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 476 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 476 "cysystemd/reader.pyx"
    __pyx_L13:;

#line 476 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":479
 *             result = sd_journal_previous_skip(self.context, skip)
 * 
 *         return check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *     def add_filter(self, Rule rule):
 */

#line 479 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 479 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)

#line 479 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 479 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error)

#line 479 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 479 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 479 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 479 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 479 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 479 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 479 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 479 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 479 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 479 "cysystemd/reader.pyx"
    }

#line 479 "cysystemd/reader.pyx"
  }

#line 479 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 479 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 479 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 479 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)

#line 479 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 479 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 479 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 479 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 479 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":473
 *                 return JournalEntry(self)
 * 
 *     def skip_previous(self, uint64_t skip):             # <<<<<<<<<<<<<<
 *         cdef int result
 * 
 */

#line 473 "cysystemd/reader.pyx"


#line 473 "cysystemd/reader.pyx"
  /* function exit code */

#line 473 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 473 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 473 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 473 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 473 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 473 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.skip_previous", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 473 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 473 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 473 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 473 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 473 "cysystemd/reader.pyx"
  return __pyx_r;

#line 473 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":481
 *         return check_error_code(result)
 * 
 *     def add_filter(self, Rule rule):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* exp
 */

#line 481 "cysystemd/reader.pyx"


#line 481 "cysystemd/reader.pyx"
/* Python wrapper */

#line 481 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_34add_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_rule); /*proto*/

#line 481 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_34add_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_rule) {

#line 481 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 481 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 481 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("add_filter (wrapper)", 0);

#line 481 "cysystemd/reader.pyx"
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rule), __pyx_ptype_9cysystemd_6reader_Rule, 1, "rule", 0))) __PYX_ERR(0, 481, __pyx_L1_error)
  __pyx_r = 
#line 481 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_33add_filter(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v_rule));

#line 481 "cysystemd/reader.pyx"


#line 481 "cysystemd/reader.pyx"
  /* function exit code */

#line 481 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 481 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 481 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 481 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 481 "cysystemd/reader.pyx"
  return __pyx_r;

#line 481 "cysystemd/reader.pyx"
}

#line 481 "cysystemd/reader.pyx"


#line 481 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_33add_filter(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v_rule) {
  int __pyx_v_result
#line 481 "cysystemd/reader.pyx"
;
  char *__pyx_v_exp
#line 481 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_operand = NULL
#line 481 "cysystemd/reader.pyx"
;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_7 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_8 = NULL;

#line 481 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_9;

#line 481 "cysystemd/reader.pyx"
  PyObject *(*__pyx_t_10)(PyObject *);

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_11 = NULL;

#line 481 "cysystemd/reader.pyx"
  PyObject *(*__pyx_t_12)(PyObject *);

#line 481 "cysystemd/reader.pyx"
  char *__pyx_t_13;

#line 481 "cysystemd/reader.pyx"
  int __pyx_t_14;

#line 481 "cysystemd/reader.pyx"
  PyObject *__pyx_t_15 = NULL;

#line 481 "cysystemd/reader.pyx"
  int __pyx_t_16;

#line 481 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 481 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 481 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("add_filter", 0);

  /* "cysystemd/reader.pyx":485
 *         cdef char* exp
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             for operand, exp in rule:
 *                 result = sd_journal_add_match(self.context, exp, 0)
 */

#line 485 "cysystemd/reader.pyx"
  /*with:*/ {

#line 485 "cysystemd/reader.pyx"
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)

#line 485 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
    __pyx_t_3 = NULL;

#line 485 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 485 "cysystemd/reader.pyx"
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
      if (likely(__pyx_t_3)) {

#line 485 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 485 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 485 "cysystemd/reader.pyx"
      }

#line 485 "cysystemd/reader.pyx"
    }

#line 485 "cysystemd/reader.pyx"
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 485 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)

#line 485 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_1);

#line 485 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 485 "cysystemd/reader.pyx"
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)

#line 485 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_4);

#line 485 "cysystemd/reader.pyx"
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L3_error)

#line 485 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
    __pyx_t_5 = NULL;

#line 485 "cysystemd/reader.pyx"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {

#line 485 "cysystemd/reader.pyx"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
      if (likely(__pyx_t_5)) {

#line 485 "cysystemd/reader.pyx"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
        __Pyx_INCREF(__pyx_t_5);

#line 485 "cysystemd/reader.pyx"
        __Pyx_INCREF(function);

#line 485 "cysystemd/reader.pyx"
        __Pyx_DECREF_SET(__pyx_t_3, function);

#line 485 "cysystemd/reader.pyx"
      }

#line 485 "cysystemd/reader.pyx"
    }

#line 485 "cysystemd/reader.pyx"
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 485 "cysystemd/reader.pyx"
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L3_error)

#line 485 "cysystemd/reader.pyx"
    __Pyx_GOTREF(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 485 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 485 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 485 "cysystemd/reader.pyx"
    /*try:*/ {

#line 485 "cysystemd/reader.pyx"
      {

#line 485 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_declare

#line 485 "cysystemd/reader.pyx"
        __Pyx_PyThreadState_assign

#line 485 "cysystemd/reader.pyx"
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_6);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_7);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGOTREF(__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        /*try:*/ {

          /* "cysystemd/reader.pyx":486
 * 
 *         with self._lock():
 *             for operand, exp in rule:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_add_match(self.context, exp, 0)
 *                 check_error_code(result)
 */

#line 486 "cysystemd/reader.pyx"
          if (likely(PyList_CheckExact(((PyObject *)__pyx_v_rule))) || PyTuple_CheckExact(((PyObject *)__pyx_v_rule))) {

#line 486 "cysystemd/reader.pyx"
            __pyx_t_1 = ((PyObject *)__pyx_v_rule); __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;

#line 486 "cysystemd/reader.pyx"
            __pyx_t_10 = NULL;

#line 486 "cysystemd/reader.pyx"
          } else {
            __pyx_t_9 = -1; 
#line 486 "cysystemd/reader.pyx"
__pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_rule)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_1);

#line 486 "cysystemd/reader.pyx"
            __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
          }

#line 486 "cysystemd/reader.pyx"
          for (;;) {

#line 486 "cysystemd/reader.pyx"
            if (likely(!__pyx_t_10)) {

#line 486 "cysystemd/reader.pyx"
              if (likely(PyList_CheckExact(__pyx_t_1))) {

#line 486 "cysystemd/reader.pyx"
                if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;

#line 486 "cysystemd/reader.pyx"
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 486 "cysystemd/reader.pyx"
                __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
                #else

#line 486 "cysystemd/reader.pyx"
                __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
                __Pyx_GOTREF(__pyx_t_2);

#line 486 "cysystemd/reader.pyx"
                #endif

#line 486 "cysystemd/reader.pyx"
              } else {

#line 486 "cysystemd/reader.pyx"
                if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;

#line 486 "cysystemd/reader.pyx"
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 486 "cysystemd/reader.pyx"
                __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
                #else

#line 486 "cysystemd/reader.pyx"
                __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
                __Pyx_GOTREF(__pyx_t_2);

#line 486 "cysystemd/reader.pyx"
                #endif

#line 486 "cysystemd/reader.pyx"
              }
            } else 
#line 486 "cysystemd/reader.pyx"
{

#line 486 "cysystemd/reader.pyx"
              __pyx_t_2 = __pyx_t_10(__pyx_t_1);

#line 486 "cysystemd/reader.pyx"
              if (unlikely(!__pyx_t_2)) {

#line 486 "cysystemd/reader.pyx"
                PyObject* exc_type = PyErr_Occurred();

#line 486 "cysystemd/reader.pyx"
                if (exc_type) {

#line 486 "cysystemd/reader.pyx"
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();

#line 486 "cysystemd/reader.pyx"
                  else __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
                }

#line 486 "cysystemd/reader.pyx"
                break;

#line 486 "cysystemd/reader.pyx"
              }

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_2);

#line 486 "cysystemd/reader.pyx"
            }

#line 486 "cysystemd/reader.pyx"
            if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {

#line 486 "cysystemd/reader.pyx"
              PyObject* sequence = __pyx_t_2;

#line 486 "cysystemd/reader.pyx"
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);

#line 486 "cysystemd/reader.pyx"
              if (unlikely(size != 2)) {

#line 486 "cysystemd/reader.pyx"
                if (size > 2) __Pyx_RaiseTooManyValuesError(2);

#line 486 "cysystemd/reader.pyx"
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);

#line 486 "cysystemd/reader.pyx"
                __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              }

#line 486 "cysystemd/reader.pyx"
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 486 "cysystemd/reader.pyx"
              if (likely(PyTuple_CheckExact(sequence))) {

#line 486 "cysystemd/reader.pyx"
                __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 

#line 486 "cysystemd/reader.pyx"
                __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 

#line 486 "cysystemd/reader.pyx"
              } else {

#line 486 "cysystemd/reader.pyx"
                __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 

#line 486 "cysystemd/reader.pyx"
                __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 

#line 486 "cysystemd/reader.pyx"
              }

#line 486 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_3);

#line 486 "cysystemd/reader.pyx"
              __Pyx_INCREF(__pyx_t_5);

#line 486 "cysystemd/reader.pyx"
              #else

#line 486 "cysystemd/reader.pyx"
              __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_3);

#line 486 "cysystemd/reader.pyx"
              __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_5);

#line 486 "cysystemd/reader.pyx"
              #endif

#line 486 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 486 "cysystemd/reader.pyx"
            } else {

#line 486 "cysystemd/reader.pyx"
              Py_ssize_t index = -1;

#line 486 "cysystemd/reader.pyx"
              __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_11);

#line 486 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 486 "cysystemd/reader.pyx"
              __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
              index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) 
#line 486 "cysystemd/reader.pyx"
goto __pyx_L15_unpacking_failed;

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_3);
              index = 1; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) 
#line 486 "cysystemd/reader.pyx"
goto __pyx_L15_unpacking_failed;

#line 486 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_5);

#line 486 "cysystemd/reader.pyx"
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              __pyx_t_12 = NULL;

#line 486 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 486 "cysystemd/reader.pyx"
              goto __pyx_L16_unpacking_done;

#line 486 "cysystemd/reader.pyx"
              __pyx_L15_unpacking_failed:;

#line 486 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 486 "cysystemd/reader.pyx"
              __pyx_t_12 = NULL;

#line 486 "cysystemd/reader.pyx"
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);

#line 486 "cysystemd/reader.pyx"
              __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
              __pyx_L16_unpacking_done:;

#line 486 "cysystemd/reader.pyx"
            }

#line 486 "cysystemd/reader.pyx"
            __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_t_5); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L7_error)

#line 486 "cysystemd/reader.pyx"
            __pyx_v_operand = __pyx_t_3;

#line 486 "cysystemd/reader.pyx"
            __pyx_t_3 = 0;

#line 486 "cysystemd/reader.pyx"
            __pyx_v_exp = __pyx_t_13;

#line 486 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "cysystemd/reader.pyx":487
 *         with self._lock():
 *             for operand, exp in rule:
 *                 result = sd_journal_add_match(self.context, exp, 0)             # <<<<<<<<<<<<<<
 *                 check_error_code(result)
 * 
 */

#line 487 "cysystemd/reader.pyx"
            __pyx_v_result = sd_journal_add_match(__pyx_v_self->context, __pyx_v_exp, 0);

            /* "cysystemd/reader.pyx":488
 *             for operand, exp in rule:
 *                 result = sd_journal_add_match(self.context, exp, 0)
 *                 check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *                 if operand == MatchOperation.OR:
 */

#line 488 "cysystemd/reader.pyx"
            __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L7_error)

#line 488 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_5);

#line 488 "cysystemd/reader.pyx"
            __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L7_error)

#line 488 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_3);

#line 488 "cysystemd/reader.pyx"
            __pyx_t_11 = NULL;

#line 488 "cysystemd/reader.pyx"
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {

#line 488 "cysystemd/reader.pyx"
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);

#line 488 "cysystemd/reader.pyx"
              if (likely(__pyx_t_11)) {

#line 488 "cysystemd/reader.pyx"
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);

#line 488 "cysystemd/reader.pyx"
                __Pyx_INCREF(__pyx_t_11);

#line 488 "cysystemd/reader.pyx"
                __Pyx_INCREF(function);

#line 488 "cysystemd/reader.pyx"
                __Pyx_DECREF_SET(__pyx_t_5, function);

#line 488 "cysystemd/reader.pyx"
              }

#line 488 "cysystemd/reader.pyx"
            }

#line 488 "cysystemd/reader.pyx"
            __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);

#line 488 "cysystemd/reader.pyx"
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 488 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 488 "cysystemd/reader.pyx"
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L7_error)

#line 488 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 488 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 488 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "cysystemd/reader.pyx":490
 *                 check_error_code(result)
 * 
 *                 if operand == MatchOperation.OR:             # <<<<<<<<<<<<<<
 *                     result = sd_journal_add_disjunction(self.context)
 *                     return check_error_code(result)
 */

#line 490 "cysystemd/reader.pyx"
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L7_error)

#line 490 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 490 "cysystemd/reader.pyx"
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L7_error)

#line 490 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_5);

#line 490 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 490 "cysystemd/reader.pyx"
            __pyx_t_2 = PyObject_RichCompare(__pyx_v_operand, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L7_error)

#line 490 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 490 "cysystemd/reader.pyx"
            __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 490, __pyx_L7_error)

#line 490 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 490 "cysystemd/reader.pyx"
            if (__pyx_t_14) {

              /* "cysystemd/reader.pyx":491
 * 
 *                 if operand == MatchOperation.OR:
 *                     result = sd_journal_add_disjunction(self.context)             # <<<<<<<<<<<<<<
 *                     return check_error_code(result)
 * 
 */

#line 491 "cysystemd/reader.pyx"
              __pyx_v_result = sd_journal_add_disjunction(__pyx_v_self->context);

              /* "cysystemd/reader.pyx":492
 *                 if operand == MatchOperation.OR:
 *                     result = sd_journal_add_disjunction(self.context)
 *                     return check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *                 elif operand == MatchOperation.AND:
 */

#line 492 "cysystemd/reader.pyx"
              __Pyx_XDECREF(__pyx_r);

#line 492 "cysystemd/reader.pyx"
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L7_error)

#line 492 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_5);

#line 492 "cysystemd/reader.pyx"
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L7_error)

#line 492 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_3);

#line 492 "cysystemd/reader.pyx"
              __pyx_t_11 = NULL;

#line 492 "cysystemd/reader.pyx"
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {

#line 492 "cysystemd/reader.pyx"
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);

#line 492 "cysystemd/reader.pyx"
                if (likely(__pyx_t_11)) {

#line 492 "cysystemd/reader.pyx"
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);

#line 492 "cysystemd/reader.pyx"
                  __Pyx_INCREF(__pyx_t_11);

#line 492 "cysystemd/reader.pyx"
                  __Pyx_INCREF(function);

#line 492 "cysystemd/reader.pyx"
                  __Pyx_DECREF_SET(__pyx_t_5, function);

#line 492 "cysystemd/reader.pyx"
                }

#line 492 "cysystemd/reader.pyx"
              }

#line 492 "cysystemd/reader.pyx"
              __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);

#line 492 "cysystemd/reader.pyx"
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 492 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 492 "cysystemd/reader.pyx"
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L7_error)

#line 492 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_2);

#line 492 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 492 "cysystemd/reader.pyx"
              __pyx_r = __pyx_t_2;

#line 492 "cysystemd/reader.pyx"
              __pyx_t_2 = 0;

#line 492 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 492 "cysystemd/reader.pyx"
              goto __pyx_L11_try_return;

              /* "cysystemd/reader.pyx":490
 *                 check_error_code(result)
 * 
 *                 if operand == MatchOperation.OR:             # <<<<<<<<<<<<<<
 *                     result = sd_journal_add_disjunction(self.context)
 *                     return check_error_code(result)
 */

#line 490 "cysystemd/reader.pyx"
            }

            /* "cysystemd/reader.pyx":494
 *                     return check_error_code(result)
 * 
 *                 elif operand == MatchOperation.AND:             # <<<<<<<<<<<<<<
 *                     result = sd_journal_add_conjunction(self.context)
 *                     return check_error_code(result)
 */

#line 494 "cysystemd/reader.pyx"
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatchOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L7_error)

#line 494 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 494 "cysystemd/reader.pyx"
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AND); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L7_error)

#line 494 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_5);

#line 494 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 494 "cysystemd/reader.pyx"
            __pyx_t_2 = PyObject_RichCompare(__pyx_v_operand, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L7_error)

#line 494 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 494 "cysystemd/reader.pyx"
            __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 494, __pyx_L7_error)

#line 494 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 494 "cysystemd/reader.pyx"
            if (__pyx_t_14) {

              /* "cysystemd/reader.pyx":495
 * 
 *                 elif operand == MatchOperation.AND:
 *                     result = sd_journal_add_conjunction(self.context)             # <<<<<<<<<<<<<<
 *                     return check_error_code(result)
 * 
 */

#line 495 "cysystemd/reader.pyx"
              __pyx_v_result = sd_journal_add_conjunction(__pyx_v_self->context);

              /* "cysystemd/reader.pyx":496
 *                 elif operand == MatchOperation.AND:
 *                     result = sd_journal_add_conjunction(self.context)
 *                     return check_error_code(result)             # <<<<<<<<<<<<<<
 * 
 *                 raise ValueError('Invalid operation')
 */

#line 496 "cysystemd/reader.pyx"
              __Pyx_XDECREF(__pyx_r);

#line 496 "cysystemd/reader.pyx"
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L7_error)

#line 496 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_5);

#line 496 "cysystemd/reader.pyx"
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L7_error)

#line 496 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_3);

#line 496 "cysystemd/reader.pyx"
              __pyx_t_11 = NULL;

#line 496 "cysystemd/reader.pyx"
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {

#line 496 "cysystemd/reader.pyx"
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);

#line 496 "cysystemd/reader.pyx"
                if (likely(__pyx_t_11)) {

#line 496 "cysystemd/reader.pyx"
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);

#line 496 "cysystemd/reader.pyx"
                  __Pyx_INCREF(__pyx_t_11);

#line 496 "cysystemd/reader.pyx"
                  __Pyx_INCREF(function);

#line 496 "cysystemd/reader.pyx"
                  __Pyx_DECREF_SET(__pyx_t_5, function);

#line 496 "cysystemd/reader.pyx"
                }

#line 496 "cysystemd/reader.pyx"
              }

#line 496 "cysystemd/reader.pyx"
              __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);

#line 496 "cysystemd/reader.pyx"
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 496 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 496 "cysystemd/reader.pyx"
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L7_error)

#line 496 "cysystemd/reader.pyx"
              __Pyx_GOTREF(__pyx_t_2);

#line 496 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 496 "cysystemd/reader.pyx"
              __pyx_r = __pyx_t_2;

#line 496 "cysystemd/reader.pyx"
              __pyx_t_2 = 0;

#line 496 "cysystemd/reader.pyx"
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 496 "cysystemd/reader.pyx"
              goto __pyx_L11_try_return;

              /* "cysystemd/reader.pyx":494
 *                     return check_error_code(result)
 * 
 *                 elif operand == MatchOperation.AND:             # <<<<<<<<<<<<<<
 *                     result = sd_journal_add_conjunction(self.context)
 *                     return check_error_code(result)
 */

#line 494 "cysystemd/reader.pyx"
            }

            /* "cysystemd/reader.pyx":498
 *                     return check_error_code(result)
 * 
 *                 raise ValueError('Invalid operation')             # <<<<<<<<<<<<<<
 * 
 *     def clear_filter(self):
 */

#line 498 "cysystemd/reader.pyx"
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L7_error)

#line 498 "cysystemd/reader.pyx"
            __Pyx_GOTREF(__pyx_t_2);

#line 498 "cysystemd/reader.pyx"
            __Pyx_Raise(__pyx_t_2, 0, 0, 0);

#line 498 "cysystemd/reader.pyx"
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 498 "cysystemd/reader.pyx"
            __PYX_ERR(0, 498, __pyx_L7_error)

            /* "cysystemd/reader.pyx":486
 * 
 *         with self._lock():
 *             for operand, exp in rule:             # <<<<<<<<<<<<<<
 *                 result = sd_journal_add_match(self.context, exp, 0)
 *                 check_error_code(result)
 */

#line 486 "cysystemd/reader.pyx"
          }

#line 486 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "cysystemd/reader.pyx":485
 *         cdef char* exp
 * 
 *         with self._lock():             # <<<<<<<<<<<<<<
 *             for operand, exp in rule:
 *                 result = sd_journal_add_match(self.context, exp, 0)
 */

#line 485 "cysystemd/reader.pyx"
        }

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 485 "cysystemd/reader.pyx"
        goto __pyx_L12_try_end;

#line 485 "cysystemd/reader.pyx"
        __pyx_L7_error:;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 485 "cysystemd/reader.pyx"
        /*except:*/ {

#line 485 "cysystemd/reader.pyx"
          __Pyx_AddTraceback("cysystemd.reader.JournalReader.add_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 485 "cysystemd/reader.pyx"
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_5) < 0) __PYX_ERR(0, 485, __pyx_L9_except_error)

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_1);

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_5);

#line 485 "cysystemd/reader.pyx"
          __pyx_t_3 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L9_except_error)

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_3);

#line 485 "cysystemd/reader.pyx"
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 485 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 485, __pyx_L9_except_error)

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_15);

#line 485 "cysystemd/reader.pyx"
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_15);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

#line 485 "cysystemd/reader.pyx"
          if (__pyx_t_14 < 0) __PYX_ERR(0, 485, __pyx_L9_except_error)

#line 485 "cysystemd/reader.pyx"
          __pyx_t_16 = ((!(__pyx_t_14 != 0)) != 0);

#line 485 "cysystemd/reader.pyx"
          if (__pyx_t_16) {

#line 485 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_1);

#line 485 "cysystemd/reader.pyx"
            __Pyx_GIVEREF(__pyx_t_2);

#line 485 "cysystemd/reader.pyx"
            __Pyx_XGIVEREF(__pyx_t_5);

#line 485 "cysystemd/reader.pyx"
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_5);
            __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; 
#line 485 "cysystemd/reader.pyx"


#line 485 "cysystemd/reader.pyx"
            __PYX_ERR(0, 485, __pyx_L9_except_error)

#line 485 "cysystemd/reader.pyx"
          }

#line 485 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 485 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 485 "cysystemd/reader.pyx"
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 485 "cysystemd/reader.pyx"
          goto __pyx_L8_exception_handled;

#line 485 "cysystemd/reader.pyx"
        }

#line 485 "cysystemd/reader.pyx"
        __pyx_L9_except_error:;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        goto __pyx_L1_error;

#line 485 "cysystemd/reader.pyx"
        __pyx_L11_try_return:;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        goto __pyx_L4_return;

#line 485 "cysystemd/reader.pyx"
        __pyx_L8_exception_handled:;

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_6);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_7);

#line 485 "cysystemd/reader.pyx"
        __Pyx_XGIVEREF(__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);

#line 485 "cysystemd/reader.pyx"
        __pyx_L12_try_end:;

#line 485 "cysystemd/reader.pyx"
      }

#line 485 "cysystemd/reader.pyx"
    }

#line 485 "cysystemd/reader.pyx"
    /*finally:*/ {

#line 485 "cysystemd/reader.pyx"
      /*normal exit:*/{

#line 485 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 485 "cysystemd/reader.pyx"
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 485 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 485, __pyx_L1_error)

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_8);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 485 "cysystemd/reader.pyx"
        }

#line 485 "cysystemd/reader.pyx"
        goto __pyx_L6;

#line 485 "cysystemd/reader.pyx"
      }

#line 485 "cysystemd/reader.pyx"
      __pyx_L4_return: {

#line 485 "cysystemd/reader.pyx"
        __pyx_t_8 = __pyx_r;

#line 485 "cysystemd/reader.pyx"
        __pyx_r = 0;

#line 485 "cysystemd/reader.pyx"
        if (__pyx_t_4) {

#line 485 "cysystemd/reader.pyx"
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__14, NULL);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 485 "cysystemd/reader.pyx"
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error)

#line 485 "cysystemd/reader.pyx"
          __Pyx_GOTREF(__pyx_t_7);

#line 485 "cysystemd/reader.pyx"
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 485 "cysystemd/reader.pyx"
        }

#line 485 "cysystemd/reader.pyx"
        __pyx_r = __pyx_t_8;

#line 485 "cysystemd/reader.pyx"
        __pyx_t_8 = 0;

#line 485 "cysystemd/reader.pyx"
        goto __pyx_L0;

#line 485 "cysystemd/reader.pyx"
      }

#line 485 "cysystemd/reader.pyx"
      __pyx_L6:;

#line 485 "cysystemd/reader.pyx"
    }

#line 485 "cysystemd/reader.pyx"
    goto __pyx_L21;

#line 485 "cysystemd/reader.pyx"
    __pyx_L3_error:;

#line 485 "cysystemd/reader.pyx"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 485 "cysystemd/reader.pyx"
    goto __pyx_L1_error;

#line 485 "cysystemd/reader.pyx"
    __pyx_L21:;

#line 485 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":481
 *         return check_error_code(result)
 * 
 *     def add_filter(self, Rule rule):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* exp
 */

#line 481 "cysystemd/reader.pyx"


#line 481 "cysystemd/reader.pyx"
  /* function exit code */

#line 481 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 481 "cysystemd/reader.pyx"
  goto __pyx_L0;

#line 481 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_11);

#line 481 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.add_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 481 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 481 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 481 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_operand);

#line 481 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 481 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 481 "cysystemd/reader.pyx"
  return __pyx_r;

#line 481 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":500
 *                 raise ValueError('Invalid operation')
 * 
 *     def clear_filter(self):             # <<<<<<<<<<<<<<
 *         sd_journal_flush_matches(self.context)
 * 
 */

#line 500 "cysystemd/reader.pyx"


#line 500 "cysystemd/reader.pyx"
/* Python wrapper */

#line 500 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_36clear_filter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 500 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_36clear_filter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 500 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("clear_filter (wrapper)", 0);
  __pyx_r = 
#line 500 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_35clear_filter(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 500 "cysystemd/reader.pyx"


#line 500 "cysystemd/reader.pyx"
  /* function exit code */

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 500 "cysystemd/reader.pyx"
  return __pyx_r;

#line 500 "cysystemd/reader.pyx"
}

#line 500 "cysystemd/reader.pyx"


#line 500 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_35clear_filter(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 500 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("clear_filter", 0);

  /* "cysystemd/reader.pyx":501
 * 
 *     def clear_filter(self):
 *         sd_journal_flush_matches(self.context)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */

#line 501 "cysystemd/reader.pyx"
  sd_journal_flush_matches(__pyx_v_self->context);

  /* "cysystemd/reader.pyx":500
 *                 raise ValueError('Invalid operation')
 * 
 *     def clear_filter(self):             # <<<<<<<<<<<<<<
 *         sd_journal_flush_matches(self.context)
 * 
 */

#line 500 "cysystemd/reader.pyx"


#line 500 "cysystemd/reader.pyx"
  /* function exit code */

#line 500 "cysystemd/reader.pyx"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 500 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 500 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 500 "cysystemd/reader.pyx"
  return __pyx_r;

#line 500 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":503
 *         sd_journal_flush_matches(self.context)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<Reader[%s]: %s>" % (
 *             self.flags, 'closed' if self.closed else 'opened'
 */

#line 503 "cysystemd/reader.pyx"


#line 503 "cysystemd/reader.pyx"
/* Python wrapper */

#line 503 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_38__repr__(PyObject *__pyx_v_self); /*proto*/

#line 503 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_38__repr__(PyObject *__pyx_v_self) {

#line 503 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = 
#line 503 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_37__repr__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 503 "cysystemd/reader.pyx"


#line 503 "cysystemd/reader.pyx"
  /* function exit code */

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 503 "cysystemd/reader.pyx"
  return __pyx_r;

#line 503 "cysystemd/reader.pyx"
}

#line 503 "cysystemd/reader.pyx"


#line 503 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_37__repr__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 503 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 503 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 503 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 503 "cysystemd/reader.pyx"
  int __pyx_t_3;

#line 503 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 503 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 503 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cysystemd/reader.pyx":504
 * 
 *     def __repr__(self):
 *         return "<Reader[%s]: %s>" % (             # <<<<<<<<<<<<<<
 *             self.flags, 'closed' if self.closed else 'opened'
 *         )
 */

#line 504 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

  /* "cysystemd/reader.pyx":505
 *     def __repr__(self):
 *         return "<Reader[%s]: %s>" % (
 *             self.flags, 'closed' if self.closed else 'opened'             # <<<<<<<<<<<<<<
 *         )
 * 
 */

#line 505 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)

#line 505 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 505 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)

#line 505 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 505 "cysystemd/reader.pyx"
  if (__pyx_t_3) {

#line 505 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_n_s_closed);

#line 505 "cysystemd/reader.pyx"
    __pyx_t_1 = __pyx_n_s_closed;

#line 505 "cysystemd/reader.pyx"
  } else {

#line 505 "cysystemd/reader.pyx"
    __Pyx_INCREF(__pyx_n_s_opened);

#line 505 "cysystemd/reader.pyx"
    __pyx_t_1 = __pyx_n_s_opened;

#line 505 "cysystemd/reader.pyx"
  }

#line 505 "cysystemd/reader.pyx"
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)

#line 505 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 505 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_self->flags);

#line 505 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_v_self->flags);

#line 505 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->flags);

#line 505 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_1);

#line 505 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);

#line 505 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":504
 * 
 *     def __repr__(self):
 *         return "<Reader[%s]: %s>" % (             # <<<<<<<<<<<<<<
 *             self.flags, 'closed' if self.closed else 'opened'
 *         )
 */

#line 504 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Reader_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)

#line 504 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 504 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 504 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 504 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 504 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":503
 *         sd_journal_flush_matches(self.context)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<Reader[%s]: %s>" % (
 *             self.flags, 'closed' if self.closed else 'opened'
 */

#line 503 "cysystemd/reader.pyx"


#line 503 "cysystemd/reader.pyx"
  /* function exit code */

#line 503 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 503 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 503 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 503 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 503 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 503 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 503 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 503 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 503 "cysystemd/reader.pyx"
  return __pyx_r;

#line 503 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":508
 *         )
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         sd_journal_close(self.context)
 * 
 */

#line 508 "cysystemd/reader.pyx"


#line 508 "cysystemd/reader.pyx"
/* Python wrapper */

#line 508 "cysystemd/reader.pyx"
static void __pyx_pw_9cysystemd_6reader_13JournalReader_40__dealloc__(PyObject *__pyx_v_self); /*proto*/

#line 508 "cysystemd/reader.pyx"
static void __pyx_pw_9cysystemd_6reader_13JournalReader_40__dealloc__(PyObject *__pyx_v_self) {

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);

#line 508 "cysystemd/reader.pyx"
  __pyx_pf_9cysystemd_6reader_13JournalReader_39__dealloc__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 508 "cysystemd/reader.pyx"


#line 508 "cysystemd/reader.pyx"
  /* function exit code */

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 508 "cysystemd/reader.pyx"
}

#line 508 "cysystemd/reader.pyx"


#line 508 "cysystemd/reader.pyx"
static void __pyx_pf_9cysystemd_6reader_13JournalReader_39__dealloc__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cysystemd/reader.pyx":509
 * 
 *     def __dealloc__(self):
 *         sd_journal_close(self.context)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 509 "cysystemd/reader.pyx"
  sd_journal_close(__pyx_v_self->context);

  /* "cysystemd/reader.pyx":508
 *         )
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         sd_journal_close(self.context)
 * 
 */

#line 508 "cysystemd/reader.pyx"


#line 508 "cysystemd/reader.pyx"
  /* function exit code */

#line 508 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 508 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":512
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return check_error_code(sd_journal_get_fd(self.context))
 * 
 */

#line 512 "cysystemd/reader.pyx"


#line 512 "cysystemd/reader.pyx"
/* Python wrapper */

#line 512 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 512 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_2fd_1__get__(PyObject *__pyx_v_self) {

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 512 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_2fd___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 512 "cysystemd/reader.pyx"


#line 512 "cysystemd/reader.pyx"
  /* function exit code */

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 512 "cysystemd/reader.pyx"
  return __pyx_r;

#line 512 "cysystemd/reader.pyx"
}

#line 512 "cysystemd/reader.pyx"


#line 512 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_2fd___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 512 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 512 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 512 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 512 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":513
 *     @property
 *     def fd(self):
 *         return check_error_code(sd_journal_get_fd(self.context))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 513 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 513 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)

#line 513 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 513 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(sd_journal_get_fd(__pyx_v_self->context)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)

#line 513 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 513 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 513 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 513 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 513 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 513 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 513 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 513 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 513 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 513 "cysystemd/reader.pyx"
    }

#line 513 "cysystemd/reader.pyx"
  }

#line 513 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 513 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 513 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 513 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)

#line 513 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 513 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 513 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 513 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 513 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":512
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return check_error_code(sd_journal_get_fd(self.context))
 * 
 */

#line 512 "cysystemd/reader.pyx"


#line 512 "cysystemd/reader.pyx"
  /* function exit code */

#line 512 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 512 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 512 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 512 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 512 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 512 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 512 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 512 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 512 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 512 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 512 "cysystemd/reader.pyx"
  return __pyx_r;

#line 512 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":516
 * 
 *     @property
 *     def events(self):             # <<<<<<<<<<<<<<
 *         return Poll(check_error_code(sd_journal_get_events(self.context)))
 * 
 */

#line 516 "cysystemd/reader.pyx"


#line 516 "cysystemd/reader.pyx"
/* Python wrapper */

#line 516 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6events_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 516 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_6events_1__get__(PyObject *__pyx_v_self) {

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 516 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_6events___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 516 "cysystemd/reader.pyx"


#line 516 "cysystemd/reader.pyx"
  /* function exit code */

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 516 "cysystemd/reader.pyx"
  return __pyx_r;

#line 516 "cysystemd/reader.pyx"
}

#line 516 "cysystemd/reader.pyx"


#line 516 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_6events___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 516 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 516 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 516 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 516 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":517
 *     @property
 *     def events(self):
 *         return Poll(check_error_code(sd_journal_get_events(self.context)))             # <<<<<<<<<<<<<<
 * 
 *     @property
 */

#line 517 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 517 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Poll); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)

#line 517 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 517 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error)

#line 517 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 517 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyInt_From_int(sd_journal_get_events(__pyx_v_self->context)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)

#line 517 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_5);

#line 517 "cysystemd/reader.pyx"
  __pyx_t_6 = NULL;

#line 517 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {

#line 517 "cysystemd/reader.pyx"
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);

#line 517 "cysystemd/reader.pyx"
    if (likely(__pyx_t_6)) {

#line 517 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);

#line 517 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_6);

#line 517 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 517 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_4, function);

#line 517 "cysystemd/reader.pyx"
    }

#line 517 "cysystemd/reader.pyx"
  }

#line 517 "cysystemd/reader.pyx"
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);

#line 517 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 517 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 517 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L1_error)

#line 517 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 517 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 517 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 517 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 517 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 517 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 517 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 517 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 517 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 517 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 517 "cysystemd/reader.pyx"
    }

#line 517 "cysystemd/reader.pyx"
  }

#line 517 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 517 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 517 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 517 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)

#line 517 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 517 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 517 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 517 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 517 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":516
 * 
 *     @property
 *     def events(self):             # <<<<<<<<<<<<<<
 *         return Poll(check_error_code(sd_journal_get_events(self.context)))
 * 
 */

#line 516 "cysystemd/reader.pyx"


#line 516 "cysystemd/reader.pyx"
  /* function exit code */

#line 516 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 516 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 516 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.events.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 516 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 516 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 516 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 516 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 516 "cysystemd/reader.pyx"
  return __pyx_r;

#line 516 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":520
 * 
 *     @property
 *     def timeout(self):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout
 *         check_error_code(sd_journal_get_timeout(self.context, &timeout))
 */

#line 520 "cysystemd/reader.pyx"


#line 520 "cysystemd/reader.pyx"
/* Python wrapper */

#line 520 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_7timeout_1__get__(PyObject *__pyx_v_self); /*proto*/

#line 520 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_7timeout_1__get__(PyObject *__pyx_v_self) {

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = 
#line 520 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_7timeout___get__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 520 "cysystemd/reader.pyx"


#line 520 "cysystemd/reader.pyx"
  /* function exit code */

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 520 "cysystemd/reader.pyx"
  return __pyx_r;

#line 520 "cysystemd/reader.pyx"
}

#line 520 "cysystemd/reader.pyx"


#line 520 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_7timeout___get__(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {
  uint64_t __pyx_v_timeout
#line 520 "cysystemd/reader.pyx"
;

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 520 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 520 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 520 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 520 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cysystemd/reader.pyx":522
 *     def timeout(self):
 *         cdef uint64_t timeout
 *         check_error_code(sd_journal_get_timeout(self.context, &timeout))             # <<<<<<<<<<<<<<
 *         return timeout
 * 
 */

#line 522 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)

#line 522 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 522 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(sd_journal_get_timeout(__pyx_v_self->context, (&__pyx_v_timeout))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)

#line 522 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 522 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 522 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 522 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 522 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 522 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 522 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 522 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 522 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 522 "cysystemd/reader.pyx"
    }

#line 522 "cysystemd/reader.pyx"
  }

#line 522 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 522 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 522 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 522 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)

#line 522 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 522 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 522 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":523
 *         cdef uint64_t timeout
 *         check_error_code(sd_journal_get_timeout(self.context, &timeout))
 *         return timeout             # <<<<<<<<<<<<<<
 * 
 *     def process_events(self):
 */

#line 523 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 523 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)

#line 523 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 523 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 523 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 523 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":520
 * 
 *     @property
 *     def timeout(self):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout
 *         check_error_code(sd_journal_get_timeout(self.context, &timeout))
 */

#line 520 "cysystemd/reader.pyx"


#line 520 "cysystemd/reader.pyx"
  /* function exit code */

#line 520 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 520 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 520 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 520 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 520 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 520 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.timeout.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 520 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 520 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 520 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 520 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 520 "cysystemd/reader.pyx"
  return __pyx_r;

#line 520 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":525
 *         return timeout
 * 
 *     def process_events(self):             # <<<<<<<<<<<<<<
 *         return JournalEvent(check_error_code(sd_journal_process(self.context)))
 * 
 */

#line 525 "cysystemd/reader.pyx"


#line 525 "cysystemd/reader.pyx"
/* Python wrapper */

#line 525 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_42process_events(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 525 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_42process_events(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("process_events (wrapper)", 0);
  __pyx_r = 
#line 525 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_41process_events(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 525 "cysystemd/reader.pyx"


#line 525 "cysystemd/reader.pyx"
  /* function exit code */

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 525 "cysystemd/reader.pyx"
  return __pyx_r;

#line 525 "cysystemd/reader.pyx"
}

#line 525 "cysystemd/reader.pyx"


#line 525 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_41process_events(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 525 "cysystemd/reader.pyx"
  PyObject *__pyx_t_6 = NULL;

#line 525 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 525 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 525 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("process_events", 0);

  /* "cysystemd/reader.pyx":526
 * 
 *     def process_events(self):
 *         return JournalEvent(check_error_code(sd_journal_process(self.context)))             # <<<<<<<<<<<<<<
 * 
 *     def get_catalog(self):
 */

#line 526 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 526 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_JournalEvent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)

#line 526 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 526 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error)

#line 526 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 526 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyInt_From_int(sd_journal_process(__pyx_v_self->context)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error)

#line 526 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_5);

#line 526 "cysystemd/reader.pyx"
  __pyx_t_6 = NULL;

#line 526 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {

#line 526 "cysystemd/reader.pyx"
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);

#line 526 "cysystemd/reader.pyx"
    if (likely(__pyx_t_6)) {

#line 526 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);

#line 526 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_6);

#line 526 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 526 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_4, function);

#line 526 "cysystemd/reader.pyx"
    }

#line 526 "cysystemd/reader.pyx"
  }

#line 526 "cysystemd/reader.pyx"
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);

#line 526 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 526 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 526 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error)

#line 526 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 526 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 526 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 526 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 526 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 526 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 526 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 526 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 526 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 526 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 526 "cysystemd/reader.pyx"
    }

#line 526 "cysystemd/reader.pyx"
  }

#line 526 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 526 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 526 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 526 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)

#line 526 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 526 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 526 "cysystemd/reader.pyx"
  __pyx_r = __pyx_t_1;

#line 526 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

#line 526 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":525
 *         return timeout
 * 
 *     def process_events(self):             # <<<<<<<<<<<<<<
 *         return JournalEvent(check_error_code(sd_journal_process(self.context)))
 * 
 */

#line 525 "cysystemd/reader.pyx"


#line 525 "cysystemd/reader.pyx"
  /* function exit code */

#line 525 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 525 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_6);

#line 525 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.process_events", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 525 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 525 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 525 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 525 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 525 "cysystemd/reader.pyx"
  return __pyx_r;

#line 525 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":528
 *         return JournalEvent(check_error_code(sd_journal_process(self.context)))
 * 
 *     def get_catalog(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* catalog
 */

#line 528 "cysystemd/reader.pyx"


#line 528 "cysystemd/reader.pyx"
/* Python wrapper */

#line 528 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_44get_catalog(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 528 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_44get_catalog(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_catalog (wrapper)", 0);
  __pyx_r = 
#line 528 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_43get_catalog(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 528 "cysystemd/reader.pyx"


#line 528 "cysystemd/reader.pyx"
  /* function exit code */

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 528 "cysystemd/reader.pyx"
  return __pyx_r;

#line 528 "cysystemd/reader.pyx"
}

#line 528 "cysystemd/reader.pyx"


#line 528 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_43get_catalog(struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {
  int __pyx_v_result
#line 528 "cysystemd/reader.pyx"
;
  char *__pyx_v_catalog
#line 528 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_bcatalog = 0
#line 528 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_length = NULL
#line 528 "cysystemd/reader.pyx"
;

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_t_2 = NULL;

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 528 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 528 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_5;

#line 528 "cysystemd/reader.pyx"
  int __pyx_t_6;

#line 528 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_7;

#line 528 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 528 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 528 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_catalog", 0);

  /* "cysystemd/reader.pyx":533
 *         cdef bytes bcatalog
 * 
 *         result = sd_journal_get_catalog(self.context, &catalog)             # <<<<<<<<<<<<<<
 * 
 *         length = check_error_code(result)
 */

#line 533 "cysystemd/reader.pyx"
  __pyx_v_result = sd_journal_get_catalog(__pyx_v_self->context, (&__pyx_v_catalog));

  /* "cysystemd/reader.pyx":535
 *         result = sd_journal_get_catalog(self.context, &catalog)
 * 
 *         length = check_error_code(result)             # <<<<<<<<<<<<<<
 *         bcatalog = catalog[:length]
 *         PyMem_Free(catalog)
 */

#line 535 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)

#line 535 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 535 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)

#line 535 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 535 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 535 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 535 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 535 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 535 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 535 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 535 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 535 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 535 "cysystemd/reader.pyx"
    }

#line 535 "cysystemd/reader.pyx"
  }

#line 535 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);

#line 535 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 535 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 535 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)

#line 535 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 535 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 535 "cysystemd/reader.pyx"
  __pyx_v_length = __pyx_t_1;

#line 535 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":536
 * 
 *         length = check_error_code(result)
 *         bcatalog = catalog[:length]             # <<<<<<<<<<<<<<
 *         PyMem_Free(catalog)
 * 
 */

#line 536 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_length);

#line 536 "cysystemd/reader.pyx"
  __pyx_t_1 = __pyx_v_length;

#line 536 "cysystemd/reader.pyx"
  __pyx_t_6 = (__pyx_t_1 == Py_None);

#line 536 "cysystemd/reader.pyx"
  if (__pyx_t_6) {

#line 536 "cysystemd/reader.pyx"
    __pyx_t_5 = PY_SSIZE_T_MAX;

#line 536 "cysystemd/reader.pyx"
  } else {

#line 536 "cysystemd/reader.pyx"
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 536, __pyx_L1_error)

#line 536 "cysystemd/reader.pyx"
    __pyx_t_5 = __pyx_t_7;

#line 536 "cysystemd/reader.pyx"
  }

#line 536 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 536 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_catalog + 0, __pyx_t_5 - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)

#line 536 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 536 "cysystemd/reader.pyx"
  __pyx_v_bcatalog = ((PyObject*)__pyx_t_1);

#line 536 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":537
 *         length = check_error_code(result)
 *         bcatalog = catalog[:length]
 *         PyMem_Free(catalog)             # <<<<<<<<<<<<<<
 * 
 *         return bcatalog
 */

#line 537 "cysystemd/reader.pyx"
  PyMem_Free(__pyx_v_catalog);

  /* "cysystemd/reader.pyx":539
 *         PyMem_Free(catalog)
 * 
 *         return bcatalog             # <<<<<<<<<<<<<<
 * 
 *     def get_catalog_for_message_id(self, message_id):
 */

#line 539 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 539 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_bcatalog);

#line 539 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_bcatalog;

#line 539 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":528
 *         return JournalEvent(check_error_code(sd_journal_process(self.context)))
 * 
 *     def get_catalog(self):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* catalog
 */

#line 528 "cysystemd/reader.pyx"


#line 528 "cysystemd/reader.pyx"
  /* function exit code */

#line 528 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_2);

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 528 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.get_catalog", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 528 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 528 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_bcatalog);

#line 528 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_length);

#line 528 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 528 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 528 "cysystemd/reader.pyx"
  return __pyx_r;

#line 528 "cysystemd/reader.pyx"
}

/* "cysystemd/reader.pyx":541
 *         return bcatalog
 * 
 *     def get_catalog_for_message_id(self, message_id):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* catalog
 */

#line 541 "cysystemd/reader.pyx"


#line 541 "cysystemd/reader.pyx"
/* Python wrapper */

#line 541 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_46get_catalog_for_message_id(PyObject *__pyx_v_self, PyObject *__pyx_v_message_id); /*proto*/

#line 541 "cysystemd/reader.pyx"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_46get_catalog_for_message_id(PyObject *__pyx_v_self, PyObject *__pyx_v_message_id) {

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_r = 0;

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_catalog_for_message_id (wrapper)", 0);
  __pyx_r = 
#line 541 "cysystemd/reader.pyx"
__pyx_pf_9cysystemd_6reader_13JournalReader_45get_catalog_for_message_id(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((PyObject *)__pyx_v_message_id));

#line 541 "cysystemd/reader.pyx"


#line 541 "cysystemd/reader.pyx"
  /* function exit code */

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 541 "cysystemd/reader.pyx"
  return __pyx_r;

#line 541 "cysystemd/reader.pyx"
}

#line 541 "cysystemd/reader.pyx"


#line 541 "cysystemd/reader.pyx"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_45get_catalog_for_message_id(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, PyObject *__pyx_v_message_id) {
  int __pyx_v_result
#line 541 "cysystemd/reader.pyx"
;
  char *__pyx_v_catalog
#line 541 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_bcatalog = 0
#line 541 "cysystemd/reader.pyx"
;
  sd_id128_t __pyx_v_id128
#line 541 "cysystemd/reader.pyx"
;
  PyObject *__pyx_v_length = NULL
#line 541 "cysystemd/reader.pyx"
;

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_r = NULL;

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannyDeclarations

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_t_1 = NULL;

#line 541 "cysystemd/reader.pyx"
  uint8_t __pyx_t_2[16];

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_t_3 = NULL;

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_t_4 = NULL;

#line 541 "cysystemd/reader.pyx"
  PyObject *__pyx_t_5 = NULL;

#line 541 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_6;

#line 541 "cysystemd/reader.pyx"
  int __pyx_t_7;

#line 541 "cysystemd/reader.pyx"
  Py_ssize_t __pyx_t_8;

#line 541 "cysystemd/reader.pyx"
  int __pyx_lineno = 0;

#line 541 "cysystemd/reader.pyx"
  const char *__pyx_filename = NULL;

#line 541 "cysystemd/reader.pyx"
  int __pyx_clineno = 0;

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannySetupContext("get_catalog_for_message_id", 0);

  /* "cysystemd/reader.pyx":547
 *         cdef sd_id128_t id128
 * 
 *         id128.bytes = message_id.bytes             # <<<<<<<<<<<<<<
 * 
 *         with nogil:
 */

#line 547 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_message_id, __pyx_n_s_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)

#line 547 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 547 "cysystemd/reader.pyx"
  if (unlikely(__Pyx_carray_from_py_uint8_t(__pyx_t_1, __pyx_t_2, 16) < 0)) __PYX_ERR(0, 547, __pyx_L1_error)

#line 547 "cysystemd/reader.pyx"
  memcpy(&(__pyx_v_id128.bytes[0]), __pyx_t_2, sizeof(__pyx_v_id128.bytes[0]) * (16));

#line 547 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":549
 *         id128.bytes = message_id.bytes
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_get_catalog_for_message_id(id128, &catalog)
 * 
 */

#line 549 "cysystemd/reader.pyx"
  {

#line 549 "cysystemd/reader.pyx"
      #ifdef WITH_THREAD

#line 549 "cysystemd/reader.pyx"
      PyThreadState *_save;

#line 549 "cysystemd/reader.pyx"
      Py_UNBLOCK_THREADS

#line 549 "cysystemd/reader.pyx"
      __Pyx_FastGIL_Remember();

#line 549 "cysystemd/reader.pyx"
      #endif

#line 549 "cysystemd/reader.pyx"
      /*try:*/ {

        /* "cysystemd/reader.pyx":550
 * 
 *         with nogil:
 *             result = sd_journal_get_catalog_for_message_id(id128, &catalog)             # <<<<<<<<<<<<<<
 * 
 *         length = check_error_code(result)
 */

#line 550 "cysystemd/reader.pyx"
        __pyx_v_result = sd_journal_get_catalog_for_message_id(__pyx_v_id128, (&__pyx_v_catalog));

#line 550 "cysystemd/reader.pyx"
      }

      /* "cysystemd/reader.pyx":549
 *         id128.bytes = message_id.bytes
 * 
 *         with nogil:             # <<<<<<<<<<<<<<
 *             result = sd_journal_get_catalog_for_message_id(id128, &catalog)
 * 
 */

#line 549 "cysystemd/reader.pyx"
      /*finally:*/ {

#line 549 "cysystemd/reader.pyx"
        /*normal exit:*/{

#line 549 "cysystemd/reader.pyx"
          #ifdef WITH_THREAD

#line 549 "cysystemd/reader.pyx"
          __Pyx_FastGIL_Forget();

#line 549 "cysystemd/reader.pyx"
          Py_BLOCK_THREADS

#line 549 "cysystemd/reader.pyx"
          #endif

#line 549 "cysystemd/reader.pyx"
          goto __pyx_L5;

#line 549 "cysystemd/reader.pyx"
        }

#line 549 "cysystemd/reader.pyx"
        __pyx_L5:;

#line 549 "cysystemd/reader.pyx"
      }

#line 549 "cysystemd/reader.pyx"
  }

  /* "cysystemd/reader.pyx":552
 *             result = sd_journal_get_catalog_for_message_id(id128, &catalog)
 * 
 *         length = check_error_code(result)             # <<<<<<<<<<<<<<
 *         bcatalog = catalog[:length]
 *         PyMem_Free(catalog)
 */

#line 552 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_check_error_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)

#line 552 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 552 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error)

#line 552 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 552 "cysystemd/reader.pyx"
  __pyx_t_5 = NULL;

#line 552 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 552 "cysystemd/reader.pyx"
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);

#line 552 "cysystemd/reader.pyx"
    if (likely(__pyx_t_5)) {

#line 552 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 552 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_5);

#line 552 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 552 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 552 "cysystemd/reader.pyx"
    }

#line 552 "cysystemd/reader.pyx"
  }

#line 552 "cysystemd/reader.pyx"
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);

#line 552 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 552 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 552 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)

#line 552 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 552 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 552 "cysystemd/reader.pyx"
  __pyx_v_length = __pyx_t_1;

#line 552 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":553
 * 
 *         length = check_error_code(result)
 *         bcatalog = catalog[:length]             # <<<<<<<<<<<<<<
 *         PyMem_Free(catalog)
 * 
 */

#line 553 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_length);

#line 553 "cysystemd/reader.pyx"
  __pyx_t_1 = __pyx_v_length;

#line 553 "cysystemd/reader.pyx"
  __pyx_t_7 = (__pyx_t_1 == Py_None);

#line 553 "cysystemd/reader.pyx"
  if (__pyx_t_7) {

#line 553 "cysystemd/reader.pyx"
    __pyx_t_6 = PY_SSIZE_T_MAX;

#line 553 "cysystemd/reader.pyx"
  } else {

#line 553 "cysystemd/reader.pyx"
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L1_error)

#line 553 "cysystemd/reader.pyx"
    __pyx_t_6 = __pyx_t_8;

#line 553 "cysystemd/reader.pyx"
  }

#line 553 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 553 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_catalog + 0, __pyx_t_6 - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)

#line 553 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 553 "cysystemd/reader.pyx"
  __pyx_v_bcatalog = ((PyObject*)__pyx_t_1);

#line 553 "cysystemd/reader.pyx"
  __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":554
 *         length = check_error_code(result)
 *         bcatalog = catalog[:length]
 *         PyMem_Free(catalog)             # <<<<<<<<<<<<<<
 * 
 *         return bcatalog
 */

#line 554 "cysystemd/reader.pyx"
  PyMem_Free(__pyx_v_catalog);

  /* "cysystemd/reader.pyx":556
 *         PyMem_Free(catalog)
 * 
 *         return bcatalog             # <<<<<<<<<<<<<<
 */

#line 556 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_r);

#line 556 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_v_bcatalog);

#line 556 "cysystemd/reader.pyx"
  __pyx_r = __pyx_v_bcatalog;

#line 556 "cysystemd/reader.pyx"
  goto __pyx_L0;

  /* "cysystemd/reader.pyx":541
 *         return bcatalog
 * 
 *     def get_catalog_for_message_id(self, message_id):             # <<<<<<<<<<<<<<
 *         cdef int result
 *         cdef char* catalog
 */

#line 541 "cysystemd/reader.pyx"


#line 541 "cysystemd/reader.pyx"
  /* function exit code */

#line 541 "cysystemd/reader.pyx"
  __pyx_L1_error:;

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_1);

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_3);

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4);

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_5);

#line 541 "cysystemd/reader.pyx"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.get_catalog_for_message_id", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 541 "cysystemd/reader.pyx"
  __pyx_r = NULL;

#line 541 "cysystemd/reader.pyx"
  __pyx_L0:;

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_bcatalog);

#line 541 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_v_length);

#line 541 "cysystemd/reader.pyx"
  __Pyx_XGIVEREF(__pyx_r);

#line 541 "cysystemd/reader.pyx"
  __Pyx_RefNannyFinishContext();

#line 541 "cysystemd/reader.pyx"
  return __pyx_r;

#line 541 "cysystemd/reader.pyx"
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
/* Python wrapper */

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_48__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_48__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {

#line 1 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = 
#line 1 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_13JournalReader_47__reduce_cython__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self));

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_47__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self) {

#line 1 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 1 "(tree fragment)"
  int __pyx_lineno = 0;

#line 1 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 1 "(tree fragment)"
  int __pyx_clineno = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 */

#line 2 "(tree fragment)"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)

#line 2 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 2 "(tree fragment)"
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 2 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 2 "(tree fragment)"
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __pyx_L1_error:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 1 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 1 "(tree fragment)"
  __pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 */

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
/* Python wrapper */

#line 3 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_50__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/

#line 3 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_13JournalReader_50__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {

#line 3 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 3 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 3 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = 
#line 3 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_13JournalReader_49__setstate_cython__(((struct __pyx_obj_9cysystemd_6reader_JournalReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
  /* function exit code */

#line 3 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 3 "(tree fragment)"
  return __pyx_r;

#line 3 "(tree fragment)"
}

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_13JournalReader_49__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9cysystemd_6reader_JournalReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {

#line 3 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 3 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 3 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 3 "(tree fragment)"
  int __pyx_lineno = 0;

#line 3 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 3 "(tree fragment)"
  int __pyx_clineno = 0;

#line 3 "(tree fragment)"
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */

#line 4 "(tree fragment)"
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)

#line 4 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 4 "(tree fragment)"
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);

#line 4 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 4 "(tree fragment)"
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 */

#line 3 "(tree fragment)"


#line 3 "(tree fragment)"
  /* function exit code */

#line 3 "(tree fragment)"
  __pyx_L1_error:;

#line 3 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 3 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.JournalReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 3 "(tree fragment)"
  __pyx_r = NULL;

#line 3 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 3 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 3 "(tree fragment)"
  return __pyx_r;

#line 3 "(tree fragment)"
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Rule(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
/* Python wrapper */

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_3__pyx_unpickle_Rule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9cysystemd_6reader_3__pyx_unpickle_Rule = 
#line 1 "(tree fragment)"
{"__pyx_unpickle_Rule", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_3__pyx_unpickle_Rule, METH_VARARGS|METH_KEYWORDS, 0};

#line 1 "(tree fragment)"
static PyObject *__pyx_pw_9cysystemd_6reader_3__pyx_unpickle_Rule(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0
#line 1 "(tree fragment)"
;
  long __pyx_v___pyx_checksum
#line 1 "(tree fragment)"
;
  PyObject *__pyx_v___pyx_state = 0
#line 1 "(tree fragment)"
;

#line 1 "(tree fragment)"
  int __pyx_lineno = 0;

#line 1 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 1 "(tree fragment)"
  int __pyx_clineno = 0;

#line 1 "(tree fragment)"
  PyObject *__pyx_r = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__pyx_unpickle_Rule (wrapper)", 0);

#line 1 "(tree fragment)"
  {

#line 1 "(tree fragment)"
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};

#line 1 "(tree fragment)"
    PyObject* values[3] = {0,0,0};

#line 1 "(tree fragment)"
    if (unlikely(__pyx_kwds)) {

#line 1 "(tree fragment)"
      Py_ssize_t kw_args;

#line 1 "(tree fragment)"
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);

#line 1 "(tree fragment)"
      switch (pos_args) {
        case  3: 
#line 1 "(tree fragment)"
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);

#line 1 "(tree fragment)"
        CYTHON_FALLTHROUGH;
        case  2: 
#line 1 "(tree fragment)"
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 1 "(tree fragment)"
        CYTHON_FALLTHROUGH;
        case  1: 
#line 1 "(tree fragment)"
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 1 "(tree fragment)"
        CYTHON_FALLTHROUGH;

#line 1 "(tree fragment)"
        case  0: break;
        default: 
#line 1 "(tree fragment)"
goto __pyx_L5_argtuple_error;

#line 1 "(tree fragment)"
      }

#line 1 "(tree fragment)"
      kw_args = PyDict_Size(__pyx_kwds);

#line 1 "(tree fragment)"
      switch (pos_args) {

#line 1 "(tree fragment)"
        case  0:

#line 1 "(tree fragment)"
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else 
#line 1 "(tree fragment)"
goto __pyx_L5_argtuple_error;

#line 1 "(tree fragment)"
        CYTHON_FALLTHROUGH;

#line 1 "(tree fragment)"
        case  1:

#line 1 "(tree fragment)"
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;

#line 1 "(tree fragment)"
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Rule", 1, 3, 3, 1); 
#line 1 "(tree fragment)"
__PYX_ERR(1, 1, __pyx_L3_error)

#line 1 "(tree fragment)"
        }

#line 1 "(tree fragment)"
        CYTHON_FALLTHROUGH;

#line 1 "(tree fragment)"
        case  2:

#line 1 "(tree fragment)"
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;

#line 1 "(tree fragment)"
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Rule", 1, 3, 3, 2); 
#line 1 "(tree fragment)"
__PYX_ERR(1, 1, __pyx_L3_error)

#line 1 "(tree fragment)"
        }

#line 1 "(tree fragment)"
      }

#line 1 "(tree fragment)"
      if (unlikely(kw_args > 0)) {

#line 1 "(tree fragment)"
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Rule") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)

#line 1 "(tree fragment)"
      }

#line 1 "(tree fragment)"
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {

#line 1 "(tree fragment)"
      goto __pyx_L5_argtuple_error;

#line 1 "(tree fragment)"
    } else {

#line 1 "(tree fragment)"
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);

#line 1 "(tree fragment)"
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);

#line 1 "(tree fragment)"
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);

#line 1 "(tree fragment)"
    }

#line 1 "(tree fragment)"
    __pyx_v___pyx_type = values[0];

#line 1 "(tree fragment)"
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)

#line 1 "(tree fragment)"
    __pyx_v___pyx_state = values[2];

#line 1 "(tree fragment)"
  }

#line 1 "(tree fragment)"
  goto __pyx_L4_argument_unpacking_done;

#line 1 "(tree fragment)"
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Rule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); 
#line 1 "(tree fragment)"
__PYX_ERR(1, 1, __pyx_L3_error)

#line 1 "(tree fragment)"
  __pyx_L3_error:;

#line 1 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.__pyx_unpickle_Rule", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return NULL;

#line 1 "(tree fragment)"
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = 
#line 1 "(tree fragment)"
__pyx_pf_9cysystemd_6reader_2__pyx_unpickle_Rule(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
static PyObject *__pyx_pf_9cysystemd_6reader_2__pyx_unpickle_Rule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0
#line 1 "(tree fragment)"
;
  PyObject *__pyx_v___pyx_result = 0
#line 1 "(tree fragment)"
;

#line 1 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 1 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 1 "(tree fragment)"
  int __pyx_t_1;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_2 = NULL;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_3 = NULL;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_4 = NULL;

#line 1 "(tree fragment)"
  PyObject *__pyx_t_5 = NULL;

#line 1 "(tree fragment)"
  int __pyx_t_6;

#line 1 "(tree fragment)"
  int __pyx_lineno = 0;

#line 1 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 1 "(tree fragment)"
  int __pyx_clineno = 0;

#line 1 "(tree fragment)"
  __Pyx_RefNannySetupContext("__pyx_unpickle_Rule", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb9426fe:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 */

#line 4 "(tree fragment)"
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb9426fe) != 0);

#line 4 "(tree fragment)"
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb9426fe:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 *     __pyx_result = Rule.__new__(__pyx_type)
 */

#line 5 "(tree fragment)"
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)

#line 5 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_2);

#line 5 "(tree fragment)"
    __Pyx_INCREF(__pyx_n_s_PickleError);

#line 5 "(tree fragment)"
    __Pyx_GIVEREF(__pyx_n_s_PickleError);

#line 5 "(tree fragment)"
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);

#line 5 "(tree fragment)"
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)

#line 5 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_3);

#line 5 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 5 "(tree fragment)"
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)

#line 5 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_2);

#line 5 "(tree fragment)"
    __Pyx_INCREF(__pyx_t_2);

#line 5 "(tree fragment)"
    __pyx_v___pyx_PickleError = __pyx_t_2;

#line 5 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 5 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xb9426fe:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Rule.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */

#line 6 "(tree fragment)"
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)

#line 6 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_2);

#line 6 "(tree fragment)"
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb9, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)

#line 6 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_4);

#line 6 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 6 "(tree fragment)"
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; 
#line 6 "(tree fragment)"
__pyx_t_5 = NULL;

#line 6 "(tree fragment)"
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {

#line 6 "(tree fragment)"
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);

#line 6 "(tree fragment)"
      if (likely(__pyx_t_5)) {

#line 6 "(tree fragment)"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 6 "(tree fragment)"
        __Pyx_INCREF(__pyx_t_5);

#line 6 "(tree fragment)"
        __Pyx_INCREF(function);

#line 6 "(tree fragment)"
        __Pyx_DECREF_SET(__pyx_t_2, function);

#line 6 "(tree fragment)"
      }

#line 6 "(tree fragment)"
    }

#line 6 "(tree fragment)"
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);

#line 6 "(tree fragment)"
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

#line 6 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 6 "(tree fragment)"
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)

#line 6 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_3);

#line 6 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 6 "(tree fragment)"
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);

#line 6 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 6 "(tree fragment)"
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xb9426fe:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 */

#line 4 "(tree fragment)"
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 *     __pyx_result = Rule.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 */

#line 7 "(tree fragment)"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9cysystemd_6reader_Rule), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)

#line 7 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_2);

#line 7 "(tree fragment)"
  __pyx_t_4 = NULL;

#line 7 "(tree fragment)"
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {

#line 7 "(tree fragment)"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);

#line 7 "(tree fragment)"
    if (likely(__pyx_t_4)) {

#line 7 "(tree fragment)"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);

#line 7 "(tree fragment)"
      __Pyx_INCREF(__pyx_t_4);

#line 7 "(tree fragment)"
      __Pyx_INCREF(function);

#line 7 "(tree fragment)"
      __Pyx_DECREF_SET(__pyx_t_2, function);

#line 7 "(tree fragment)"
    }

#line 7 "(tree fragment)"
  }

#line 7 "(tree fragment)"
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);

#line 7 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 7 "(tree fragment)"
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)

#line 7 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_3);

#line 7 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 7 "(tree fragment)"
  __pyx_v___pyx_result = __pyx_t_3;

#line 7 "(tree fragment)"
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 *     __pyx_result = Rule.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 *     return __pyx_result
 */

#line 8 "(tree fragment)"
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);

#line 8 "(tree fragment)"
  __pyx_t_6 = (__pyx_t_1 != 0);

#line 8 "(tree fragment)"
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = Rule.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):
 */

#line 9 "(tree fragment)"
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)

#line 9 "(tree fragment)"
    __pyx_t_3 = __pyx_f_9cysystemd_6reader___pyx_unpickle_Rule__set_state(((struct __pyx_obj_9cysystemd_6reader_Rule *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)

#line 9 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_3);

#line 9 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb9426fe = (_child, _expression, _operand, _root))" % __pyx_checksum)
 *     __pyx_result = Rule.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 *     return __pyx_result
 */

#line 8 "(tree fragment)"
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 */

#line 10 "(tree fragment)"
  __Pyx_XDECREF(__pyx_r);

#line 10 "(tree fragment)"
  __Pyx_INCREF(__pyx_v___pyx_result);

#line 10 "(tree fragment)"
  __pyx_r = __pyx_v___pyx_result;

#line 10 "(tree fragment)"
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Rule(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

#line 1 "(tree fragment)"


#line 1 "(tree fragment)"
  /* function exit code */

#line 1 "(tree fragment)"
  __pyx_L1_error:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_2);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_3);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_4);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_5);

#line 1 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.__pyx_unpickle_Rule", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 1 "(tree fragment)"
  __pyx_r = NULL;

#line 1 "(tree fragment)"
  __pyx_L0:;

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);

#line 1 "(tree fragment)"
  __Pyx_XDECREF(__pyx_v___pyx_result);

#line 1 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return __pyx_r;

#line 1 "(tree fragment)"
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

#line 11 "(tree fragment)"


#line 11 "(tree fragment)"
static PyObject *__pyx_f_9cysystemd_6reader___pyx_unpickle_Rule__set_state(struct __pyx_obj_9cysystemd_6reader_Rule *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {

#line 11 "(tree fragment)"
  PyObject *__pyx_r = NULL;

#line 11 "(tree fragment)"
  __Pyx_RefNannyDeclarations

#line 11 "(tree fragment)"
  PyObject *__pyx_t_1 = NULL;

#line 11 "(tree fragment)"
  int __pyx_t_2;

#line 11 "(tree fragment)"
  Py_ssize_t __pyx_t_3;

#line 11 "(tree fragment)"
  int __pyx_t_4;

#line 11 "(tree fragment)"
  int __pyx_t_5;

#line 11 "(tree fragment)"
  PyObject *__pyx_t_6 = NULL;

#line 11 "(tree fragment)"
  PyObject *__pyx_t_7 = NULL;

#line 11 "(tree fragment)"
  PyObject *__pyx_t_8 = NULL;

#line 11 "(tree fragment)"
  int __pyx_lineno = 0;

#line 11 "(tree fragment)"
  const char *__pyx_filename = NULL;

#line 11 "(tree fragment)"
  int __pyx_clineno = 0;

#line 11 "(tree fragment)"
  __Pyx_RefNannySetupContext("__pyx_unpickle_Rule__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */

#line 12 "(tree fragment)"
  if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 12 "(tree fragment)"
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 12 "(tree fragment)"
    __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  }

#line 12 "(tree fragment)"
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_v___pyx_result->_child);

#line 12 "(tree fragment)"
  __Pyx_DECREF(__pyx_v___pyx_result->_child);

#line 12 "(tree fragment)"
  __pyx_v___pyx_result->_child = __pyx_t_1;

#line 12 "(tree fragment)"
  __pyx_t_1 = 0;

#line 12 "(tree fragment)"
  if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 12 "(tree fragment)"
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 12 "(tree fragment)"
    __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  }

#line 12 "(tree fragment)"
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_v___pyx_result->_expression);

#line 12 "(tree fragment)"
  __Pyx_DECREF(__pyx_v___pyx_result->_expression);

#line 12 "(tree fragment)"
  __pyx_v___pyx_result->_expression = __pyx_t_1;

#line 12 "(tree fragment)"
  __pyx_t_1 = 0;

#line 12 "(tree fragment)"
  if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 12 "(tree fragment)"
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 12 "(tree fragment)"
    __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  }

#line 12 "(tree fragment)"
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_v___pyx_result->_operand);

#line 12 "(tree fragment)"
  __Pyx_DECREF(__pyx_v___pyx_result->_operand);

#line 12 "(tree fragment)"
  __pyx_v___pyx_result->_operand = __pyx_t_1;

#line 12 "(tree fragment)"
  __pyx_t_1 = 0;

#line 12 "(tree fragment)"
  if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 12 "(tree fragment)"
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 12 "(tree fragment)"
    __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  }

#line 12 "(tree fragment)"
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_t_1);

#line 12 "(tree fragment)"
  __Pyx_GOTREF(__pyx_v___pyx_result->_root);

#line 12 "(tree fragment)"
  __Pyx_DECREF(__pyx_v___pyx_result->_root);

#line 12 "(tree fragment)"
  __pyx_v___pyx_result->_root = __pyx_t_1;

#line 12 "(tree fragment)"
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */

#line 13 "(tree fragment)"
  if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 13 "(tree fragment)"
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");

#line 13 "(tree fragment)"
    __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
  }

#line 13 "(tree fragment)"
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);

#line 13 "(tree fragment)"
  if (__pyx_t_4) {

#line 13 "(tree fragment)"
  } else {

#line 13 "(tree fragment)"
    __pyx_t_2 = __pyx_t_4;

#line 13 "(tree fragment)"
    goto __pyx_L4_bool_binop_done;

#line 13 "(tree fragment)"
  }

#line 13 "(tree fragment)"
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)

#line 13 "(tree fragment)"
  __pyx_t_5 = (__pyx_t_4 != 0);

#line 13 "(tree fragment)"
  __pyx_t_2 = __pyx_t_5;

#line 13 "(tree fragment)"
  __pyx_L4_bool_binop_done:;

#line 13 "(tree fragment)"
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */

#line 14 "(tree fragment)"
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)

#line 14 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_6);

#line 14 "(tree fragment)"
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)

#line 14 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_7);

#line 14 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 14 "(tree fragment)"
    if (unlikely(__pyx_v___pyx_state == Py_None)) {

#line 14 "(tree fragment)"
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");

#line 14 "(tree fragment)"
      __PYX_ERR(1, 14, __pyx_L1_error)

#line 14 "(tree fragment)"
    }

#line 14 "(tree fragment)"
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)

#line 14 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_6);

#line 14 "(tree fragment)"
    __pyx_t_8 = NULL;

#line 14 "(tree fragment)"
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {

#line 14 "(tree fragment)"
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);

#line 14 "(tree fragment)"
      if (likely(__pyx_t_8)) {

#line 14 "(tree fragment)"
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);

#line 14 "(tree fragment)"
        __Pyx_INCREF(__pyx_t_8);

#line 14 "(tree fragment)"
        __Pyx_INCREF(function);

#line 14 "(tree fragment)"
        __Pyx_DECREF_SET(__pyx_t_7, function);

#line 14 "(tree fragment)"
      }

#line 14 "(tree fragment)"
    }

#line 14 "(tree fragment)"
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);

#line 14 "(tree fragment)"
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

#line 14 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

#line 14 "(tree fragment)"
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)

#line 14 "(tree fragment)"
    __Pyx_GOTREF(__pyx_t_1);

#line 14 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 14 "(tree fragment)"
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */

#line 13 "(tree fragment)"
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Rule__set_state(<Rule> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Rule__set_state(Rule __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._child = __pyx_state[0]; __pyx_result._expression = __pyx_state[1]; __pyx_result._operand = __pyx_state[2]; __pyx_result._root = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

#line 11 "(tree fragment)"


#line 11 "(tree fragment)"
  /* function exit code */

#line 11 "(tree fragment)"
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);

#line 11 "(tree fragment)"
  goto __pyx_L0;

#line 11 "(tree fragment)"
  __pyx_L1_error:;

#line 11 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_1);

#line 11 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_6);

#line 11 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_7);

#line 11 "(tree fragment)"
  __Pyx_XDECREF(__pyx_t_8);

#line 11 "(tree fragment)"
  __Pyx_AddTraceback("cysystemd.reader.__pyx_unpickle_Rule__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 11 "(tree fragment)"
  __pyx_r = 0;

#line 11 "(tree fragment)"
  __pyx_L0:;

#line 11 "(tree fragment)"
  __Pyx_XGIVEREF(__pyx_r);

#line 11 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 11 "(tree fragment)"
  return __pyx_r;

#line 11 "(tree fragment)"
}

/* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):
 *     def wrap(object path):             # <<<<<<<<<<<<<<
 *         """wrap(path) -> str"""
 *         return f(path)
 */

#line 65 "cfunc.to_py"


#line 65 "cfunc.to_py"
/* Python wrapper */

#line 65 "cfunc.to_py"
static PyObject *__pyx_pw_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/

#line 65 "cfunc.to_py"
static char __pyx_doc_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_wrap[] = "wrap(path) -> str";
static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_1wrap = 
#line 65 "cfunc.to_py"
{"wrap", (PyCFunction)__pyx_pw_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_1wrap, METH_O, __pyx_doc_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_wrap};

#line 65 "cfunc.to_py"
static PyObject *__pyx_pw_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_v_path) {

#line 65 "cfunc.to_py"
  PyObject *__pyx_r = 0;

#line 65 "cfunc.to_py"
  __Pyx_RefNannyDeclarations

#line 65 "cfunc.to_py"
  __Pyx_RefNannySetupContext("wrap (wrapper)", 0);
  __pyx_r = 
#line 65 "cfunc.to_py"
__pyx_pf_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_wrap(__pyx_self, ((PyObject *)__pyx_v_path));

#line 65 "cfunc.to_py"


#line 65 "cfunc.to_py"
  /* function exit code */

#line 65 "cfunc.to_py"
  __Pyx_RefNannyFinishContext();

#line 65 "cfunc.to_py"
  return __pyx_r;

#line 65 "cfunc.to_py"
}

#line 65 "cfunc.to_py"


#line 65 "cfunc.to_py"
static PyObject *__pyx_pf_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *__pyx_cur_scope
#line 65 "cfunc.to_py"
;
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *__pyx_outer_scope
#line 65 "cfunc.to_py"
;

#line 65 "cfunc.to_py"
  PyObject *__pyx_r = NULL;

#line 65 "cfunc.to_py"
  __Pyx_RefNannyDeclarations

#line 65 "cfunc.to_py"
  PyObject *__pyx_t_1 = NULL;

#line 65 "cfunc.to_py"
  int __pyx_lineno = 0;

#line 65 "cfunc.to_py"
  const char *__pyx_filename = NULL;

#line 65 "cfunc.to_py"
  int __pyx_clineno = 0;

#line 65 "cfunc.to_py"
  __Pyx_RefNannySetupContext("wrap", 0);

#line 65 "cfunc.to_py"
  __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self);

#line 65 "cfunc.to_py"
  __pyx_cur_scope = __pyx_outer_scope;

  /* "cfunc.to_py":67
 *     def wrap(object path):
 *         """wrap(path) -> str"""
 *         return f(path)             # <<<<<<<<<<<<<<
 *     return wrap
 * 
 */

#line 67 "cfunc.to_py"
  __Pyx_XDECREF(__pyx_r);

#line 67 "cfunc.to_py"
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)

#line 67 "cfunc.to_py"
  __Pyx_GOTREF(__pyx_t_1);

#line 67 "cfunc.to_py"
  __pyx_r = __pyx_t_1;

#line 67 "cfunc.to_py"
  __pyx_t_1 = 0;

#line 67 "cfunc.to_py"
  goto __pyx_L0;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):
 *     def wrap(object path):             # <<<<<<<<<<<<<<
 *         """wrap(path) -> str"""
 *         return f(path)
 */

#line 65 "cfunc.to_py"


#line 65 "cfunc.to_py"
  /* function exit code */

#line 65 "cfunc.to_py"
  __pyx_L1_error:;

#line 65 "cfunc.to_py"
  __Pyx_XDECREF(__pyx_t_1);

#line 65 "cfunc.to_py"
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_str____object___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 65 "cfunc.to_py"
  __pyx_r = NULL;

#line 65 "cfunc.to_py"
  __pyx_L0:;

#line 65 "cfunc.to_py"
  __Pyx_XGIVEREF(__pyx_r);

#line 65 "cfunc.to_py"
  __Pyx_RefNannyFinishContext();

#line 65 "cfunc.to_py"
  return __pyx_r;

#line 65 "cfunc.to_py"
}

/* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object path):
 *         """wrap(path) -> str"""
 */

#line 64 "cfunc.to_py"


#line 64 "cfunc.to_py"
static PyObject *__Pyx_CFunc_str____object___to_py(PyObject *(*__pyx_v_f)(PyObject *)) {
  struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *__pyx_cur_scope
#line 64 "cfunc.to_py"
;
  PyObject *__pyx_v_wrap = 0
#line 64 "cfunc.to_py"
;

#line 64 "cfunc.to_py"
  PyObject *__pyx_r = NULL;

#line 64 "cfunc.to_py"
  __Pyx_RefNannyDeclarations

#line 64 "cfunc.to_py"
  PyObject *__pyx_t_1 = NULL;

#line 64 "cfunc.to_py"
  int __pyx_lineno = 0;

#line 64 "cfunc.to_py"
  const char *__pyx_filename = NULL;

#line 64 "cfunc.to_py"
  int __pyx_clineno = 0;

#line 64 "cfunc.to_py"
  __Pyx_RefNannySetupContext("__Pyx_CFunc_str____object___to_py", 0);

#line 64 "cfunc.to_py"
  __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_str____object___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_str____object___to_py, __pyx_empty_tuple, NULL);

#line 64 "cfunc.to_py"
  if (unlikely(!__pyx_cur_scope)) {

#line 64 "cfunc.to_py"
    __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *)Py_None);

#line 64 "cfunc.to_py"
    __Pyx_INCREF(Py_None);

#line 64 "cfunc.to_py"
    __PYX_ERR(1, 64, __pyx_L1_error)

#line 64 "cfunc.to_py"
  } else {

#line 64 "cfunc.to_py"
    __Pyx_GOTREF(__pyx_cur_scope);

#line 64 "cfunc.to_py"
  }

#line 64 "cfunc.to_py"
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):
 *     def wrap(object path):             # <<<<<<<<<<<<<<
 *         """wrap(path) -> str"""
 *         return f(path)
 */

#line 65 "cfunc.to_py"
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_33__Pyx_CFunc_str____object___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_str____object___to_p, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error)

#line 65 "cfunc.to_py"
  __Pyx_GOTREF(__pyx_t_1);

#line 65 "cfunc.to_py"
  __pyx_v_wrap = __pyx_t_1;

#line 65 "cfunc.to_py"
  __pyx_t_1 = 0;

  /* "cfunc.to_py":68
 *         """wrap(path) -> str"""
 *         return f(path)
 *     return wrap             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 68 "cfunc.to_py"
  __Pyx_XDECREF(__pyx_r);

#line 68 "cfunc.to_py"
  __Pyx_INCREF(__pyx_v_wrap);

#line 68 "cfunc.to_py"
  __pyx_r = __pyx_v_wrap;

#line 68 "cfunc.to_py"
  goto __pyx_L0;

  /* "cfunc.to_py":64
 * 
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):             # <<<<<<<<<<<<<<
 *     def wrap(object path):
 *         """wrap(path) -> str"""
 */

#line 64 "cfunc.to_py"


#line 64 "cfunc.to_py"
  /* function exit code */

#line 64 "cfunc.to_py"
  __pyx_L1_error:;

#line 64 "cfunc.to_py"
  __Pyx_XDECREF(__pyx_t_1);

#line 64 "cfunc.to_py"
  __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_str____object___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 64 "cfunc.to_py"
  __pyx_r = 0;

#line 64 "cfunc.to_py"
  __pyx_L0:;

#line 64 "cfunc.to_py"
  __Pyx_XDECREF(__pyx_v_wrap);

#line 64 "cfunc.to_py"
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));

#line 64 "cfunc.to_py"
  __Pyx_XGIVEREF(__pyx_r);

#line 64 "cfunc.to_py"
  __Pyx_RefNannyFinishContext();

#line 64 "cfunc.to_py"
  return __pyx_r;

#line 64 "cfunc.to_py"
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_uint8_t")
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __Pyx_carray_from_py_uint8_t(PyObject *__pyx_v_o, uint8_t *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i
#line 77 "carray.from_py"
;
  PyObject *__pyx_v_item = NULL
#line 77 "carray.from_py"
;

#line 77 "carray.from_py"
  int __pyx_r;

#line 77 "carray.from_py"
  __Pyx_RefNannyDeclarations

#line 77 "carray.from_py"
  PyObject *__pyx_t_1 = NULL;

#line 77 "carray.from_py"
  PyObject *__pyx_t_2 = NULL;

#line 77 "carray.from_py"
  PyObject *__pyx_t_3 = NULL;

#line 77 "carray.from_py"
  Py_ssize_t __pyx_t_4;

#line 77 "carray.from_py"
  int __pyx_t_5;

#line 77 "carray.from_py"
  int __pyx_t_6;

#line 77 "carray.from_py"
  PyObject *__pyx_t_7 = NULL;

#line 77 "carray.from_py"
  Py_ssize_t __pyx_t_8;

#line 77 "carray.from_py"
  PyObject *(*__pyx_t_9)(PyObject *);

#line 77 "carray.from_py"
  PyObject *__pyx_t_10 = NULL;

#line 77 "carray.from_py"
  uint8_t __pyx_t_11;

#line 77 "carray.from_py"
  char const *__pyx_t_12;

#line 77 "carray.from_py"
  int __pyx_lineno = 0;

#line 77 "carray.from_py"
  const char *__pyx_filename = NULL;

#line 77 "carray.from_py"
  int __pyx_clineno = 0;

#line 77 "carray.from_py"
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_uint8_t", 0);

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_uint8_t")
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */

#line 78 "carray.from_py"
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */

#line 79 "carray.from_py"
  {

#line 79 "carray.from_py"
    __Pyx_PyThreadState_declare

#line 79 "carray.from_py"
    __Pyx_PyThreadState_assign

#line 79 "carray.from_py"
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);

#line 79 "carray.from_py"
    __Pyx_XGOTREF(__pyx_t_1);

#line 79 "carray.from_py"
    __Pyx_XGOTREF(__pyx_t_2);

#line 79 "carray.from_py"
    __Pyx_XGOTREF(__pyx_t_3);

#line 79 "carray.from_py"
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */

#line 80 "carray.from_py"
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)

#line 80 "carray.from_py"
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */

#line 79 "carray.from_py"
    }

#line 79 "carray.from_py"
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 79 "carray.from_py"
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 79 "carray.from_py"
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 79 "carray.from_py"
    goto __pyx_L8_try_end;

#line 79 "carray.from_py"
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */

#line 81 "carray.from_py"
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);

#line 81 "carray.from_py"
    if (__pyx_t_5) {

#line 81 "carray.from_py"
      __Pyx_ErrRestore(0,0,0);

#line 81 "carray.from_py"
      goto __pyx_L4_exception_handled;

#line 81 "carray.from_py"
    }

#line 81 "carray.from_py"
    goto __pyx_L5_except_error;

#line 81 "carray.from_py"
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_1);

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_2);

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_3);

#line 79 "carray.from_py"
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);

#line 79 "carray.from_py"
    goto __pyx_L1_error;

#line 79 "carray.from_py"
    __pyx_L4_exception_handled:;

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_1);

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_2);

#line 79 "carray.from_py"
    __Pyx_XGIVEREF(__pyx_t_3);

#line 79 "carray.from_py"
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);

#line 79 "carray.from_py"
    __pyx_L8_try_end:;

#line 79 "carray.from_py"
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */

#line 83 "carray.from_py"
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);

#line 83 "carray.from_py"
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */

#line 84 "carray.from_py"
    __pyx_t_4 = 0;

#line 84 "carray.from_py"
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {

#line 84 "carray.from_py"
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;

#line 84 "carray.from_py"
      __pyx_t_9 = NULL;

#line 84 "carray.from_py"
    } else {
      __pyx_t_8 = -1; 
#line 84 "carray.from_py"
__pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
      __Pyx_GOTREF(__pyx_t_7);

#line 84 "carray.from_py"
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
    }

#line 84 "carray.from_py"
    for (;;) {

#line 84 "carray.from_py"
      if (likely(!__pyx_t_9)) {

#line 84 "carray.from_py"
        if (likely(PyList_CheckExact(__pyx_t_7))) {

#line 84 "carray.from_py"
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;

#line 84 "carray.from_py"
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 84 "carray.from_py"
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
          #else

#line 84 "carray.from_py"
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
          __Pyx_GOTREF(__pyx_t_10);

#line 84 "carray.from_py"
          #endif

#line 84 "carray.from_py"
        } else {

#line 84 "carray.from_py"
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;

#line 84 "carray.from_py"
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS

#line 84 "carray.from_py"
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
          #else

#line 84 "carray.from_py"
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
          __Pyx_GOTREF(__pyx_t_10);

#line 84 "carray.from_py"
          #endif

#line 84 "carray.from_py"
        }
      } else 
#line 84 "carray.from_py"
{

#line 84 "carray.from_py"
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);

#line 84 "carray.from_py"
        if (unlikely(!__pyx_t_10)) {

#line 84 "carray.from_py"
          PyObject* exc_type = PyErr_Occurred();

#line 84 "carray.from_py"
          if (exc_type) {

#line 84 "carray.from_py"
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();

#line 84 "carray.from_py"
            else __PYX_ERR(1, 84, __pyx_L1_error)

#line 84 "carray.from_py"
          }

#line 84 "carray.from_py"
          break;

#line 84 "carray.from_py"
        }

#line 84 "carray.from_py"
        __Pyx_GOTREF(__pyx_t_10);

#line 84 "carray.from_py"
      }

#line 84 "carray.from_py"
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);

#line 84 "carray.from_py"
      __pyx_t_10 = 0;

#line 84 "carray.from_py"
      __pyx_v_i = __pyx_t_4;

#line 84 "carray.from_py"
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */

#line 85 "carray.from_py"
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);

#line 85 "carray.from_py"
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */

#line 86 "carray.from_py"
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */

#line 85 "carray.from_py"
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */

#line 87 "carray.from_py"
      __pyx_t_11 = __Pyx_PyInt_As_uint8_t(__pyx_v_item); if (unlikely((__pyx_t_11 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)

#line 87 "carray.from_py"
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */

#line 84 "carray.from_py"
    }

#line 84 "carray.from_py"
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */

#line 89 "carray.from_py"
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */

#line 90 "carray.from_py"
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);

#line 90 "carray.from_py"
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */

#line 91 "carray.from_py"
        __pyx_r = 0;

#line 91 "carray.from_py"
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

#line 91 "carray.from_py"
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */

#line 90 "carray.from_py"
      }

#line 90 "carray.from_py"
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */

#line 84 "carray.from_py"
    __pyx_L11_break:;

#line 84 "carray.from_py"
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */

#line 83 "carray.from_py"
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */

#line 96 "carray.from_py"
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {

#line 96 "carray.from_py"
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");

#line 96 "carray.from_py"
  } else {

#line 96 "carray.from_py"
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");

#line 96 "carray.from_py"
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */

#line 93 "carray.from_py"
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)

#line 93 "carray.from_py"
  __Pyx_GOTREF(__pyx_t_7);

#line 93 "carray.from_py"
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_uint8_t")
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

#line 77 "carray.from_py"


#line 77 "carray.from_py"
  /* function exit code */

#line 77 "carray.from_py"
  __pyx_r = 0;

#line 77 "carray.from_py"
  goto __pyx_L0;

#line 77 "carray.from_py"
  __pyx_L1_error:;

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_7);

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_10);

#line 77 "carray.from_py"
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_uint8_t", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 77 "carray.from_py"
  __pyx_r = -1;

#line 77 "carray.from_py"
  __pyx_L0:;

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_v_item);

#line 77 "carray.from_py"
  __Pyx_RefNannyFinishContext();

#line 77 "carray.from_py"
  return __pyx_r;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new_9cysystemd_6reader_Rule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_Rule *p;

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  p = ((struct __pyx_obj_9cysystemd_6reader_Rule *)o);

#line 77 "carray.from_py"
  p->_expression = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->_child = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->_root = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->_operand = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc_9cysystemd_6reader_Rule(PyObject *o) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_Rule *p = (struct __pyx_obj_9cysystemd_6reader_Rule *)o;

#line 77 "carray.from_py"
  #if CYTHON_USE_TP_FINALIZE

#line 77 "carray.from_py"
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {

#line 77 "carray.from_py"
    if (PyObject_CallFinalizerFromDealloc(o)) return;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  PyObject_GC_UnTrack(o);

#line 77 "carray.from_py"
  Py_CLEAR(p->_expression);

#line 77 "carray.from_py"
  Py_CLEAR(p->_child);

#line 77 "carray.from_py"
  Py_CLEAR(p->_root);

#line 77 "carray.from_py"
  Py_CLEAR(p->_operand);

#line 77 "carray.from_py"
  (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_traverse_9cysystemd_6reader_Rule(PyObject *o, visitproc v, void *a) {

#line 77 "carray.from_py"
  int e;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_Rule *p = (struct __pyx_obj_9cysystemd_6reader_Rule *)o;

#line 77 "carray.from_py"
  if (p->_expression) {

#line 77 "carray.from_py"
    e = (*v)(p->_expression, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->_child) {

#line 77 "carray.from_py"
    e = (*v)(p->_child, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->_root) {

#line 77 "carray.from_py"
    e = (*v)(p->_root, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->_operand) {

#line 77 "carray.from_py"
    e = (*v)(p->_operand, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_clear_9cysystemd_6reader_Rule(PyObject *o) {

#line 77 "carray.from_py"
  PyObject* tmp;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_Rule *p = (struct __pyx_obj_9cysystemd_6reader_Rule *)o;

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->_expression);

#line 77 "carray.from_py"
  p->_expression = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->_child);

#line 77 "carray.from_py"
  p->_child = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->_root);

#line 77 "carray.from_py"
  p->_root = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->_operand);

#line 77 "carray.from_py"
  p->_operand = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_4Rule_expression(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_4Rule_10expression_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_4Rule_child(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_4Rule_5child_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_setprop_9cysystemd_6reader_4Rule_child(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  if (v) {

#line 77 "carray.from_py"
    return __pyx_pw_9cysystemd_6reader_4Rule_5child_3__set__(o, v);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  else {

#line 77 "carray.from_py"
    PyErr_SetString(PyExc_NotImplementedError, "__del__");

#line 77 "carray.from_py"
    return -1;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_4Rule_root(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_4Rule_4root_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_setprop_9cysystemd_6reader_4Rule_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  if (v) {

#line 77 "carray.from_py"
    return __pyx_pw_9cysystemd_6reader_4Rule_4root_3__set__(o, v);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  else {

#line 77 "carray.from_py"
    PyErr_SetString(PyExc_NotImplementedError, "__del__");

#line 77 "carray.from_py"
    return -1;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_4Rule_operand(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_4Rule_7operand_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_setprop_9cysystemd_6reader_4Rule_operand(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  if (v) {

#line 77 "carray.from_py"
    return __pyx_pw_9cysystemd_6reader_4Rule_7operand_3__set__(o, v);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  else {

#line 77 "carray.from_py"
    PyErr_SetString(PyExc_NotImplementedError, "__del__");

#line 77 "carray.from_py"
    return -1;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyMethodDef __pyx_methods_9cysystemd_6reader_Rule[] = {

#line 77 "carray.from_py"
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_4Rule_12__reduce_cython__, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_4Rule_14__setstate_cython__, METH_O, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct PyGetSetDef __pyx_getsets_9cysystemd_6reader_Rule[] = {

#line 77 "carray.from_py"
  {(char *)"expression", __pyx_getprop_9cysystemd_6reader_4Rule_expression, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"child", __pyx_getprop_9cysystemd_6reader_4Rule_child, __pyx_setprop_9cysystemd_6reader_4Rule_child, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"root", __pyx_getprop_9cysystemd_6reader_4Rule_root, __pyx_setprop_9cysystemd_6reader_4Rule_root, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"operand", __pyx_getprop_9cysystemd_6reader_4Rule_operand, __pyx_setprop_9cysystemd_6reader_4Rule_operand, (char *)0, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyNumberMethods __pyx_tp_as_number_Rule = {

#line 77 "carray.from_py"
  0, /*nb_add*/

#line 77 "carray.from_py"
  0, /*nb_subtract*/

#line 77 "carray.from_py"
  0, /*nb_multiply*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)

#line 77 "carray.from_py"
  0, /*nb_divide*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*nb_remainder*/

#line 77 "carray.from_py"
  0, /*nb_divmod*/

#line 77 "carray.from_py"
  0, /*nb_power*/

#line 77 "carray.from_py"
  0, /*nb_negative*/

#line 77 "carray.from_py"
  0, /*nb_positive*/

#line 77 "carray.from_py"
  0, /*nb_absolute*/

#line 77 "carray.from_py"
  0, /*nb_nonzero*/

#line 77 "carray.from_py"
  0, /*nb_invert*/

#line 77 "carray.from_py"
  0, /*nb_lshift*/

#line 77 "carray.from_py"
  0, /*nb_rshift*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_4Rule_3__and__, /*nb_and*/

#line 77 "carray.from_py"
  0, /*nb_xor*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_4Rule_5__or__, /*nb_or*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)

#line 77 "carray.from_py"
  0, /*nb_coerce*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*nb_int*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*nb_long*/

#line 77 "carray.from_py"
  #else

#line 77 "carray.from_py"
  0, /*reserved*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*nb_float*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)

#line 77 "carray.from_py"
  0, /*nb_oct*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)

#line 77 "carray.from_py"
  0, /*nb_hex*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*nb_inplace_add*/

#line 77 "carray.from_py"
  0, /*nb_inplace_subtract*/

#line 77 "carray.from_py"
  0, /*nb_inplace_multiply*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)

#line 77 "carray.from_py"
  0, /*nb_inplace_divide*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*nb_inplace_remainder*/

#line 77 "carray.from_py"
  0, /*nb_inplace_power*/

#line 77 "carray.from_py"
  0, /*nb_inplace_lshift*/

#line 77 "carray.from_py"
  0, /*nb_inplace_rshift*/

#line 77 "carray.from_py"
  0, /*nb_inplace_and*/

#line 77 "carray.from_py"
  0, /*nb_inplace_xor*/

#line 77 "carray.from_py"
  0, /*nb_inplace_or*/

#line 77 "carray.from_py"
  0, /*nb_floor_divide*/

#line 77 "carray.from_py"
  0, /*nb_true_divide*/

#line 77 "carray.from_py"
  0, /*nb_inplace_floor_divide*/

#line 77 "carray.from_py"
  0, /*nb_inplace_true_divide*/

#line 77 "carray.from_py"
  0, /*nb_index*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x03050000

#line 77 "carray.from_py"
  0, /*nb_matrix_multiply*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x03050000

#line 77 "carray.from_py"
  0, /*nb_inplace_matrix_multiply*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_type_9cysystemd_6reader_Rule = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.Rule", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj_9cysystemd_6reader_Rule), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc_9cysystemd_6reader_Rule, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_4Rule_7__repr__, /*tp_repr*/

#line 77 "carray.from_py"
  &__pyx_tp_as_number_Rule, /*tp_as_number*/

#line 77 "carray.from_py"
  0, /*tp_as_sequence*/

#line 77 "carray.from_py"
  0, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  __pyx_tp_traverse_9cysystemd_6reader_Rule, /*tp_traverse*/

#line 77 "carray.from_py"
  __pyx_tp_clear_9cysystemd_6reader_Rule, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_4Rule_9__iter__, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  __pyx_methods_9cysystemd_6reader_Rule, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  __pyx_getsets_9cysystemd_6reader_Rule, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_4Rule_1__init__, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new_9cysystemd_6reader_Rule, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"
static struct __pyx_vtabstruct_9cysystemd_6reader_JournalEntry __pyx_vtable_9cysystemd_6reader_JournalEntry;

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new_9cysystemd_6reader_JournalEntry(PyTypeObject *t, PyObject *a, PyObject *k) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalEntry *p;

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  p = ((struct __pyx_obj_9cysystemd_6reader_JournalEntry *)o);

#line 77 "carray.from_py"
  p->__pyx_vtab = __pyx_vtabptr_9cysystemd_6reader_JournalEntry;

#line 77 "carray.from_py"
  p->__pyx___boot_uuid = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->__pyx___data = ((PyObject*)Py_None); Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->_data = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  p->__pyx___date = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  if (unlikely(__pyx_pw_9cysystemd_6reader_12JournalEntry_1__cinit__(o, a, k) < 0)) goto bad;

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
  bad:

#line 77 "carray.from_py"
  Py_DECREF(o); o = 0;

#line 77 "carray.from_py"
  return NULL;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc_9cysystemd_6reader_JournalEntry(PyObject *o) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalEntry *p = (struct __pyx_obj_9cysystemd_6reader_JournalEntry *)o;

#line 77 "carray.from_py"
  #if CYTHON_USE_TP_FINALIZE

#line 77 "carray.from_py"
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {

#line 77 "carray.from_py"
    if (PyObject_CallFinalizerFromDealloc(o)) return;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  PyObject_GC_UnTrack(o);

#line 77 "carray.from_py"
  {

#line 77 "carray.from_py"
    PyObject *etype, *eval, *etb;

#line 77 "carray.from_py"
    PyErr_Fetch(&etype, &eval, &etb);

#line 77 "carray.from_py"
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);

#line 77 "carray.from_py"
    __pyx_pw_9cysystemd_6reader_12JournalEntry_13__dealloc__(o);

#line 77 "carray.from_py"
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);

#line 77 "carray.from_py"
    PyErr_Restore(etype, eval, etb);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx___boot_uuid);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx___data);

#line 77 "carray.from_py"
  Py_CLEAR(p->_data);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx___date);

#line 77 "carray.from_py"
  (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_traverse_9cysystemd_6reader_JournalEntry(PyObject *o, visitproc v, void *a) {

#line 77 "carray.from_py"
  int e;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalEntry *p = (struct __pyx_obj_9cysystemd_6reader_JournalEntry *)o;

#line 77 "carray.from_py"
  if (p->__pyx___boot_uuid) {

#line 77 "carray.from_py"
    e = (*v)(p->__pyx___boot_uuid, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->__pyx___data) {

#line 77 "carray.from_py"
    e = (*v)(p->__pyx___data, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->_data) {

#line 77 "carray.from_py"
    e = (*v)(p->_data, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->__pyx___date) {

#line 77 "carray.from_py"
    e = (*v)(p->__pyx___date, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_clear_9cysystemd_6reader_JournalEntry(PyObject *o) {

#line 77 "carray.from_py"
  PyObject* tmp;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalEntry *p = (struct __pyx_obj_9cysystemd_6reader_JournalEntry *)o;

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->__pyx___boot_uuid);

#line 77 "carray.from_py"
  p->__pyx___boot_uuid = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->__pyx___data);

#line 77 "carray.from_py"
  p->__pyx___data = ((PyObject*)Py_None); Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->_data);

#line 77 "carray.from_py"
  p->_data = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->__pyx___date);

#line 77 "carray.from_py"
  p->__pyx___date = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"
static PyObject *__pyx_sq_item_9cysystemd_6reader_JournalEntry(PyObject *o, Py_ssize_t i) {

#line 77 "carray.from_py"
  PyObject *r;

#line 77 "carray.from_py"
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;

#line 77 "carray.from_py"
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);

#line 77 "carray.from_py"
  Py_DECREF(x);

#line 77 "carray.from_py"
  return r;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_12JournalEntry_cursor(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_12JournalEntry_6cursor_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_12JournalEntry_date(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_12JournalEntry_4date_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_12JournalEntry_data(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_12JournalEntry_4data_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyMethodDef __pyx_methods_9cysystemd_6reader_JournalEntry[] = {

#line 77 "carray.from_py"
  {"get_realtime_sec", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_3get_realtime_sec, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"get_monotonic_sec", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_5get_monotonic_sec, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"get_realtime_usec", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_7get_realtime_usec, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"get_monotonic_usec", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_9get_monotonic_usec, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"boot_id", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_11boot_id, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_19__reduce_cython__, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_12JournalEntry_21__setstate_cython__, METH_O, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct PyGetSetDef __pyx_getsets_9cysystemd_6reader_JournalEntry[] = {

#line 77 "carray.from_py"
  {(char *)"cursor", __pyx_getprop_9cysystemd_6reader_12JournalEntry_cursor, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"date", __pyx_getprop_9cysystemd_6reader_12JournalEntry_date, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"data", __pyx_getprop_9cysystemd_6reader_12JournalEntry_data, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PySequenceMethods __pyx_tp_as_sequence_JournalEntry = {

#line 77 "carray.from_py"
  0, /*sq_length*/

#line 77 "carray.from_py"
  0, /*sq_concat*/

#line 77 "carray.from_py"
  0, /*sq_repeat*/

#line 77 "carray.from_py"
  __pyx_sq_item_9cysystemd_6reader_JournalEntry, /*sq_item*/

#line 77 "carray.from_py"
  0, /*sq_slice*/

#line 77 "carray.from_py"
  0, /*sq_ass_item*/

#line 77 "carray.from_py"
  0, /*sq_ass_slice*/

#line 77 "carray.from_py"
  0, /*sq_contains*/

#line 77 "carray.from_py"
  0, /*sq_inplace_concat*/

#line 77 "carray.from_py"
  0, /*sq_inplace_repeat*/

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyMappingMethods __pyx_tp_as_mapping_JournalEntry = {

#line 77 "carray.from_py"
  0, /*mp_length*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_12JournalEntry_17__getitem__, /*mp_subscript*/

#line 77 "carray.from_py"
  0, /*mp_ass_subscript*/

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_type_9cysystemd_6reader_JournalEntry = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.JournalEntry", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj_9cysystemd_6reader_JournalEntry), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc_9cysystemd_6reader_JournalEntry, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_12JournalEntry_15__repr__, /*tp_repr*/

#line 77 "carray.from_py"
  0, /*tp_as_number*/

#line 77 "carray.from_py"
  &__pyx_tp_as_sequence_JournalEntry, /*tp_as_sequence*/

#line 77 "carray.from_py"
  &__pyx_tp_as_mapping_JournalEntry, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  __pyx_tp_traverse_9cysystemd_6reader_JournalEntry, /*tp_traverse*/

#line 77 "carray.from_py"
  __pyx_tp_clear_9cysystemd_6reader_JournalEntry, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  0, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  __pyx_methods_9cysystemd_6reader_JournalEntry, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  __pyx_getsets_9cysystemd_6reader_JournalEntry, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  0, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new_9cysystemd_6reader_JournalEntry, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"
static struct __pyx_vtabstruct_9cysystemd_6reader_JournalReader __pyx_vtable_9cysystemd_6reader_JournalReader;

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new_9cysystemd_6reader_JournalReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalReader *p;

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  p = ((struct __pyx_obj_9cysystemd_6reader_JournalReader *)o);

#line 77 "carray.from_py"
  p->__pyx_vtab = __pyx_vtabptr_9cysystemd_6reader_JournalReader;

#line 77 "carray.from_py"
  p->flags = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc_9cysystemd_6reader_JournalReader(PyObject *o) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalReader *p = (struct __pyx_obj_9cysystemd_6reader_JournalReader *)o;

#line 77 "carray.from_py"
  #if CYTHON_USE_TP_FINALIZE

#line 77 "carray.from_py"
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {

#line 77 "carray.from_py"
    if (PyObject_CallFinalizerFromDealloc(o)) return;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  PyObject_GC_UnTrack(o);

#line 77 "carray.from_py"
  {

#line 77 "carray.from_py"
    PyObject *etype, *eval, *etb;

#line 77 "carray.from_py"
    PyErr_Fetch(&etype, &eval, &etb);

#line 77 "carray.from_py"
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);

#line 77 "carray.from_py"
    __pyx_pw_9cysystemd_6reader_13JournalReader_40__dealloc__(o);

#line 77 "carray.from_py"
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);

#line 77 "carray.from_py"
    PyErr_Restore(etype, eval, etb);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  Py_CLEAR(p->flags);

#line 77 "carray.from_py"
  (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_traverse_9cysystemd_6reader_JournalReader(PyObject *o, visitproc v, void *a) {

#line 77 "carray.from_py"
  int e;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalReader *p = (struct __pyx_obj_9cysystemd_6reader_JournalReader *)o;

#line 77 "carray.from_py"
  if (p->flags) {

#line 77 "carray.from_py"
    e = (*v)(p->flags, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_clear_9cysystemd_6reader_JournalReader(PyObject *o) {

#line 77 "carray.from_py"
  PyObject* tmp;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader_JournalReader *p = (struct __pyx_obj_9cysystemd_6reader_JournalReader *)o;

#line 77 "carray.from_py"
  tmp = ((PyObject*)p->flags);

#line 77 "carray.from_py"
  p->flags = Py_None; Py_INCREF(Py_None);

#line 77 "carray.from_py"
  Py_XDECREF(tmp);

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_data_threshold(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_setprop_9cysystemd_6reader_13JournalReader_data_threshold(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  if (v) {

#line 77 "carray.from_py"
    return __pyx_pw_9cysystemd_6reader_13JournalReader_14data_threshold_3__set__(o, v);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  else {

#line 77 "carray.from_py"
    PyErr_SetString(PyExc_NotImplementedError, "__del__");

#line 77 "carray.from_py"
    return -1;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_closed(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_6closed_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_locked(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_6locked_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_idle(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_4idle_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_fd(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_2fd_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_events(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_6events_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_getprop_9cysystemd_6reader_13JournalReader_timeout(PyObject *o, CYTHON_UNUSED void *x) {

#line 77 "carray.from_py"
  return __pyx_pw_9cysystemd_6reader_13JournalReader_7timeout_1__get__(o);

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyMethodDef __pyx_methods_9cysystemd_6reader_JournalReader[] = {

#line 77 "carray.from_py"
  {"open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_3open, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"open_directory", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_5open_directory, METH_O, 0},

#line 77 "carray.from_py"
  {"open_files", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_7open_files, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"_lock", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_9_lock, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"seek_head", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_12seek_head, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"seek_tail", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_14seek_tail, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"seek_monotonic_usec", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_16seek_monotonic_usec, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"seek_realtime_usec", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_18seek_realtime_usec, METH_O, 0},

#line 77 "carray.from_py"
  {"seek_cursor", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_20seek_cursor, METH_O, 0},

#line 77 "carray.from_py"
  {"wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_22wait, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"next", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_26next, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"skip_next", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_28skip_next, METH_O, 0},

#line 77 "carray.from_py"
  {"previous", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9cysystemd_6reader_13JournalReader_30previous, METH_VARARGS|METH_KEYWORDS, 0},

#line 77 "carray.from_py"
  {"skip_previous", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_32skip_previous, METH_O, 0},

#line 77 "carray.from_py"
  {"add_filter", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_34add_filter, METH_O, 0},

#line 77 "carray.from_py"
  {"clear_filter", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_36clear_filter, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"process_events", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_42process_events, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"get_catalog", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_44get_catalog, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"get_catalog_for_message_id", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_46get_catalog_for_message_id, METH_O, 0},

#line 77 "carray.from_py"
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_48__reduce_cython__, METH_NOARGS, 0},

#line 77 "carray.from_py"
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9cysystemd_6reader_13JournalReader_50__setstate_cython__, METH_O, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct PyGetSetDef __pyx_getsets_9cysystemd_6reader_JournalReader[] = {

#line 77 "carray.from_py"
  {(char *)"data_threshold", __pyx_getprop_9cysystemd_6reader_13JournalReader_data_threshold, __pyx_setprop_9cysystemd_6reader_13JournalReader_data_threshold, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"closed", __pyx_getprop_9cysystemd_6reader_13JournalReader_closed, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"locked", __pyx_getprop_9cysystemd_6reader_13JournalReader_locked, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"idle", __pyx_getprop_9cysystemd_6reader_13JournalReader_idle, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"fd", __pyx_getprop_9cysystemd_6reader_13JournalReader_fd, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"events", __pyx_getprop_9cysystemd_6reader_13JournalReader_events, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {(char *)"timeout", __pyx_getprop_9cysystemd_6reader_13JournalReader_timeout, 0, (char *)0, 0},

#line 77 "carray.from_py"
  {0, 0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_type_9cysystemd_6reader_JournalReader = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.JournalReader", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj_9cysystemd_6reader_JournalReader), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc_9cysystemd_6reader_JournalReader, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_13JournalReader_38__repr__, /*tp_repr*/

#line 77 "carray.from_py"
  0, /*tp_as_number*/

#line 77 "carray.from_py"
  0, /*tp_as_sequence*/

#line 77 "carray.from_py"
  0, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  __pyx_tp_traverse_9cysystemd_6reader_JournalReader, /*tp_traverse*/

#line 77 "carray.from_py"
  __pyx_tp_clear_9cysystemd_6reader_JournalReader, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_13JournalReader_24__iter__, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  __pyx_methods_9cysystemd_6reader_JournalReader, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  __pyx_getsets_9cysystemd_6reader_JournalReader, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  __pyx_pw_9cysystemd_6reader_13JournalReader_1__init__, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new_9cysystemd_6reader_JournalReader, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *__pyx_freelist_9cysystemd_6reader___pyx_scope_struct____iter__[8];

#line 77 "carray.from_py"
static int __pyx_freecount_9cysystemd_6reader___pyx_scope_struct____iter__ = 0;

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9cysystemd_6reader___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__)))) {

#line 77 "carray.from_py"
    o = (PyObject*)__pyx_freelist_9cysystemd_6reader___pyx_scope_struct____iter__[--__pyx_freecount_9cysystemd_6reader___pyx_scope_struct____iter__];

#line 77 "carray.from_py"
    memset(o, 0, sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__));

#line 77 "carray.from_py"
    (void) PyObject_INIT(o, t);

#line 77 "carray.from_py"
    PyObject_GC_Track(o);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
    if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc_9cysystemd_6reader___pyx_scope_struct____iter__(PyObject *o) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *p = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)o;

#line 77 "carray.from_py"
  PyObject_GC_UnTrack(o);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx_v_rule);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx_v_self);

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9cysystemd_6reader___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__)))) {

#line 77 "carray.from_py"
    __pyx_freelist_9cysystemd_6reader___pyx_scope_struct____iter__[__pyx_freecount_9cysystemd_6reader___pyx_scope_struct____iter__++] = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)o);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_traverse_9cysystemd_6reader___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {

#line 77 "carray.from_py"
  int e;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *p = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__ *)o;

#line 77 "carray.from_py"
  if (p->__pyx_v_rule) {

#line 77 "carray.from_py"
    e = (*v)(p->__pyx_v_rule, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->__pyx_v_self) {

#line 77 "carray.from_py"
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__ = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.__pyx_scope_struct____iter__", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct____iter__), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc_9cysystemd_6reader___pyx_scope_struct____iter__, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_repr*/

#line 77 "carray.from_py"
  0, /*tp_as_number*/

#line 77 "carray.from_py"
  0, /*tp_as_sequence*/

#line 77 "carray.from_py"
  0, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  __pyx_tp_traverse_9cysystemd_6reader___pyx_scope_struct____iter__, /*tp_traverse*/

#line 77 "carray.from_py"
  0, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  0, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  0, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  0, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  0, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new_9cysystemd_6reader___pyx_scope_struct____iter__, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *__pyx_freelist_9cysystemd_6reader___pyx_scope_struct_1__lock[8];

#line 77 "carray.from_py"
static int __pyx_freecount_9cysystemd_6reader___pyx_scope_struct_1__lock = 0;

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new_9cysystemd_6reader___pyx_scope_struct_1__lock(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9cysystemd_6reader___pyx_scope_struct_1__lock > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock)))) {

#line 77 "carray.from_py"
    o = (PyObject*)__pyx_freelist_9cysystemd_6reader___pyx_scope_struct_1__lock[--__pyx_freecount_9cysystemd_6reader___pyx_scope_struct_1__lock];

#line 77 "carray.from_py"
    memset(o, 0, sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock));

#line 77 "carray.from_py"
    (void) PyObject_INIT(o, t);

#line 77 "carray.from_py"
    PyObject_GC_Track(o);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
    if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc_9cysystemd_6reader___pyx_scope_struct_1__lock(PyObject *o) {

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *p = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)o;

#line 77 "carray.from_py"
  PyObject_GC_UnTrack(o);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx_v_opening);

#line 77 "carray.from_py"
  Py_CLEAR(p->__pyx_v_self);

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9cysystemd_6reader___pyx_scope_struct_1__lock < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock)))) {

#line 77 "carray.from_py"
    __pyx_freelist_9cysystemd_6reader___pyx_scope_struct_1__lock[__pyx_freecount_9cysystemd_6reader___pyx_scope_struct_1__lock++] = ((struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)o);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static int __pyx_tp_traverse_9cysystemd_6reader___pyx_scope_struct_1__lock(PyObject *o, visitproc v, void *a) {

#line 77 "carray.from_py"
  int e;

#line 77 "carray.from_py"
  struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *p = (struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock *)o;

#line 77 "carray.from_py"
  if (p->__pyx_v_opening) {

#line 77 "carray.from_py"
    e = (*v)(p->__pyx_v_opening, a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  if (p->__pyx_v_self) {

#line 77 "carray.from_py"
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return 0;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.__pyx_scope_struct_1__lock", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj_9cysystemd_6reader___pyx_scope_struct_1__lock), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc_9cysystemd_6reader___pyx_scope_struct_1__lock, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_repr*/

#line 77 "carray.from_py"
  0, /*tp_as_number*/

#line 77 "carray.from_py"
  0, /*tp_as_sequence*/

#line 77 "carray.from_py"
  0, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  __pyx_tp_traverse_9cysystemd_6reader___pyx_scope_struct_1__lock, /*tp_traverse*/

#line 77 "carray.from_py"
  0, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  0, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  0, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  0, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  0, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new_9cysystemd_6reader___pyx_scope_struct_1__lock, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_str____object___to_py[8];

#line 77 "carray.from_py"
static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_str____object___to_py = 0;

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_str____object___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {

#line 77 "carray.from_py"
  PyObject *o;

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_str____object___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py)))) {

#line 77 "carray.from_py"
    o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_str____object___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_str____object___to_py];

#line 77 "carray.from_py"
    memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py));

#line 77 "carray.from_py"
    (void) PyObject_INIT(o, t);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    o = (*t->tp_alloc)(t, 0);

#line 77 "carray.from_py"
    if (unlikely(!o)) return 0;

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  return o;

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_str____object___to_py(PyObject *o) {

#line 77 "carray.from_py"
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_str____object___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py)))) {

#line 77 "carray.from_py"
    __pyx_freelist___pyx_scope_struct____Pyx_CFunc_str____object___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_str____object___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py *)o);

#line 77 "carray.from_py"
  } else {

#line 77 "carray.from_py"
    (*Py_TYPE(o)->tp_free)(o);

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
}

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyTypeObject __pyx_scope_struct____Pyx_CFunc_str____object___to_py = {

#line 77 "carray.from_py"
  PyVarObject_HEAD_INIT(0, 0)

#line 77 "carray.from_py"
  "cysystemd.reader.__pyx_scope_struct____Pyx_CFunc_str____object___to_py", /*tp_name*/

#line 77 "carray.from_py"
  sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_str____object___to_py), /*tp_basicsize*/

#line 77 "carray.from_py"
  0, /*tp_itemsize*/

#line 77 "carray.from_py"
  __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_str____object___to_py, /*tp_dealloc*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX < 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4

#line 77 "carray.from_py"
  0, /*tp_vectorcall_offset*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_getattr*/

#line 77 "carray.from_py"
  0, /*tp_setattr*/

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION < 3

#line 77 "carray.from_py"
  0, /*tp_compare*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  0, /*tp_as_async*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  0, /*tp_repr*/

#line 77 "carray.from_py"
  0, /*tp_as_number*/

#line 77 "carray.from_py"
  0, /*tp_as_sequence*/

#line 77 "carray.from_py"
  0, /*tp_as_mapping*/

#line 77 "carray.from_py"
  0, /*tp_hash*/

#line 77 "carray.from_py"
  0, /*tp_call*/

#line 77 "carray.from_py"
  0, /*tp_str*/

#line 77 "carray.from_py"
  0, /*tp_getattro*/

#line 77 "carray.from_py"
  0, /*tp_setattro*/

#line 77 "carray.from_py"
  0, /*tp_as_buffer*/

#line 77 "carray.from_py"
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/

#line 77 "carray.from_py"
  0, /*tp_doc*/

#line 77 "carray.from_py"
  0, /*tp_traverse*/

#line 77 "carray.from_py"
  0, /*tp_clear*/

#line 77 "carray.from_py"
  0, /*tp_richcompare*/

#line 77 "carray.from_py"
  0, /*tp_weaklistoffset*/

#line 77 "carray.from_py"
  0, /*tp_iter*/

#line 77 "carray.from_py"
  0, /*tp_iternext*/

#line 77 "carray.from_py"
  0, /*tp_methods*/

#line 77 "carray.from_py"
  0, /*tp_members*/

#line 77 "carray.from_py"
  0, /*tp_getset*/

#line 77 "carray.from_py"
  0, /*tp_base*/

#line 77 "carray.from_py"
  0, /*tp_dict*/

#line 77 "carray.from_py"
  0, /*tp_descr_get*/

#line 77 "carray.from_py"
  0, /*tp_descr_set*/

#line 77 "carray.from_py"
  0, /*tp_dictoffset*/

#line 77 "carray.from_py"
  0, /*tp_init*/

#line 77 "carray.from_py"
  0, /*tp_alloc*/

#line 77 "carray.from_py"
  __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_str____object___to_py, /*tp_new*/

#line 77 "carray.from_py"
  0, /*tp_free*/

#line 77 "carray.from_py"
  0, /*tp_is_gc*/

#line 77 "carray.from_py"
  0, /*tp_bases*/

#line 77 "carray.from_py"
  0, /*tp_mro*/

#line 77 "carray.from_py"
  0, /*tp_cache*/

#line 77 "carray.from_py"
  0, /*tp_subclasses*/

#line 77 "carray.from_py"
  0, /*tp_weaklist*/

#line 77 "carray.from_py"
  0, /*tp_del*/

#line 77 "carray.from_py"
  0, /*tp_version_tag*/

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030400a1

#line 77 "carray.from_py"
  0, /*tp_finalize*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b1

#line 77 "carray.from_py"
  0, /*tp_vectorcall*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000

#line 77 "carray.from_py"
  0, /*tp_print*/

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static PyMethodDef __pyx_methods[] = {

#line 77 "carray.from_py"
  {0, 0, 0, 0}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"


#line 77 "carray.from_py"
#if PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
#if CYTHON_PEP489_MULTI_PHASE_INIT

#line 77 "carray.from_py"
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/

#line 77 "carray.from_py"
static int __pyx_pymod_exec_reader(PyObject* module); /*proto*/

#line 77 "carray.from_py"
static PyModuleDef_Slot __pyx_moduledef_slots[] = {

#line 77 "carray.from_py"
  {Py_mod_create, (void*)__pyx_pymod_create},

#line 77 "carray.from_py"
  {Py_mod_exec, (void*)__pyx_pymod_exec_reader},

#line 77 "carray.from_py"
  {0, NULL}

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"
#endif

#line 77 "carray.from_py"


#line 77 "carray.from_py"
static struct PyModuleDef __pyx_moduledef = {

#line 77 "carray.from_py"
    PyModuleDef_HEAD_INIT,

#line 77 "carray.from_py"
    "reader",

#line 77 "carray.from_py"
    0, /* m_doc */

#line 77 "carray.from_py"
  #if CYTHON_PEP489_MULTI_PHASE_INIT

#line 77 "carray.from_py"
    0, /* m_size */

#line 77 "carray.from_py"
  #else

#line 77 "carray.from_py"
    -1, /* m_size */

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
    __pyx_methods /* m_methods */,

#line 77 "carray.from_py"
  #if CYTHON_PEP489_MULTI_PHASE_INIT

#line 77 "carray.from_py"
    __pyx_moduledef_slots, /* m_slots */

#line 77 "carray.from_py"
  #else

#line 77 "carray.from_py"
    NULL, /* m_reload */

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
    NULL, /* m_traverse */

#line 77 "carray.from_py"
    NULL, /* m_clear */

#line 77 "carray.from_py"
    NULL /* m_free */

#line 77 "carray.from_py"
};

#line 77 "carray.from_py"
#endif

#line 77 "carray.from_py"
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_AND, __pyx_k_AND, sizeof(__pyx_k_AND), 0, 0, 1, 1},
  {&__pyx_n_s_APPEND, __pyx_k_APPEND, sizeof(__pyx_k_APPEND), 0, 0, 1, 1},
  {&__pyx_n_s_CURRENT_USER, __pyx_k_CURRENT_USER, sizeof(__pyx_k_CURRENT_USER), 0, 0, 1, 1},
  {&__pyx_kp_s_Can_t_lock_closed_reader, __pyx_k_Can_t_lock_closed_reader, sizeof(__pyx_k_Can_t_lock_closed_reader), 0, 0, 1, 0},
  {&__pyx_kp_s_Can_t_reopen_opened_reader, __pyx_k_Can_t_reopen_opened_reader, sizeof(__pyx_k_Can_t_reopen_opened_reader), 0, 0, 1, 0},
  {&__pyx_kp_s_Directory_not_found, __pyx_k_Directory_not_found, sizeof(__pyx_k_Directory_not_found), 0, 0, 1, 0},
  {&__pyx_kp_s_Expression_must_not_contains_0_c, __pyx_k_Expression_must_not_contains_0_c, sizeof(__pyx_k_Expression_must_not_contains_0_c), 0, 0, 1, 0},
  {&__pyx_kp_s_File_not_found, __pyx_k_File_not_found, sizeof(__pyx_k_File_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_IN, __pyx_k_IN, sizeof(__pyx_k_IN), 0, 0, 1, 1},
  {&__pyx_n_s_INVALIDATE, __pyx_k_INVALIDATE, sizeof(__pyx_k_INVALIDATE), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb9, __pyx_k_Incompatible_checksums_s_vs_0xb9, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb9), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_operation, __pyx_k_Invalid_operation, sizeof(__pyx_k_Invalid_operation), 0, 0, 1, 0},
  {&__pyx_kp_s_It_s_not_a_directory, __pyx_k_It_s_not_a_directory, sizeof(__pyx_k_It_s_not_a_directory), 0, 0, 1, 0},
  {&__pyx_kp_s_It_s_not_a_regular_file, __pyx_k_It_s_not_a_regular_file, sizeof(__pyx_k_It_s_not_a_regular_file), 0, 0, 1, 0},
  {&__pyx_n_s_JournalEntry, __pyx_k_JournalEntry, sizeof(__pyx_k_JournalEntry), 0, 0, 1, 1},
  {&__pyx_kp_s_JournalEntry_r, __pyx_k_JournalEntry_r, sizeof(__pyx_k_JournalEntry_r), 0, 0, 1, 0},
  {&__pyx_n_s_JournalEvent, __pyx_k_JournalEvent, sizeof(__pyx_k_JournalEvent), 0, 0, 1, 1},
  {&__pyx_n_s_JournalOpenMode, __pyx_k_JournalOpenMode, sizeof(__pyx_k_JournalOpenMode), 0, 0, 1, 1},
  {&__pyx_n_s_JournalReader, __pyx_k_JournalReader, sizeof(__pyx_k_JournalReader), 0, 0, 1, 1},
  {&__pyx_n_s_JournalReader__lock, __pyx_k_JournalReader__lock, sizeof(__pyx_k_JournalReader__lock), 0, 0, 1, 1},
  {&__pyx_n_s_LOCAL_ONLY, __pyx_k_LOCAL_ONLY, sizeof(__pyx_k_LOCAL_ONLY), 0, 0, 1, 1},
  {&__pyx_kp_s_Link_recursive_reslolution_error, __pyx_k_Link_recursive_reslolution_error, sizeof(__pyx_k_Link_recursive_reslolution_error), 0, 0, 1, 0},
  {&__pyx_n_s_MatchOperation, __pyx_k_MatchOperation, sizeof(__pyx_k_MatchOperation), 0, 0, 1, 1},
  {&__pyx_n_s_NOP, __pyx_k_NOP, sizeof(__pyx_k_NOP), 0, 0, 1, 1},
  {&__pyx_n_s_OR, __pyx_k_OR, sizeof(__pyx_k_OR), 0, 0, 1, 1},
  {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
  {&__pyx_n_s_OUT, __pyx_k_OUT, sizeof(__pyx_k_OUT), 0, 0, 1, 1},
  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_Poll, __pyx_k_Poll, sizeof(__pyx_k_Poll), 0, 0, 1, 1},
  {&__pyx_n_s_Pyx_CFunc_str____object___to_p, __pyx_k_Pyx_CFunc_str____object___to_p, sizeof(__pyx_k_Pyx_CFunc_str____object___to_p), 0, 0, 1, 1},
  {&__pyx_n_s_RUNTIME_ONLY, __pyx_k_RUNTIME_ONLY, sizeof(__pyx_k_RUNTIME_ONLY), 0, 0, 1, 1},
  {&__pyx_kp_s_Reader_locked, __pyx_k_Reader_locked, sizeof(__pyx_k_Reader_locked), 0, 0, 1, 0},
  {&__pyx_kp_s_Reader_s_s, __pyx_k_Reader_s_s, sizeof(__pyx_k_Reader_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_Rule, __pyx_k_Rule, sizeof(__pyx_k_Rule), 0, 0, 1, 1},
  {&__pyx_n_s_Rule___iter, __pyx_k_Rule___iter, sizeof(__pyx_k_Rule___iter), 0, 0, 1, 1},
  {&__pyx_kp_s_Rule_r, __pyx_k_Rule_r, sizeof(__pyx_k_Rule_r), 0, 0, 1, 0},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_SYSTEM, __pyx_k_SYSTEM, sizeof(__pyx_k_SYSTEM), 0, 0, 1, 1},
  {&__pyx_n_s_SYSTEM_ONLY, __pyx_k_SYSTEM_ONLY, sizeof(__pyx_k_SYSTEM_ONLY), 0, 0, 1, 1},
  {&__pyx_n_s_SystemError, __pyx_k_SystemError, sizeof(__pyx_k_SystemError), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_UUID, __pyx_k_UUID, sizeof(__pyx_k_UUID), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_WAIT_MAX_TIME, __pyx_k_WAIT_MAX_TIME, sizeof(__pyx_k_WAIT_MAX_TIME), 0, 0, 1, 1},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_boot_id, __pyx_k_boot_id, sizeof(__pyx_k_boot_id), 0, 0, 1, 1},
  {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
  {&__pyx_n_s_check_error_code, __pyx_k_check_error_code, sizeof(__pyx_k_check_error_code), 0, 0, 1, 1},
  {&__pyx_n_s_child, __pyx_k_child, sizeof(__pyx_k_child), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_contextlib, __pyx_k_contextlib, sizeof(__pyx_k_contextlib), 0, 0, 1, 1},
  {&__pyx_n_s_contextmanager, __pyx_k_contextmanager, sizeof(__pyx_k_contextmanager), 0, 0, 1, 1},
  {&__pyx_n_s_cysystemd_reader, __pyx_k_cysystemd_reader, sizeof(__pyx_k_cysystemd_reader), 0, 0, 1, 1},
  {&__pyx_kp_s_cysystemd_reader_pyx, __pyx_k_cysystemd_reader_pyx, sizeof(__pyx_k_cysystemd_reader_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_errorcode, __pyx_k_errorcode, sizeof(__pyx_k_errorcode), 0, 0, 1, 1},
  {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
  {&__pyx_n_s_get_monotonic_sec, __pyx_k_get_monotonic_sec, sizeof(__pyx_k_get_monotonic_sec), 0, 0, 1, 1},
  {&__pyx_n_s_get_monotonic_usec, __pyx_k_get_monotonic_usec, sizeof(__pyx_k_get_monotonic_usec), 0, 0, 1, 1},
  {&__pyx_n_s_get_realtime_sec, __pyx_k_get_realtime_sec, sizeof(__pyx_k_get_realtime_sec), 0, 0, 1, 1},
  {&__pyx_n_s_get_realtime_usec, __pyx_k_get_realtime_usec, sizeof(__pyx_k_get_realtime_usec), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_kp_s_got_message_with_enormous_length, __pyx_k_got_message_with_enormous_length, sizeof(__pyx_k_got_message_with_enormous_length), 0, 0, 1, 0},
  {&__pyx_kp_s_got_unexpected_r_from_sd_journal, __pyx_k_got_unexpected_r_from_sd_journal, sizeof(__pyx_k_got_unexpected_r_from_sd_journal), 0, 0, 1, 0},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_isdir, __pyx_k_isdir, sizeof(__pyx_k_isdir), 0, 0, 1, 1},
  {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1},
  {&__pyx_n_s_islink, __pyx_k_islink, sizeof(__pyx_k_islink), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
  {&__pyx_n_s_locked, __pyx_k_locked, sizeof(__pyx_k_locked), 0, 0, 1, 1},
  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
  {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_max_message_size, __pyx_k_max_message_size, sizeof(__pyx_k_max_message_size), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_opened, __pyx_k_opened, sizeof(__pyx_k_opened), 0, 0, 1, 1},
  {&__pyx_n_s_opening, __pyx_k_opening, sizeof(__pyx_k_opening), 0, 0, 1, 1},
  {&__pyx_n_s_operand, __pyx_k_operand, sizeof(__pyx_k_operand), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Rule, __pyx_k_pyx_unpickle_Rule, sizeof(__pyx_k_pyx_unpickle_Rule), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_kp_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 0},
  {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
  {&__pyx_n_s_readlink, __pyx_k_readlink, sizeof(__pyx_k_readlink), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
  {&__pyx_kp_s_self_context_cannot_be_converted, __pyx_k_self_context_cannot_be_converted, sizeof(__pyx_k_self_context_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_skip, __pyx_k_skip, sizeof(__pyx_k_skip), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_timezone, __pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 0, 1, 1},
  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
  {&__pyx_n_s_usec, __pyx_k_usec, sizeof(__pyx_k_usec), 0, 0, 1, 1},
  {&__pyx_n_s_utc, __pyx_k_utc, sizeof(__pyx_k_utc), 0, 0, 1, 1},
  {&__pyx_n_s_utcfromtimestamp, __pyx_k_utcfromtimestamp, sizeof(__pyx_k_utcfromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s_uuid, __pyx_k_uuid, sizeof(__pyx_k_uuid), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
  {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_builtin_SystemError = __Pyx_GetBuiltinName(__pyx_n_s_SystemError); if (!__pyx_builtin_SystemError) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 157, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 318, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 364, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(1, 81, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 94, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cysystemd/reader.pyx":61
 * 
 *         if '\0' in exp:
 *             raise ValueError("Expression must not contains \\0 character")             # <<<<<<<<<<<<<<
 * 
 *         self._expression = exp.encode()
 */

#line 61 "cysystemd/reader.pyx"
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Expression_must_not_contains_0_c); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 61, __pyx_L1_error)

#line 61 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__3);

#line 61 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cysystemd/reader.pyx":157
 * 
 *     if not os.path.exists(path):
 *         raise OSError('Directory not found')             # <<<<<<<<<<<<<<
 *     elif os.path.islink(path):
 *         c = 0
 */

#line 157 "cysystemd/reader.pyx"
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Directory_not_found); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 157, __pyx_L1_error)

#line 157 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__5);

#line 157 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cysystemd/reader.pyx":164
 *             c += 1
 *             if c > 255:
 *                 raise OSError("Link recursive reslolution error")             # <<<<<<<<<<<<<<
 * 
 *         return _check_dir_path(path)
 */

#line 164 "cysystemd/reader.pyx"
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Link_recursive_reslolution_error); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 164, __pyx_L1_error)

#line 164 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__6);

#line 164 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cysystemd/reader.pyx":168
 *         return _check_dir_path(path)
 *     elif not os.path.isdir(path):
 *         raise OSError("It's not a directory")             # <<<<<<<<<<<<<<
 *     else:
 *         path = os.path.abspath(path)
 */

#line 168 "cysystemd/reader.pyx"
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_It_s_not_a_directory); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 168, __pyx_L1_error)

#line 168 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__7);

#line 168 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cysystemd/reader.pyx":179
 * 
 *     if not os.path.exists(path):
 *         raise OSError('File not found')             # <<<<<<<<<<<<<<
 *     elif os.path.islink(path):
 *         c = 0
 */

#line 179 "cysystemd/reader.pyx"
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_File_not_found); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 179, __pyx_L1_error)

#line 179 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__8);

#line 179 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cysystemd/reader.pyx":190
 *         return _check_file_path(path)
 *     elif not os.path.isfile(path):
 *         raise OSError("It's not a regular file")             # <<<<<<<<<<<<<<
 *     else:
 *         path = os.path.abspath(path)
 */

#line 190 "cysystemd/reader.pyx"
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_It_s_not_a_regular_file); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 190, __pyx_L1_error)

#line 190 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__9);

#line 190 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cysystemd/reader.pyx":237
 *                 log.warning("got unexpected %r from sd_journal_enumerate_data", value)
 *                 break
 *             key, value = value.split("=", 1)             # <<<<<<<<<<<<<<
 * 
 *             if key in self.__data:
 */

#line 237 "cysystemd/reader.pyx"
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_int_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 237, __pyx_L1_error)

#line 237 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__10);

#line 237 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

#line 2 "(tree fragment)"
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)

#line 2 "(tree fragment)"
  __Pyx_GOTREF(__pyx_tuple__11);

#line 2 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */

#line 4 "(tree fragment)"
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)

#line 4 "(tree fragment)"
  __Pyx_GOTREF(__pyx_tuple__12);

#line 4 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cysystemd/reader.pyx":303
 *         self.flags = JournalOpenMode(int(flags))
 * 
 *         with self._lock(opening=True):             # <<<<<<<<<<<<<<
 *             check_error_code(sd_journal_open(&self.context, self.flags.value))
 * 
 */

#line 303 "cysystemd/reader.pyx"
  __pyx_tuple__14 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 303, __pyx_L1_error)

#line 303 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__14);

#line 303 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cysystemd/reader.pyx":364
 *     def _lock(self, opening=False):
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")             # <<<<<<<<<<<<<<
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")
 */

#line 364 "cysystemd/reader.pyx"
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Can_t_lock_closed_reader); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 364, __pyx_L1_error)

#line 364 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__15);

#line 364 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cysystemd/reader.pyx":366
 *             raise RuntimeError("Can't lock closed reader")
 *         elif self.locked:
 *             raise RuntimeError("Reader locked")             # <<<<<<<<<<<<<<
 *         elif opening and self.state != READER_NULL:
 *             raise RuntimeError("Can't reopen opened reader")
 */

#line 366 "cysystemd/reader.pyx"
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Reader_locked); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 366, __pyx_L1_error)

#line 366 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__16);

#line 366 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cysystemd/reader.pyx":368
 *             raise RuntimeError("Reader locked")
 *         elif opening and self.state != READER_NULL:
 *             raise RuntimeError("Can't reopen opened reader")             # <<<<<<<<<<<<<<
 * 
 *         self.state = READER_LOCKED
 */

#line 368 "cysystemd/reader.pyx"
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Can_t_reopen_opened_reader); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 368, __pyx_L1_error)

#line 368 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__17);

#line 368 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cysystemd/reader.pyx":498
 *                     return check_error_code(result)
 * 
 *                 raise ValueError('Invalid operation')             # <<<<<<<<<<<<<<
 * 
 *     def clear_filter(self):
 */

#line 498 "cysystemd/reader.pyx"
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Invalid_operation); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 498, __pyx_L1_error)

#line 498 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__19);

#line 498 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 */

#line 2 "(tree fragment)"
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self_context_cannot_be_converted); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 2, __pyx_L1_error)

#line 2 "(tree fragment)"
  __Pyx_GOTREF(__pyx_tuple__20);

#line 2 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":4
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.context cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */

#line 4 "(tree fragment)"
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_self_context_cannot_be_converted); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error)

#line 4 "(tree fragment)"
  __Pyx_GOTREF(__pyx_tuple__21);

#line 4 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cfunc.to_py":65
 * @cname("__Pyx_CFunc_str____object___to_py")
 * cdef object __Pyx_CFunc_str____object___to_py(str (*f)(object) ):
 *     def wrap(object path):             # <<<<<<<<<<<<<<
 *         """wrap(path) -> str"""
 *         return f(path)
 */

#line 65 "cfunc.to_py"
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 65, __pyx_L1_error)

#line 65 "cfunc.to_py"
  __Pyx_GOTREF(__pyx_tuple__22);

#line 65 "cfunc.to_py"
  __Pyx_GIVEREF(__pyx_tuple__22);

#line 65 "cfunc.to_py"
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 65, __pyx_L1_error)

  /* "cysystemd/reader.pyx":126
 * 
 * 
 * def check_error_code(int code):             # <<<<<<<<<<<<<<
 *     if code >= 0:
 *         return code
 */

#line 126 "cysystemd/reader.pyx"
  __pyx_tuple__24 = PyTuple_Pack(3, __pyx_n_s_code, __pyx_n_s_code, __pyx_n_s_error); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 126, __pyx_L1_error)

#line 126 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_tuple__24);

#line 126 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_tuple__24);

#line 126 "cysystemd/reader.pyx"
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cysystemd_reader_pyx, __pyx_n_s_check_error_code, 126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 126, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_Rule(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

#line 1 "(tree fragment)"
  __pyx_tuple__26 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 1, __pyx_L1_error)

#line 1 "(tree fragment)"
  __Pyx_GOTREF(__pyx_tuple__26);

#line 1 "(tree fragment)"
  __Pyx_GIVEREF(__pyx_tuple__26);

#line 1 "(tree fragment)"
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Rule, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(1, 1, __pyx_L1_error)

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return 0;

#line 1 "(tree fragment)"
  __pyx_L1_error:;

#line 1 "(tree fragment)"
  __Pyx_RefNannyFinishContext();

#line 1 "(tree fragment)"
  return -1;

#line 1 "(tree fragment)"
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyString_Type_encode.type = (PyObject*)&PyString_Type;
  __pyx_umethod_PyString_Type_upper.type = (PyObject*)&PyString_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1048576 = PyInt_FromLong(1048576L); if (unlikely(!__pyx_int_1048576)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_194258686 = PyInt_FromLong(194258686L); if (unlikely(!__pyx_int_194258686)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_9cysystemd_6reader_Rule) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9cysystemd_6reader_Rule.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9cysystemd_6reader_Rule.tp_dictoffset && __pyx_type_9cysystemd_6reader_Rule.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9cysystemd_6reader_Rule.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Rule, (PyObject *)&__pyx_type_9cysystemd_6reader_Rule) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9cysystemd_6reader_Rule) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __pyx_ptype_9cysystemd_6reader_Rule = &__pyx_type_9cysystemd_6reader_Rule;
  __pyx_vtabptr_9cysystemd_6reader_JournalEntry = &__pyx_vtable_9cysystemd_6reader_JournalEntry;
  __pyx_vtable_9cysystemd_6reader_JournalEntry.get_realtime_sec = (double (*)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch))__pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_sec;
  __pyx_vtable_9cysystemd_6reader_JournalEntry.get_monotonic_sec = (double (*)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch))__pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_sec;
  __pyx_vtable_9cysystemd_6reader_JournalEntry.get_realtime_usec = (uint64_t (*)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch))__pyx_f_9cysystemd_6reader_12JournalEntry_get_realtime_usec;
  __pyx_vtable_9cysystemd_6reader_JournalEntry.get_monotonic_usec = (uint64_t (*)(struct __pyx_obj_9cysystemd_6reader_JournalEntry *, int __pyx_skip_dispatch))__pyx_f_9cysystemd_6reader_12JournalEntry_get_monotonic_usec;
  if (PyType_Ready(&__pyx_type_9cysystemd_6reader_JournalEntry) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9cysystemd_6reader_JournalEntry.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9cysystemd_6reader_JournalEntry.tp_dictoffset && __pyx_type_9cysystemd_6reader_JournalEntry.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9cysystemd_6reader_JournalEntry.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9cysystemd_6reader_JournalEntry.tp_dict, __pyx_vtabptr_9cysystemd_6reader_JournalEntry) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_JournalEntry, (PyObject *)&__pyx_type_9cysystemd_6reader_JournalEntry) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9cysystemd_6reader_JournalEntry) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __pyx_ptype_9cysystemd_6reader_JournalEntry = &__pyx_type_9cysystemd_6reader_JournalEntry;
  __pyx_vtabptr_9cysystemd_6reader_JournalReader = &__pyx_vtable_9cysystemd_6reader_JournalReader;
  __pyx_vtable_9cysystemd_6reader_JournalReader.wait = (PyObject *(*)(struct __pyx_obj_9cysystemd_6reader_JournalReader *, int __pyx_skip_dispatch, struct __pyx_opt_args_9cysystemd_6reader_13JournalReader_wait *__pyx_optional_args))__pyx_f_9cysystemd_6reader_13JournalReader_wait;
  if (PyType_Ready(&__pyx_type_9cysystemd_6reader_JournalReader) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9cysystemd_6reader_JournalReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9cysystemd_6reader_JournalReader.tp_dictoffset && __pyx_type_9cysystemd_6reader_JournalReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9cysystemd_6reader_JournalReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_9cysystemd_6reader_JournalReader.tp_dict, __pyx_vtabptr_9cysystemd_6reader_JournalReader) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_JournalReader, (PyObject *)&__pyx_type_9cysystemd_6reader_JournalReader) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9cysystemd_6reader_JournalReader) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
  __pyx_ptype_9cysystemd_6reader_JournalReader = &__pyx_type_9cysystemd_6reader_JournalReader;
  if (PyType_Ready(&__pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_9cysystemd_6reader___pyx_scope_struct____iter__ = &__pyx_type_9cysystemd_6reader___pyx_scope_struct____iter__;
  if (PyType_Ready(&__pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock.tp_dictoffset && __pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_9cysystemd_6reader___pyx_scope_struct_1__lock = &__pyx_type_9cysystemd_6reader___pyx_scope_struct_1__lock;
  if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_str____object___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_scope_struct____Pyx_CFunc_str____object___to_py.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_str____object___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_str____object___to_py.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_scope_struct____Pyx_CFunc_str____object___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype___pyx_scope_struct____Pyx_CFunc_str____object___to_py = &__pyx_scope_struct____Pyx_CFunc_str____object___to_py;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(4, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initreader(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initreader(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_reader(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_reader(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_reader(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  uint32_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'reader' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_reader(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("reader", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cysystemd__reader) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cysystemd.reader")) {
      if (unlikely(PyDict_SetItemString(modules, "cysystemd.reader", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "cysystemd/reader.pyx":10
 * from sd_id128 cimport sd_id128_t
 * 
 * import os             # <<<<<<<<<<<<<<
 * import logging
 * from datetime import datetime, timezone
 */

#line 10 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)

#line 10 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 10 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)

#line 10 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":11
 * 
 * import os
 * import logging             # <<<<<<<<<<<<<<
 * from datetime import datetime, timezone
 * from uuid import UUID
 */

#line 11 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)

#line 11 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 11 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)

#line 11 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":12
 * import os
 * import logging
 * from datetime import datetime, timezone             # <<<<<<<<<<<<<<
 * from uuid import UUID
 * from contextlib import contextmanager
 */

#line 12 "cysystemd/reader.pyx"
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_datetime);

#line 12 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_datetime);

#line 12 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);

#line 12 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_timezone);

#line 12 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_timezone);

#line 12 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_timezone);

#line 12 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 12 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 12 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 12 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timezone); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 12 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timezone, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)

#line 12 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 12 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":13
 * import logging
 * from datetime import datetime, timezone
 * from uuid import UUID             # <<<<<<<<<<<<<<
 * from contextlib import contextmanager
 * from errno import errorcode
 */

#line 13 "cysystemd/reader.pyx"
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)

#line 13 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 13 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_UUID);

#line 13 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_UUID);

#line 13 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_UUID);

#line 13 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_uuid, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)

#line 13 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 13 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 13 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_UUID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)

#line 13 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 13 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UUID, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)

#line 13 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 13 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":14
 * from datetime import datetime, timezone
 * from uuid import UUID
 * from contextlib import contextmanager             # <<<<<<<<<<<<<<
 * from errno import errorcode
 * from enum import IntEnum
 */

#line 14 "cysystemd/reader.pyx"
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)

#line 14 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 14 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_contextmanager);

#line 14 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_contextmanager);

#line 14 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_contextmanager);

#line 14 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_contextlib, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)

#line 14 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 14 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 14 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_contextmanager); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)

#line 14 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 14 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_contextmanager, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)

#line 14 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 14 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":15
 * from uuid import UUID
 * from contextlib import contextmanager
 * from errno import errorcode             # <<<<<<<<<<<<<<
 * from enum import IntEnum
 * 
 */

#line 15 "cysystemd/reader.pyx"
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)

#line 15 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 15 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_errorcode);

#line 15 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_errorcode);

#line 15 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_errorcode);

#line 15 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_errno, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)

#line 15 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 15 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 15 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_errorcode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)

#line 15 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 15 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_errorcode, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)

#line 15 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 15 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cysystemd/reader.pyx":16
 * from contextlib import contextmanager
 * from errno import errorcode
 * from enum import IntEnum             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 16 "cysystemd/reader.pyx"
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)

#line 16 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 16 "cysystemd/reader.pyx"
  __Pyx_INCREF(__pyx_n_s_IntEnum);

#line 16 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_n_s_IntEnum);

#line 16 "cysystemd/reader.pyx"
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IntEnum);

#line 16 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)

#line 16 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 16 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 16 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)

#line 16 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 16 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IntEnum, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error)

#line 16 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 16 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":19
 * 
 * 
 * log = logging.getLogger(__name__)             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 19 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)

#line 19 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 19 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)

#line 19 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 19 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 19 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)

#line 19 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 19 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)

#line 19 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 19 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 19 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 19 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_3) < 0) __PYX_ERR(0, 19, __pyx_L1_error)

#line 19 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cysystemd/reader.pyx":22
 * 
 * 
 * WAIT_MAX_TIME = 4294967295             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 22 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WAIT_MAX_TIME, __pyx_int_4294967295) < 0) __PYX_ERR(0, 22, __pyx_L1_error)

  /* "cysystemd/reader.pyx":25
 * 
 * 
 * class JournalEvent(IntEnum):             # <<<<<<<<<<<<<<
 *     NOP = SD_JOURNAL_NOP
 *     APPEND = SD_JOURNAL_APPEND
 */

#line 25 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 25 "cysystemd/reader.pyx"
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 25 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_3);

#line 25 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);

#line 25 "cysystemd/reader.pyx"
  __pyx_t_3 = 0;

#line 25 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 25 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_JournalEvent, __pyx_n_s_JournalEvent, (PyObject *) NULL, __pyx_n_s_cysystemd_reader, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

  /* "cysystemd/reader.pyx":26
 * 
 * class JournalEvent(IntEnum):
 *     NOP = SD_JOURNAL_NOP             # <<<<<<<<<<<<<<
 *     APPEND = SD_JOURNAL_APPEND
 *     INVALIDATE =  SD_JOURNAL_INVALIDATE
 */

#line 26 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_NOP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error)

#line 26 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 26 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_NOP, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L1_error)

#line 26 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":27
 * class JournalEvent(IntEnum):
 *     NOP = SD_JOURNAL_NOP
 *     APPEND = SD_JOURNAL_APPEND             # <<<<<<<<<<<<<<
 *     INVALIDATE =  SD_JOURNAL_INVALIDATE
 * 
 */

#line 27 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_APPEND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error)

#line 27 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 27 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_APPEND, __pyx_t_4) < 0) __PYX_ERR(0, 27, __pyx_L1_error)

#line 27 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":28
 *     NOP = SD_JOURNAL_NOP
 *     APPEND = SD_JOURNAL_APPEND
 *     INVALIDATE =  SD_JOURNAL_INVALIDATE             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 28 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_INVALIDATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)

#line 28 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 28 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_INVALIDATE, __pyx_t_4) < 0) __PYX_ERR(0, 28, __pyx_L1_error)

#line 28 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":25
 * 
 * 
 * class JournalEvent(IntEnum):             # <<<<<<<<<<<<<<
 *     NOP = SD_JOURNAL_NOP
 *     APPEND = SD_JOURNAL_APPEND
 */

#line 25 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_JournalEvent, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 25 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_JournalEvent, __pyx_t_4) < 0) __PYX_ERR(0, 25, __pyx_L1_error)

#line 25 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 25 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 25 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 25 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":36
 * 
 * 
 * class MatchOperation(IntEnum):             # <<<<<<<<<<<<<<
 *     AND = MATCHER_OPERATION_CONJUNCTION
 *     OR = MATCHER_OPERATION_DISJUNCTION
 */

#line 36 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 36 "cysystemd/reader.pyx"
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 36 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_2);

#line 36 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);

#line 36 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

#line 36 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 36 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_MatchOperation, __pyx_n_s_MatchOperation, (PyObject *) NULL, __pyx_n_s_cysystemd_reader, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

  /* "cysystemd/reader.pyx":37
 * 
 * class MatchOperation(IntEnum):
 *     AND = MATCHER_OPERATION_CONJUNCTION             # <<<<<<<<<<<<<<
 *     OR = MATCHER_OPERATION_DISJUNCTION
 * 
 */

#line 37 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_9cysystemd_6reader_MATCHER_OPERATION(__pyx_e_9cysystemd_6reader_MATCHER_OPERATION_CONJUNCTION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error)

#line 37 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 37 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_AND, __pyx_t_4) < 0) __PYX_ERR(0, 37, __pyx_L1_error)

#line 37 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":38
 * class MatchOperation(IntEnum):
 *     AND = MATCHER_OPERATION_CONJUNCTION
 *     OR = MATCHER_OPERATION_DISJUNCTION             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 38 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_9cysystemd_6reader_MATCHER_OPERATION(__pyx_e_9cysystemd_6reader_MATCHER_OPERATION_DISJUNCTION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)

#line 38 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 38 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_OR, __pyx_t_4) < 0) __PYX_ERR(0, 38, __pyx_L1_error)

#line 38 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":36
 * 
 * 
 * class MatchOperation(IntEnum):             # <<<<<<<<<<<<<<
 *     AND = MATCHER_OPERATION_CONJUNCTION
 *     OR = MATCHER_OPERATION_DISJUNCTION
 */

#line 36 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MatchOperation, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 36 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MatchOperation, __pyx_t_4) < 0) __PYX_ERR(0, 36, __pyx_L1_error)

#line 36 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 36 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 36 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 36 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cysystemd/reader.pyx":46
 * 
 * 
 * class Poll(IntEnum):             # <<<<<<<<<<<<<<
 *     IN = POLLIN
 *     OUT = POLLOUT
 */

#line 46 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 46 "cysystemd/reader.pyx"
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 46 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_3);

#line 46 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);

#line 46 "cysystemd/reader.pyx"
  __pyx_t_3 = 0;

#line 46 "cysystemd/reader.pyx"
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 46 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_Poll, __pyx_n_s_Poll, (PyObject *) NULL, __pyx_n_s_cysystemd_reader, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

  /* "cysystemd/reader.pyx":47
 * 
 * class Poll(IntEnum):
 *     IN = POLLIN             # <<<<<<<<<<<<<<
 *     OUT = POLLOUT
 * 
 */

#line 47 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(POLLIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)

#line 47 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 47 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_IN, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error)

#line 47 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":48
 * class Poll(IntEnum):
 *     IN = POLLIN
 *     OUT = POLLOUT             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 48 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(POLLOUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)

#line 48 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 48 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_OUT, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error)

#line 48 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":46
 * 
 * 
 * class Poll(IntEnum):             # <<<<<<<<<<<<<<
 *     IN = POLLIN
 *     OUT = POLLOUT
 */

#line 46 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_Poll, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 46 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Poll, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error)

#line 46 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 46 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 46 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 46 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":126
 * 
 * 
 * def check_error_code(int code):             # <<<<<<<<<<<<<<
 *     if code >= 0:
 *         return code
 */

#line 126 "cysystemd/reader.pyx"
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9cysystemd_6reader_1check_error_code, NULL, __pyx_n_s_cysystemd_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)

#line 126 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 126 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_error_code, __pyx_t_2) < 0) __PYX_ERR(0, 126, __pyx_L1_error)

#line 126 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":138
 * 
 * 
 * class JournalOpenMode(IntEnum):             # <<<<<<<<<<<<<<
 *     LOCAL_ONLY = SD_JOURNAL_LOCAL_ONLY
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY
 */

#line 138 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 138 "cysystemd/reader.pyx"
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 138 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_2);

#line 138 "cysystemd/reader.pyx"
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);

#line 138 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

#line 138 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 138 "cysystemd/reader.pyx"
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_JournalOpenMode, __pyx_n_s_JournalOpenMode, (PyObject *) NULL, __pyx_n_s_cysystemd_reader, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

  /* "cysystemd/reader.pyx":139
 * 
 * class JournalOpenMode(IntEnum):
 *     LOCAL_ONLY = SD_JOURNAL_LOCAL_ONLY             # <<<<<<<<<<<<<<
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY
 *     SYSTEM = SD_JOURNAL_SYSTEM
 */

#line 139 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_LOCAL_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)

#line 139 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 139 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_LOCAL_ONLY, __pyx_t_4) < 0) __PYX_ERR(0, 139, __pyx_L1_error)

#line 139 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":140
 * class JournalOpenMode(IntEnum):
 *     LOCAL_ONLY = SD_JOURNAL_LOCAL_ONLY
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY             # <<<<<<<<<<<<<<
 *     SYSTEM = SD_JOURNAL_SYSTEM
 *     CURRENT_USER = SD_JOURNAL_CURRENT_USER
 */

#line 140 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_RUNTIME_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)

#line 140 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 140 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_RUNTIME_ONLY, __pyx_t_4) < 0) __PYX_ERR(0, 140, __pyx_L1_error)

#line 140 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":141
 *     LOCAL_ONLY = SD_JOURNAL_LOCAL_ONLY
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY
 *     SYSTEM = SD_JOURNAL_SYSTEM             # <<<<<<<<<<<<<<
 *     CURRENT_USER = SD_JOURNAL_CURRENT_USER
 *     SYSTEM_ONLY = SD_JOURNAL_SYSTEM_ONLY
 */

#line 141 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_SYSTEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)

#line 141 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 141 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_SYSTEM, __pyx_t_4) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

#line 141 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":142
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY
 *     SYSTEM = SD_JOURNAL_SYSTEM
 *     CURRENT_USER = SD_JOURNAL_CURRENT_USER             # <<<<<<<<<<<<<<
 *     SYSTEM_ONLY = SD_JOURNAL_SYSTEM_ONLY
 * 
 */

#line 142 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_CURRENT_USER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)

#line 142 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 142 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_CURRENT_USER, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error)

#line 142 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":143
 *     SYSTEM = SD_JOURNAL_SYSTEM
 *     CURRENT_USER = SD_JOURNAL_CURRENT_USER
 *     SYSTEM_ONLY = SD_JOURNAL_SYSTEM_ONLY             # <<<<<<<<<<<<<<
 * 
 * 
 */

#line 143 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_PyInt_From_int(SD_JOURNAL_SYSTEM_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)

#line 143 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 143 "cysystemd/reader.pyx"
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_SYSTEM_ONLY, __pyx_t_4) < 0) __PYX_ERR(0, 143, __pyx_L1_error)

#line 143 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cysystemd/reader.pyx":138
 * 
 * 
 * class JournalOpenMode(IntEnum):             # <<<<<<<<<<<<<<
 *     LOCAL_ONLY = SD_JOURNAL_LOCAL_ONLY
 *     RUNTIME_ONLY = SD_JOURNAL_RUNTIME_ONLY
 */

#line 138 "cysystemd/reader.pyx"
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_JournalOpenMode, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_4);

#line 138 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_JournalOpenMode, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error)

#line 138 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 138 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 138 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 138 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cysystemd/reader.pyx":207
 *     cdef object __date
 * 
 *     max_message_size = 2**20             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, JournalReader reader):
 */

#line 207 "cysystemd/reader.pyx"
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9cysystemd_6reader_JournalEntry->tp_dict, __pyx_n_s_max_message_size, __pyx_int_1048576) < 0) __PYX_ERR(0, 207, __pyx_L1_error)

#line 207 "cysystemd/reader.pyx"
  PyType_Modified(__pyx_ptype_9cysystemd_6reader_JournalEntry);

  /* "cysystemd/reader.pyx":300
 *         self.flags = None
 * 
 *     def open(self, flags=JournalOpenMode.CURRENT_USER):             # <<<<<<<<<<<<<<
 *         self.flags = JournalOpenMode(int(flags))
 * 
 */

#line 300 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_JournalOpenMode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)

#line 300 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

#line 300 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CURRENT_USER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)

#line 300 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 300 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 300 "cysystemd/reader.pyx"
  __pyx_k__13 = __pyx_t_2;

#line 300 "cysystemd/reader.pyx"
  __Pyx_GIVEREF(__pyx_t_2);

#line 300 "cysystemd/reader.pyx"
  __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":361
 *         return self.state == READER_OPENED
 * 
 *     @contextmanager             # <<<<<<<<<<<<<<
 *     def _lock(self, opening=False):
 *         if self.closed:
 */

#line 361 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_contextmanager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)

#line 361 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_3);

  /* "cysystemd/reader.pyx":362
 * 
 *     @contextmanager
 *     def _lock(self, opening=False):             # <<<<<<<<<<<<<<
 *         if self.closed:
 *             raise RuntimeError("Can't lock closed reader")
 */

#line 362 "cysystemd/reader.pyx"
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9cysystemd_6reader_JournalReader, __pyx_n_s_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)

#line 362 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_1);

#line 362 "cysystemd/reader.pyx"
  __pyx_t_4 = NULL;

#line 362 "cysystemd/reader.pyx"
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {

#line 362 "cysystemd/reader.pyx"
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);

#line 362 "cysystemd/reader.pyx"
    if (likely(__pyx_t_4)) {

#line 362 "cysystemd/reader.pyx"
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);

#line 362 "cysystemd/reader.pyx"
      __Pyx_INCREF(__pyx_t_4);

#line 362 "cysystemd/reader.pyx"
      __Pyx_INCREF(function);

#line 362 "cysystemd/reader.pyx"
      __Pyx_DECREF_SET(__pyx_t_3, function);

#line 362 "cysystemd/reader.pyx"
    }

#line 362 "cysystemd/reader.pyx"
  }

#line 362 "cysystemd/reader.pyx"
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);

#line 362 "cysystemd/reader.pyx"
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

#line 362 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

#line 362 "cysystemd/reader.pyx"
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)

#line 362 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 362 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

#line 362 "cysystemd/reader.pyx"
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9cysystemd_6reader_JournalReader->tp_dict, __pyx_n_s_lock, __pyx_t_2) < 0) __PYX_ERR(0, 362, __pyx_L1_error)

#line 362 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 362 "cysystemd/reader.pyx"
  PyType_Modified(__pyx_ptype_9cysystemd_6reader_JournalReader);

  /* "cysystemd/reader.pyx":428
 *         return True
 * 
 *     cpdef wait(self, uint32_t timeout = WAIT_MAX_TIME):             # <<<<<<<<<<<<<<
 *         cdef uint64_t timeout_usec = timeout * 1000000
 *         cdef int result
 */

#line 428 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WAIT_MAX_TIME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 428 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 428 "cysystemd/reader.pyx"
  __pyx_k__18 = __pyx_t_5;

#line 428 "cysystemd/reader.pyx"
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WAIT_MAX_TIME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 428 "cysystemd/reader.pyx"
  __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error)

#line 428 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

#line 428 "cysystemd/reader.pyx"
  __pyx_k__18 = __pyx_t_5;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Rule(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

#line 1 "(tree fragment)"
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9cysystemd_6reader_3__pyx_unpickle_Rule, NULL, __pyx_n_s_cysystemd_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)

#line 1 "(tree fragment)"
  __Pyx_GOTREF(__pyx_t_2);

#line 1 "(tree fragment)"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Rule, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)

#line 1 "(tree fragment)"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cysystemd/reader.pyx":1
 * #cython: unraisable_tracebacks=True             # <<<<<<<<<<<<<<
 * 
 * from cpython.mem cimport PyMem_Malloc, PyMem_Free
 */

#line 1 "cysystemd/reader.pyx"
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)

#line 1 "cysystemd/reader.pyx"
  __Pyx_GOTREF(__pyx_t_2);

#line 1 "cysystemd/reader.pyx"
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)

#line 1 "cysystemd/reader.pyx"
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_uint8_t")
 * cdef int __Pyx_carray_from_py_uint8_t(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

#line 77 "carray.from_py"


#line 77 "carray.from_py"
  /*--- Wrapped vars code ---*/

#line 77 "carray.from_py"


#line 77 "carray.from_py"
  goto __pyx_L0;

#line 77 "carray.from_py"
  __pyx_L1_error:;

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_1);

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_2);

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_3);

#line 77 "carray.from_py"
  __Pyx_XDECREF(__pyx_t_4);

#line 77 "carray.from_py"
  if (__pyx_m) {

#line 77 "carray.from_py"
    if (__pyx_d) {

#line 77 "carray.from_py"
      __Pyx_AddTraceback("init cysystemd.reader", __pyx_clineno, __pyx_lineno, __pyx_filename);

#line 77 "carray.from_py"
    }

#line 77 "carray.from_py"
    Py_CLEAR(__pyx_m);

#line 77 "carray.from_py"
  } else if (!PyErr_Occurred()) {

#line 77 "carray.from_py"
    PyErr_SetString(PyExc_ImportError, "init cysystemd.reader");

#line 77 "carray.from_py"
  }

#line 77 "carray.from_py"
  __pyx_L0:;

#line 77 "carray.from_py"
  __Pyx_RefNannyFinishContext();

#line 77 "carray.from_py"
  #if CYTHON_PEP489_MULTI_PHASE_INIT

#line 77 "carray.from_py"
  return (__pyx_m != NULL) ? 0 : -1;

#line 77 "carray.from_py"
  #elif PY_MAJOR_VERSION >= 3

#line 77 "carray.from_py"
  return __pyx_m;

#line 77 "carray.from_py"
  #else

#line 77 "carray.from_py"
  return;

#line 77 "carray.from_py"
  #endif

#line 77 "carray.from_py"
}

#line 1 "cython_utility"

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* StringJoin */
#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyList_New(0);
    dest = PyList_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyListObject*)src)->ob_item + start,
        ((PyListObject*)dest)->ob_item,
        length);
    return dest;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject* dest;
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (unlikely(length <= 0))
        return PyTuple_New(0);
    dest = PyTuple_New(length);
    if (unlikely(!dest))
        return NULL;
    __Pyx_copy_object_array(
        ((PyTupleObject*)src)->ob_item + start,
        ((PyTupleObject*)dest)->ob_item,
        length);
    return dest;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_9cysystemd_6reader_MATCHER_OPERATION(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION value) {
    const enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION neg_one = (enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) ((enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) 0 - (enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) 1), const_zero = (enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum __pyx_t_9cysystemd_6reader_MATCHER_OPERATION),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value) {
    const uint8_t neg_one = (uint8_t) ((uint8_t) 0 - (uint8_t) 1), const_zero = (uint8_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint8_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint8_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint8_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint8_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
    const uint8_t neg_one = (uint8_t) ((uint8_t) 0 - (uint8_t) 1), const_zero = (uint8_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint8_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint8_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT) {
                            return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT) {
                            return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 4 * PyLong_SHIFT) {
                            return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint8_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint8_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint8_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint8_t) -1;
        }
    } else {
        uint8_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint8_t) -1;
        val = __Pyx_PyInt_As_uint8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint8_t");
    return (uint8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint8_t");
    return (uint8_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
    const uint32_t neg_one = (uint32_t) ((uint32_t) 0 - (uint32_t) 1), const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
