aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yaml3
-rw-r--r--.hgignore1
-rw-r--r--__init__.py12
-rw-r--r--_ruamel_yaml.c509
4 files changed, 400 insertions, 125 deletions
diff --git a/.appveyor.yaml b/.appveyor.yaml
index 691c7a8..c51226a 100644
--- a/.appveyor.yaml
+++ b/.appveyor.yaml
@@ -3,8 +3,7 @@ environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: "python37-x64-vs2019"
- # CIBW_BUILD: "cp35-win* cp36-win* cp37-win* cp38-win* cp39-win*"
- CIBW_BUILD: "cp39-win*"
+ CIBW_BUILD: "cp35-win* cp36-win* cp37-win* cp38-win* cp39-win*"
stack: python 3.7
diff --git a/.hgignore b/.hgignore
index 76db731..c0fd2bb 100644
--- a/.hgignore
+++ b/.hgignore
@@ -8,3 +8,4 @@
syntax: glob
_doc
+TODO
diff --git a/__init__.py b/__init__.py
index f3a8db2..f9ea70c 100644
--- a/__init__.py
+++ b/__init__.py
@@ -7,8 +7,8 @@ if False: # MYPY
_package_data = dict(
full_package_name='ruamel.yaml.clib',
- version_info=(0, 2, 2),
- __version__='0.2.2',
+ version_info=(0, 2, 3),
+ __version__='0.2.3',
author='Anthon van der Neut',
author_email='a.van.der.neut@ruamel.eu',
description='C version of reader, parser and emitter for ruamel.yaml derived from libyaml',
@@ -32,7 +32,7 @@ _package_data = dict(
'emitter.c',
],
lib=[],
- testx="""
+ test="""
int main(int argc, char* argv[])
{
/* prevent warning */
@@ -44,11 +44,11 @@ _package_data = dict(
# NOQA
# test='#include "ext/yaml.h"\n\nint main(int argc, char* argv[])\n{\nyaml_parser_t parser;\nparser = parser; /* prevent warning */\nreturn 0;\n}\n', # NOQA
classifiers=[
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Libraries :: Python Modules',
],
@@ -59,9 +59,9 @@ _package_data = dict(
macos='builder@macos',
),
# read_the_docs='yaml',
- supported=[(2, 7), (3, 5)], # minimum
+ supported=[(3, 5)], # minimum
tox=dict(
- env='*pn',
+ env='*f',
),
manifest='include README.rst LICENSE setup.py *.c *.h',
# rtfd='yaml',
diff --git a/_ruamel_yaml.c b/_ruamel_yaml.c
index f9f089a..ac60965 100644
--- a/_ruamel_yaml.c
+++ b/_ruamel_yaml.c
@@ -1,14 +1,16 @@
-/* Generated by Cython 0.29.12 */
+/* Generated by Cython 0.29.23 */
+#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
+#endif /* 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_12"
-#define CYTHON_HEX_VERSION 0x001D0CF0
+#define CYTHON_ABI "0_29_23"
+#define CYTHON_HEX_VERSION 0x001D17F0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
@@ -435,7 +437,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#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
@@ -484,8 +490,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#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)
@@ -496,6 +504,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#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
@@ -535,7 +550,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
+ #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
@@ -576,11 +591,10 @@ static CYTHON_INLINE float __PYX_NAN() {
#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_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
-}
+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
@@ -1230,7 +1244,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
Py_INCREF(x);
PyList_SET_ITEM(list, len, x);
- Py_SIZE(list) = len+1;
+ __Pyx_SET_SIZE(list, len + 1);
return 0;
}
return PyList_Append(list, x);
@@ -1302,6 +1316,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam
#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);
@@ -1334,11 +1351,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
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_long(long value);
+/* GCCDiagnostics.proto */
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+#define __Pyx_HAS_GCC_DIAGNOSTIC
+#endif
/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
@@ -1346,9 +1362,15 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
@@ -1877,6 +1899,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_get_version_string(CYTHON_UNUSED PyObje
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_version_string", 0);
/* "_ruamel_yaml.pyx":5
@@ -1988,6 +2013,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_2get_version(CYTHON_UNUSED PyObject *__
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_version", 0);
/* "_ruamel_yaml.pyx":13
@@ -2067,6 +2095,9 @@ static int __pyx_pw_12_ruamel_yaml_4Mark_1__init__(PyObject *__pyx_v_self, PyObj
size_t __pyx_v_column;
PyObject *__pyx_v_buffer = 0;
PyObject *__pyx_v_pointer = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
@@ -2328,6 +2359,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_4__str__(struct __pyx_obj_12_ruam
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
/* "_ruamel_yaml.pyx":85
@@ -2454,6 +2488,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_5index___get__(struct __pyx_obj_1
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
@@ -2498,6 +2535,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_4line___get__(struct __pyx_obj_12
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
@@ -2542,6 +2582,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_6column___get__(struct __pyx_obj_
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->column); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
@@ -2667,6 +2710,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_6__reduce_cython__(struct __pyx_o
int __pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":5
@@ -2931,6 +2977,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_8__setstate_cython__(struct __pyx
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":17
@@ -2975,6 +3024,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4Mark_8__setstate_cython__(struct __pyx
static int __pyx_pw_12_ruamel_yaml_7CParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12_ruamel_yaml_7CParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_stream = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
@@ -3033,6 +3085,9 @@ static int __pyx_pf_12_ruamel_yaml_7CParser___init__(struct __pyx_obj_12_ruamel_
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
__Pyx_INCREF(__pyx_v_stream);
@@ -3806,6 +3861,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__parser_error(struct __pyx_obj_
PyObject *__pyx_t_7 = NULL;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parser_error", 0);
/* "_ruamel_yaml.pyx":317
@@ -4632,6 +4690,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_6raw_scan(struct __pyx_obj_12_
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("raw_scan", 0);
/* "_ruamel_yaml.pyx":363
@@ -4807,6 +4868,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__scan(struct __pyx_obj_12_ruame
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_scan", 0);
/* "_ruamel_yaml.pyx":378
@@ -4933,6 +4997,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__token_to_object(struct __pyx_o
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
int __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_token_to_object", 0);
/* "_ruamel_yaml.pyx":387
@@ -7121,6 +7188,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_8get_token(struct __pyx_obj_12
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_token", 0);
/* "_ruamel_yaml.pyx":483
@@ -7243,6 +7313,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_10peek_token(struct __pyx_obj_
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("peek_token", 0);
/* "_ruamel_yaml.pyx":491
@@ -7347,6 +7420,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_12check_token(struct __pyx_obj
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("check_token", 0);
/* "_ruamel_yaml.pyx":496
@@ -7587,6 +7663,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_14raw_parse(struct __pyx_obj_1
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("raw_parse", 0);
/* "_ruamel_yaml.pyx":512
@@ -7762,6 +7841,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__parse(struct __pyx_obj_12_ruam
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parse", 0);
/* "_ruamel_yaml.pyx":527
@@ -7896,6 +7978,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__event_to_object(struct __pyx_o
int __pyx_t_6;
yaml_tag_directive_t *__pyx_t_7;
PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_event_to_object", 0);
/* "_ruamel_yaml.pyx":537
@@ -9991,6 +10076,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_16get_event(struct __pyx_obj_1
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_event", 0);
/* "_ruamel_yaml.pyx":661
@@ -10113,6 +10201,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_18peek_event(struct __pyx_obj_
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("peek_event", 0);
/* "_ruamel_yaml.pyx":669
@@ -10217,6 +10308,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_20check_event(struct __pyx_obj
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("check_event", 0);
/* "_ruamel_yaml.pyx":674
@@ -10452,6 +10546,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_22check_node(struct __pyx_obj_
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("check_node", 0);
/* "_ruamel_yaml.pyx":687
@@ -10588,6 +10685,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_24get_node(struct __pyx_obj_12
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_node", 0);
/* "_ruamel_yaml.pyx":696
@@ -10686,6 +10786,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_26get_single_node(struct __pyx
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_single_node", 0);
/* "_ruamel_yaml.pyx":701
@@ -11071,6 +11174,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__compose_document(struct __pyx_
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compose_document", 0);
/* "_ruamel_yaml.pyx":723
@@ -11181,6 +11287,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__compose_node(struct __pyx_obj_
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compose_node", 0);
/* "_ruamel_yaml.pyx":731
@@ -12164,6 +12273,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__compose_scalar_node(struct __p
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
int __pyx_t_9;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compose_scalar_node", 0);
/* "_ruamel_yaml.pyx":781
@@ -12824,6 +12936,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__compose_sequence_node(struct _
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compose_sequence_node", 0);
/* "_ruamel_yaml.pyx":824
@@ -13449,6 +13564,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_7CParser__compose_mapping_node(struct __
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compose_mapping_node", 0);
/* "_ruamel_yaml.pyx":863
@@ -14071,6 +14189,9 @@ static int __pyx_f_12_ruamel_yaml_7CParser__parse_next_event(struct __pyx_obj_12
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parse_next_event", 0);
/* "_ruamel_yaml.pyx":901
@@ -14186,6 +14307,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_28__reduce_cython__(CYTHON_UNU
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":2
@@ -14240,6 +14364,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_7CParser_30__setstate_cython__(CYTHON_U
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":4
@@ -14289,6 +14416,9 @@ static int __pyx_f_12_ruamel_yaml_input_handler(void *__pyx_v_data, char *__pyx_
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("input_handler", 0);
/* "_ruamel_yaml.pyx":909
@@ -14662,6 +14792,9 @@ static int __pyx_pw_12_ruamel_yaml_8CEmitter_1__init__(PyObject *__pyx_v_self, P
PyObject *__pyx_v_explicit_end = 0;
PyObject *__pyx_v_version = 0;
PyObject *__pyx_v_tags = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
@@ -14861,6 +14994,9 @@ static int __pyx_pf_12_ruamel_yaml_8CEmitter___init__(struct __pyx_obj_12_ruamel
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
int __pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
/* "_ruamel_yaml.pyx":955
@@ -15502,6 +15638,9 @@ static PyObject *__pyx_f_12_ruamel_yaml_8CEmitter__emitter_error(struct __pyx_ob
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_emitter_error", 0);
/* "_ruamel_yaml.pyx":1002
@@ -15736,6 +15875,9 @@ static int __pyx_f_12_ruamel_yaml_8CEmitter__object_to_event(struct __pyx_obj_12
PyObject *(*__pyx_t_7)(PyObject *);
PyObject *__pyx_t_8 = NULL;
int __pyx_t_9;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_object_to_event", 0);
/* "_ruamel_yaml.pyx":1032
@@ -18631,6 +18773,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_6emit(struct __pyx_obj_12_rua
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("emit", 0);
/* "_ruamel_yaml.pyx":1236
@@ -18739,6 +18884,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_8open(struct __pyx_obj_12_rua
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("open", 0);
/* "_ruamel_yaml.pyx":1244
@@ -19185,6 +19333,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_10close(struct __pyx_obj_12_r
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
int __pyx_t_5;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("close", 0);
/* "_ruamel_yaml.pyx":1273
@@ -19421,6 +19572,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_12serialize(struct __pyx_obj_
Py_ssize_t __pyx_t_6;
PyObject *(*__pyx_t_7)(PyObject *);
int __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("serialize", 0);
/* "_ruamel_yaml.pyx":1292
@@ -20357,6 +20511,9 @@ static int __pyx_f_12_ruamel_yaml_8CEmitter__anchor_node(struct __pyx_obj_12_rua
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_anchor_node", 0);
/* "_ruamel_yaml.pyx":1357
@@ -20778,6 +20935,9 @@ static int __pyx_f_12_ruamel_yaml_8CEmitter__serialize_node(struct __pyx_obj_12_
Py_ssize_t __pyx_t_10;
PyObject *(*__pyx_t_11)(PyObject *);
PyObject *(*__pyx_t_12)(PyObject *);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_serialize_node", 0);
/* "_ruamel_yaml.pyx":1386
@@ -23026,6 +23186,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_14__reduce_cython__(CYTHON_UN
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce_cython__", 0);
/* "(tree fragment)":2
@@ -23080,6 +23243,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_8CEmitter_16__setstate_cython__(CYTHON_
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setstate_cython__", 0);
/* "(tree fragment)":4
@@ -23127,6 +23293,9 @@ static int __pyx_f_12_ruamel_yaml_output_handler(void *__pyx_v_data, char *__pyx
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("output_handler", 0);
/* "_ruamel_yaml.pyx":1519
@@ -23258,6 +23427,9 @@ static PyObject *__pyx_pw_12_ruamel_yaml_5__pyx_unpickle_Mark(PyObject *__pyx_se
PyObject *__pyx_v___pyx_type = 0;
long __pyx_v___pyx_checksum;
PyObject *__pyx_v___pyx_state = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__pyx_unpickle_Mark (wrapper)", 0);
@@ -23335,6 +23507,9 @@ static PyObject *__pyx_pf_12_ruamel_yaml_4__pyx_unpickle_Mark(CYTHON_UNUSED PyOb
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_Mark", 0);
/* "(tree fragment)":4
@@ -23524,6 +23699,9 @@ static PyObject *__pyx_f_12_ruamel_yaml___pyx_unpickle_Mark__set_state(struct __
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_unpickle_Mark__set_state", 0);
/* "(tree fragment)":12
@@ -23790,7 +23968,12 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_Mark = {
sizeof(struct __pyx_obj_12_ruamel_yaml_Mark), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_12_ruamel_yaml_Mark, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
@@ -23843,6 +24026,9 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_Mark = {
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
};
static struct __pyx_vtabstruct_12_ruamel_yaml_CParser __pyx_vtable_12_ruamel_yaml_CParser;
@@ -23877,9 +24063,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CParser(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_12_ruamel_yaml_7CParser_3__dealloc__(o);
- --Py_REFCNT(o);
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
Py_CLEAR(p->stream);
@@ -23963,7 +24149,12 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_CParser = {
sizeof(struct __pyx_obj_12_ruamel_yaml_CParser), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_12_ruamel_yaml_CParser, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
@@ -24016,6 +24207,9 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_CParser = {
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
};
static struct __pyx_vtabstruct_12_ruamel_yaml_CEmitter __pyx_vtable_12_ruamel_yaml_CEmitter;
@@ -24050,9 +24244,9 @@ static void __pyx_tp_dealloc_12_ruamel_yaml_CEmitter(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
__pyx_pw_12_ruamel_yaml_8CEmitter_3__dealloc__(o);
- --Py_REFCNT(o);
+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
PyErr_Restore(etype, eval, etb);
}
Py_CLEAR(p->stream);
@@ -24129,7 +24323,12 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_CEmitter = {
sizeof(struct __pyx_obj_12_ruamel_yaml_CEmitter), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_12_ruamel_yaml_CEmitter, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
@@ -24182,6 +24381,9 @@ static PyTypeObject __pyx_type_12_ruamel_yaml_CEmitter = {
#if PY_VERSION_HEX >= 0x030800b1
0, /*tp_vectorcall*/
#endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
};
static PyMethodDef __pyx_methods[] = {
@@ -24853,6 +25055,9 @@ static int __Pyx_modinit_function_export_code(void) {
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_12_ruamel_yaml_Mark) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
@@ -24936,17 +25141,19 @@ static int __Pyx_modinit_function_import_code(void) {
}
-#if PY_MAJOR_VERSION < 3
-#ifdef CYTHON_NO_PYINIT_EXPORT
-#define __Pyx_PyMODINIT_FUNC void
-#else
+#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 CYTHON_NO_PYINIT_EXPORT
-#define __Pyx_PyMODINIT_FUNC PyObject *
+#ifdef __cplusplus
+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
-#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif
@@ -25029,6 +25236,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__ruamel_yaml(PyObject *__pyx_pyini
{
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannyDeclarations
#if CYTHON_PEP489_MULTI_PHASE_INIT
if (__pyx_m) {
@@ -25117,14 +25327,14 @@ if (!__Pyx_RefNanny) {
}
#endif
/*--- Builtin init code ---*/
- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 3, __pyx_L1_error)
/*--- Constants init code ---*/
- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 3, __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)) goto __pyx_L1_error;
+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 3, __pyx_L1_error)
(void)__Pyx_modinit_type_import_code();
(void)__Pyx_modinit_variable_import_code();
(void)__Pyx_modinit_function_import_code();
@@ -26194,7 +26404,7 @@ static int __Pyx_ParseOptionalKeywords(
}
name = first_kw_arg;
#if PY_MAJOR_VERSION < 3
- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ if (likely(PyString_Check(key))) {
while (*name) {
if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
&& _PyString_Eq(**name, key)) {
@@ -26221,7 +26431,7 @@ static int __Pyx_ParseOptionalKeywords(
while (*name) {
int cmp = (**name == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif
PyUnicode_Compare(**name, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
@@ -26237,7 +26447,7 @@ static int __Pyx_ParseOptionalKeywords(
while (argname != first_kw_arg) {
int cmp = (**argname == key) ? 0 :
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
#endif
PyUnicode_Compare(**argname, key);
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
@@ -27083,7 +27293,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
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) {
+ } else if (__Pyx_PyFastCFunction_Check(func)) {
return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
}
@@ -27406,7 +27616,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
{
#if PY_MAJOR_VERSION >= 3
if (level == -1) {
- if (strchr(__Pyx_MODULE_NAME, '.')) {
+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, 1);
if (!module) {
@@ -27505,6 +27715,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam
}
#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;
@@ -27532,43 +27764,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) {
PyObject *setstate = NULL;
PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
+ 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 BAD;
+ 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 BAD;
+ 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 BAD;
+ 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 BAD;
+ 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 BAD;
+ 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 BAD;
+ 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_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
+ 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_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
+ 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 GOOD;
-BAD:
+ 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;
-GOOD:
+__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
Py_XDECREF(object_reduce);
Py_XDECREF(object_reduce_ex);
@@ -27601,7 +27841,7 @@ bad:
/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
-static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
PyObject *use_cline;
PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
@@ -27705,7 +27945,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
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));
+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
if (unlikely(!entries)) {
return;
}
@@ -27828,71 +28068,16 @@ bad:
return (target_type) value;\
}
-/* 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_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 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;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+ const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
@@ -28081,7 +28266,14 @@ raise_neg_overflow:
/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+ const long neg_one = (long) -1, const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
@@ -28268,9 +28460,54 @@ raise_neg_overflow:
return (long) -1;
}
+/* CIntToPy */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+ const int neg_one = (int) -1, const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
+ 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);
+ }
+}
+
/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+ const int neg_one = (int) -1, const_zero = (int) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
@@ -28457,6 +28694,44 @@ raise_neg_overflow:
return (int) -1;
}
+/* CIntToPy */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+ const long neg_one = (long) -1, const_zero = (long) 0;
+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
+#pragma GCC diagnostic pop
+#endif
+ 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);
+ }
+}
+
/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {