From 0134b4270f83b171ca7430b58d895b3fed009136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hanz=C3=ADk?= Date: Sun, 28 Dec 2014 17:54:17 +0100 Subject: [PATCH 1/3] Only version check http request is threaded --- albow/root.py | 10 ++++++++-- mcedit.py | 16 ++++++++++++---- release.py | 10 ++++++++-- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/albow/root.py b/albow/root.py index 64b0c765c..1eb16624b 100644 --- a/albow/root.py +++ b/albow/root.py @@ -187,6 +187,12 @@ def run_modal(self, modal_widget): while modal_widget.modal_result is None: try: + + if not self.mcedit.version_checked: + if not self.mcedit.version_lock.locked(): + self.mcedit.version_checked = True + self.mcedit.check_for_version() + self.hover_widget = self.find_widget(pygame.mouse.get_pos()) if self.bonus_draw_time < 1: self.bonus_draw_time += 1 @@ -366,7 +372,7 @@ def run_modal(self, modal_widget): set_modifier(key, False) add_modifiers(event) self.bonus_draw_time = 0 - + keyname = event.dict.get('keyname', None) or self.getKey(event) levelExist = self.editor.level is not None if 'mouse' not in keyname and 'Mouse' not in keyname: @@ -374,7 +380,7 @@ def run_modal(self, modal_widget): for i, key in enumerate(self.editor.movements): if tempKeyname == key: self.changeMovementKeys(i, False, levelExist) - + for i, key in enumerate(self.editor.cameraPan): if tempKeyname == key: self.changeCameraKeys(i, False, levelExist) diff --git a/mcedit.py b/mcedit.py index 52f850264..dd4f2b568 100644 --- a/mcedit.py +++ b/mcedit.py @@ -413,8 +413,12 @@ def justQuit(self): raise SystemExit @classmethod + def fetch_version(self): + with self.version_lock: + self.version_info = release.fetch_new_version_info() + def check_for_version(self): - new_version = release.check_for_new_version() + new_version = release.check_for_new_version(self.version_info) if new_version is not False: answer = albow.ask( _('Version {} is available').format(new_version["tag_name"]), @@ -450,9 +454,13 @@ def main(self): if mcedit.droppedLevel: mcedit.loadFile(mcedit.droppedLevel) - new_version_thread = threading.Thread(target=self.check_for_version) - new_version_thread.start() - + self.version_lock = threading.Lock() + self.version_info = None + self.version_checked = False + + fetch_version_thread = threading.Thread(target=self.fetch_version) + fetch_version_thread.start() + # Disabled old update code # if hasattr(sys, 'frozen'): diff --git a/release.py b/release.py index bd8cb410c..34f09ce8d 100644 --- a/release.py +++ b/release.py @@ -37,13 +37,19 @@ def is_dev(): return current["development"] except: raise -def check_for_new_version(): + + +def fetch_new_version_info(): + return json.loads(urllib2.urlopen("https://api.github.com/repos/Khroki/MCEdit-Unified/releases").read()) + + +def check_for_new_version(release_api_response): ''' Checks for a new MCEdit-Unified version, if the current one is not in development mode ''' try: if not is_dev(): - release_api_response = json.loads(urllib2.urlopen("https://api.github.com/repos/Khroki/MCEdit-Unified/releases").read()) + # release_api_response = json.loads(urllib2.urlopen("https://api.github.com/repos/Khroki/MCEdit-Unified/releases").read()) version = release_api_response[0] if version["tag_name"] != get_release_tag(): is_64bit = sys.maxsize > 2**32 From c76e1bcf21c5609874ad621387b0be602cfba1f6 Mon Sep 17 00:00:00 2001 From: naor2013 Date: Sun, 28 Dec 2014 19:12:53 +0200 Subject: [PATCH 2/3] Removed a warning about comparison --- renderer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer.py b/renderer.py index 34acf240f..8fe276a7d 100644 --- a/renderer.py +++ b/renderer.py @@ -627,9 +627,9 @@ def getAreaBlockLights(self, chunk, neighboringChunks): skyLight = chunk.SkyLight finalLight = self.whiteLight - if lights != None: + if lights is not None: finalLight = lights - if skyLight != None: + if skyLight is not None: finalLight = numpy.maximum(skyLight, lights) areaBlockLights = numpy.ones((chunkWidth + 2, chunkLength + 2, chunkHeight + 2), numpy.uint8) From 764cb4d5ea53df4cb191c2367cb24cf38e4eba45 Mon Sep 17 00:00:00 2001 From: LaChal Date: Sun, 28 Dec 2014 19:07:13 +0100 Subject: [PATCH 3/3] Fix for window placement in Linux. --- mcedit.py | 2 +- mcedit.sh | 18 +- pymclevel/_nbt.c | 6416 +++++++++++++++++-------------- utilities/gl_display_context.py | 9 +- 4 files changed, 3471 insertions(+), 2974 deletions(-) diff --git a/mcedit.py b/mcedit.py index dd4f2b568..072e6585e 100644 --- a/mcedit.py +++ b/mcedit.py @@ -598,7 +598,7 @@ def saveWindowPosition(self): dis = mcplatform.Xlib.display.Display() win = dis.create_resource_object('window', win) curDesk = os.environ.get('XDG_CURRENT_DESKTOP') - if curDesk == 'GNOME': + if curDesk in ('GNOME', 'X-Cinnamon'): wParent = win.query_tree().parent.query_tree().parent elif curDesk == 'KDE': wParent = win.query_tree().parent.query_tree().parent.query_tree().parent diff --git a/mcedit.sh b/mcedit.sh index 418661be2..177e73c26 100755 --- a/mcedit.sh +++ b/mcedit.sh @@ -1,4 +1,18 @@ -#!/bin/sh +#!/bin/bash cd $(dirname $0) echo "Starting MCEdit..." -python2 mcedit.py +f= +if [ -f "mcedit.py" ] +then + f="mcedit.py" +elif [ -f "mcedit.pyc" ] +then + f="mcedit.pyc" +else + echo "MCEdit program not found." + echo "Check your installation and retry." + exit 1 +fi +python2 "$f $@" +read -n 1 -p "Press any key to close." +echo "" diff --git a/pymclevel/_nbt.c b/pymclevel/_nbt.c index d399dd7b3..fd201f121 100644 --- a/pymclevel/_nbt.c +++ b/pymclevel/_nbt.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.20.1 on Sun Aug 24 12:36:10 2014 */ +/* Generated by Cython 0.21.1 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS @@ -16,11 +16,11 @@ #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 < 0x02040000 - #error Cython requires Python 2.4+. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) + #error Cython requires Python 2.6+ or Python 3.2+. #else -#define CYTHON_ABI "0_20_1" -#include /* For offsetof */ +#define CYTHON_ABI "0_21_1" +#include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif @@ -54,65 +54,11 @@ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif -#if CYTHON_COMPILING_IN_PYPY +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 #define Py_OptimizeFlag 0 #endif -#if PY_VERSION_HEX < 0x02050000 - typedef int Py_ssize_t; - #define PY_SSIZE_T_MAX INT_MAX - #define PY_SSIZE_T_MIN INT_MIN - #define PY_FORMAT_SIZE_T "" - #define CYTHON_FORMAT_SSIZE_T "" - #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) - #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ - (PyErr_Format(PyExc_TypeError, \ - "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ - (PyObject*)0)) - #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ - !PyComplex_Check(o)) - #define PyIndex_Check __Pyx_PyIndex_Check - #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) - #define __PYX_BUILD_PY_SSIZE_T "i" -#else - #define __PYX_BUILD_PY_SSIZE_T "n" - #define CYTHON_FORMAT_SSIZE_T "z" - #define __Pyx_PyIndex_Check PyIndex_Check -#endif -#if PY_VERSION_HEX < 0x02060000 - #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) - #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) - #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) - #define PyVarObject_HEAD_INIT(type, size) \ - PyObject_HEAD_INIT(type) size, - #define PyType_Modified(t) - typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; - } Py_buffer; - #define PyBUF_SIMPLE 0 - #define PyBUF_WRITABLE 0x0001 - #define PyBUF_FORMAT 0x0004 - #define PyBUF_ND 0x0008 - #define PyBUF_STRIDES (0x0010 | PyBUF_ND) - #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) - #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) - #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) - #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) - #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) - #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) - typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); - typedef void (*releasebufferproc)(PyObject *, Py_buffer *); -#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) \ @@ -124,22 +70,11 @@ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif -#if PY_VERSION_HEX < 0x02060000 - #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") -#endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 -#endif -#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif -#if PY_VERSION_HEX < 0x02060000 - #define Py_TPFLAGS_HAVE_VERSION_TAG 0 -#endif -#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) - #define Py_TPFLAGS_IS_ABSTRACT 0 -#endif #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif @@ -164,12 +99,14 @@ #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) + #define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s) #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)) + #define __Pyx_PyFrozenSet_Size(s) PySet_Size(s) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) @@ -183,36 +120,13 @@ #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif -#if PY_VERSION_HEX < 0x02060000 - #define PyBytesObject PyStringObject - #define PyBytes_Type PyString_Type - #define PyBytes_Check PyString_Check - #define PyBytes_CheckExact PyString_CheckExact - #define PyBytes_FromString PyString_FromString - #define PyBytes_FromStringAndSize PyString_FromStringAndSize - #define PyBytes_FromFormat PyString_FromFormat - #define PyBytes_DecodeEscape PyString_DecodeEscape - #define PyBytes_AsString PyString_AsString - #define PyBytes_AsStringAndSize PyString_AsStringAndSize - #define PyBytes_Size PyString_Size - #define PyBytes_AS_STRING PyString_AS_STRING - #define PyBytes_GET_SIZE PyString_GET_SIZE - #define PyBytes_Repr PyString_Repr - #define PyBytes_Concat PyString_Concat - #define PyBytes_ConcatAndDel PyString_ConcatAndDel -#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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ - PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif -#if PY_VERSION_HEX < 0x02060000 - #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) - #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) -#endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif @@ -237,6 +151,11 @@ #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 @@ -245,42 +164,10 @@ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif -#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) - #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) - #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) -#else - #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) - #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) -#endif #if PY_MAJOR_VERSION >= 3 - #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) -#endif -#if PY_VERSION_HEX < 0x02050000 - #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) - #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) - #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else - #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) - #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) - #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) -#endif -#if PY_VERSION_HEX < 0x02050000 - #define __Pyx_NAMESTR(n) ((char *)(n)) - #define __Pyx_DOCSTR(n) ((char *)(n)) -#else - #define __Pyx_NAMESTR(n) (n) - #define __Pyx_DOCSTR(n) (n) + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #ifndef CYTHON_INLINE #if defined(__GNUC__) @@ -316,6 +203,12 @@ static CYTHON_INLINE float __PYX_NAN() { return value; } #endif +#ifdef __cplusplus +template +void __Pyx_call_destructor(T* x) { + x->~T(); +} +#endif #if PY_MAJOR_VERSION >= 3 @@ -367,7 +260,7 @@ static CYTHON_INLINE float __PYX_NAN() { # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; - const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ + 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_DEFAULT 0 @@ -390,7 +283,7 @@ static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* #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(char*); +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 @@ -400,17 +293,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s) -#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) -#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) -#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) -#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) +#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; - return u_end - u - 1; + return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen @@ -433,18 +326,21 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #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 = NULL; + 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 == NULL) goto bad; + if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - if (default_encoding == NULL) goto bad; - if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { + 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 { - const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { @@ -452,23 +348,21 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); - if (ascii_chars_u == NULL) goto bad; + if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); - if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + 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_XDECREF(sys); - Py_XDECREF(default_encoding); - Py_XDECREF(ascii_chars_u); - Py_XDECREF(ascii_chars_b); + Py_DECREF(default_encoding); return 0; bad: - Py_XDECREF(sys); Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); @@ -482,21 +376,22 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys = NULL; + PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); - if (sys == NULL) goto bad; + if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - if (default_encoding == NULL) goto bad; - default_encoding_c = PyBytes_AS_STRING(default_encoding); + 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)); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); - Py_DECREF(sys); Py_DECREF(default_encoding); return 0; bad: - Py_XDECREF(sys); Py_XDECREF(default_encoding); return -1; } @@ -504,16 +399,11 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { #endif -#ifdef __GNUC__ - /* Test for GCC > 2.95 */ - #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) - #define likely(x) __builtin_expect(!!(x), 1) - #define unlikely(x) __builtin_expect(!!(x), 0) - #else /* __GNUC__ > 2 ... */ - #define likely(x) (x) - #define unlikely(x) (x) - #endif /* __GNUC__ > 2 ... */ -#else /* __GNUC__ */ +/* 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__ */ @@ -555,9 +445,9 @@ struct __pyx_obj_4_nbt___pyx_scope_struct____iter__; struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__; struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr; -/* "_nbt.pyx":76 - * +/* "_nbt.pyx":78 * import nbt_util + * * cdef class TAG_Value: # <<<<<<<<<<<<<< * IF UNICODE_NAMES: * cdef unicode _name @@ -569,8 +459,8 @@ struct __pyx_obj_4_nbt_TAG_Value { }; -/* "_nbt.pyx":106 - * +/* "_nbt.pyx":107 + * return self.__class__, (self.value, self._name) * * cdef class TAG_Byte(TAG_Value): # <<<<<<<<<<<<<< * cdef public char value @@ -584,7 +474,7 @@ struct __pyx_obj_4_nbt_TAG_Byte { /* "_nbt.pyx":118 - * + * self.tagID = TAG_BYTE * * cdef class TAG_Short(TAG_Value): # <<<<<<<<<<<<<< * cdef public short value @@ -597,8 +487,8 @@ struct __pyx_obj_4_nbt_TAG_Short { }; -/* "_nbt.pyx":130 - * +/* "_nbt.pyx":129 + * self.tagID = TAG_SHORT * * cdef class TAG_Int(TAG_Value): # <<<<<<<<<<<<<< * cdef public int value @@ -611,8 +501,8 @@ struct __pyx_obj_4_nbt_TAG_Int { }; -/* "_nbt.pyx":142 - * +/* "_nbt.pyx":140 + * self.tagID = TAG_INT * * cdef class TAG_Long(TAG_Value): # <<<<<<<<<<<<<< * cdef public long long value @@ -625,8 +515,8 @@ struct __pyx_obj_4_nbt_TAG_Long { }; -/* "_nbt.pyx":154 - * +/* "_nbt.pyx":151 + * self.tagID = TAG_LONG * * cdef class TAG_Float(TAG_Value): # <<<<<<<<<<<<<< * cdef public float value @@ -639,8 +529,8 @@ struct __pyx_obj_4_nbt_TAG_Float { }; -/* "_nbt.pyx":166 - * +/* "_nbt.pyx":162 + * self.tagID = TAG_FLOAT * * cdef class TAG_Double(TAG_Value): # <<<<<<<<<<<<<< * cdef public double value @@ -653,8 +543,8 @@ struct __pyx_obj_4_nbt_TAG_Double { }; -/* "_nbt.pyx":178 - * +/* "_nbt.pyx":173 + * self.tagID = TAG_DOUBLE * * cdef class TAG_Byte_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -667,8 +557,8 @@ struct __pyx_obj_4_nbt_TAG_Byte_Array { }; -/* "_nbt.pyx":197 - * +/* "_nbt.pyx":191 + * return "<%s name=%s length=%d>" % (self.__class__.__name__, self.name, len(self.value)) * * cdef class TAG_Int_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -681,8 +571,8 @@ struct __pyx_obj_4_nbt_TAG_Int_Array { }; -/* "_nbt.pyx":213 - * +/* "_nbt.pyx":206 + * save_array(self.value, buf, 4) * * cdef class TAG_Short_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -695,8 +585,8 @@ struct __pyx_obj_4_nbt_TAG_Short_Array { }; -/* "_nbt.pyx":229 - * +/* "_nbt.pyx":221 + * save_array(self.value, buf, 2) * * cdef class TAG_String(TAG_Value): # <<<<<<<<<<<<<< * cdef unicode _value @@ -709,8 +599,8 @@ struct __pyx_obj_4_nbt_TAG_String { }; -/* "_nbt.pyx":250 - * +/* "_nbt.pyx":241 + * save_string(self._value.encode('utf-8'), buf) * * cdef class _TAG_List(TAG_Value): # <<<<<<<<<<<<<< * cdef public list value @@ -724,7 +614,7 @@ struct __pyx_obj_4_nbt__TAG_List { }; -/* "_nbt.pyx":323 +/* "_nbt.pyx":313 * * * cdef class _TAG_Compound(TAG_Value): # <<<<<<<<<<<<<< @@ -738,12 +628,12 @@ struct __pyx_obj_4_nbt__TAG_Compound { }; -/* "_nbt.pyx":453 - * +/* "_nbt.pyx":440 + * return load_buffer(try_gunzip(buf)) * * cdef class load_ctx: # <<<<<<<<<<<<<< * cdef size_t offset - * cdef char * buffer + * cdef char *buffer */ struct __pyx_obj_4_nbt_load_ctx { PyObject_HEAD @@ -753,7 +643,7 @@ struct __pyx_obj_4_nbt_load_ctx { }; -/* "_nbt.pyx":355 +/* "_nbt.pyx":345 * raise KeyError("Key %s not found" % key) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -770,7 +660,7 @@ struct __pyx_obj_4_nbt___pyx_scope_struct____iter__ { }; -/* "_nbt.pyx":360 +/* "_nbt.pyx":350 * yield v._name * * def __contains__(self, k): # <<<<<<<<<<<<<< @@ -784,7 +674,7 @@ struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__ { }; -/* "_nbt.pyx":361 +/* "_nbt.pyx":351 * * def __contains__(self, k): * return any(tag.name == k for tag in self.value) # <<<<<<<<<<<<<< @@ -802,8 +692,8 @@ struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr { -/* "_nbt.pyx":106 - * +/* "_nbt.pyx":107 + * return self.__class__, (self.value, self._name) * * cdef class TAG_Byte(TAG_Value): # <<<<<<<<<<<<<< * cdef public char value @@ -817,7 +707,7 @@ static struct __pyx_vtabstruct_4_nbt_TAG_Byte *__pyx_vtabptr_4_nbt_TAG_Byte; /* "_nbt.pyx":118 - * + * self.tagID = TAG_BYTE * * cdef class TAG_Short(TAG_Value): # <<<<<<<<<<<<<< * cdef public short value @@ -830,8 +720,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Short { static struct __pyx_vtabstruct_4_nbt_TAG_Short *__pyx_vtabptr_4_nbt_TAG_Short; -/* "_nbt.pyx":130 - * +/* "_nbt.pyx":129 + * self.tagID = TAG_SHORT * * cdef class TAG_Int(TAG_Value): # <<<<<<<<<<<<<< * cdef public int value @@ -844,8 +734,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Int { static struct __pyx_vtabstruct_4_nbt_TAG_Int *__pyx_vtabptr_4_nbt_TAG_Int; -/* "_nbt.pyx":142 - * +/* "_nbt.pyx":140 + * self.tagID = TAG_INT * * cdef class TAG_Long(TAG_Value): # <<<<<<<<<<<<<< * cdef public long long value @@ -858,8 +748,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Long { static struct __pyx_vtabstruct_4_nbt_TAG_Long *__pyx_vtabptr_4_nbt_TAG_Long; -/* "_nbt.pyx":154 - * +/* "_nbt.pyx":151 + * self.tagID = TAG_LONG * * cdef class TAG_Float(TAG_Value): # <<<<<<<<<<<<<< * cdef public float value @@ -872,8 +762,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Float { static struct __pyx_vtabstruct_4_nbt_TAG_Float *__pyx_vtabptr_4_nbt_TAG_Float; -/* "_nbt.pyx":166 - * +/* "_nbt.pyx":162 + * self.tagID = TAG_FLOAT * * cdef class TAG_Double(TAG_Value): # <<<<<<<<<<<<<< * cdef public double value @@ -886,8 +776,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Double { static struct __pyx_vtabstruct_4_nbt_TAG_Double *__pyx_vtabptr_4_nbt_TAG_Double; -/* "_nbt.pyx":178 - * +/* "_nbt.pyx":173 + * self.tagID = TAG_DOUBLE * * cdef class TAG_Byte_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -900,8 +790,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Byte_Array { static struct __pyx_vtabstruct_4_nbt_TAG_Byte_Array *__pyx_vtabptr_4_nbt_TAG_Byte_Array; -/* "_nbt.pyx":197 - * +/* "_nbt.pyx":191 + * return "<%s name=%s length=%d>" % (self.__class__.__name__, self.name, len(self.value)) * * cdef class TAG_Int_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -914,8 +804,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Int_Array { static struct __pyx_vtabstruct_4_nbt_TAG_Int_Array *__pyx_vtabptr_4_nbt_TAG_Int_Array; -/* "_nbt.pyx":213 - * +/* "_nbt.pyx":206 + * save_array(self.value, buf, 4) * * cdef class TAG_Short_Array(TAG_Value): # <<<<<<<<<<<<<< * cdef public object value @@ -928,8 +818,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_Short_Array { static struct __pyx_vtabstruct_4_nbt_TAG_Short_Array *__pyx_vtabptr_4_nbt_TAG_Short_Array; -/* "_nbt.pyx":229 - * +/* "_nbt.pyx":221 + * save_array(self.value, buf, 2) * * cdef class TAG_String(TAG_Value): # <<<<<<<<<<<<<< * cdef unicode _value @@ -942,8 +832,8 @@ struct __pyx_vtabstruct_4_nbt_TAG_String { static struct __pyx_vtabstruct_4_nbt_TAG_String *__pyx_vtabptr_4_nbt_TAG_String; -/* "_nbt.pyx":250 - * +/* "_nbt.pyx":241 + * save_string(self._value.encode('utf-8'), buf) * * cdef class _TAG_List(TAG_Value): # <<<<<<<<<<<<<< * cdef public list value @@ -956,7 +846,7 @@ struct __pyx_vtabstruct_4_nbt__TAG_List { static struct __pyx_vtabstruct_4_nbt__TAG_List *__pyx_vtabptr_4_nbt__TAG_List; -/* "_nbt.pyx":323 +/* "_nbt.pyx":313 * * * cdef class _TAG_Compound(TAG_Value): # <<<<<<<<<<<<<< @@ -981,7 +871,7 @@ static struct __pyx_vtabstruct_4_nbt__TAG_Compound *__pyx_vtabptr_4_nbt__TAG_Com void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil) \ @@ -1018,7 +908,7 @@ static struct __pyx_vtabstruct_4_nbt__TAG_Compound *__pyx_vtabptr_4_nbt__TAG_Com #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) -#endif /* CYTHON_REFNANNY */ +#endif #define __Pyx_XDECREF_SET(r, v) do { \ PyObject *tmp = (PyObject *) r; \ r = v; __Pyx_XDECREF(tmp); \ @@ -1045,7 +935,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif -static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); #ifndef CYTHON_PROFILE #define CYTHON_PROFILE 1 @@ -1108,14 +998,14 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ CYTHON_FRAME_DEL; \ tstate->use_tracing = 1; \ } - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/ - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/ + static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); + static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); #else #define __Pyx_TraceDeclarations #define __Pyx_TraceCall(funcname, srcfile, firstlineno) #define __Pyx_TraceException() #define __Pyx_TraceReturn(result) -#endif /* CYTHON_PROFILE */ +#endif #if CYTHON_TRACE #define __Pyx_TraceLine(lineno) \ if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) { \ @@ -1129,22 +1019,28 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ #define __Pyx_TraceLine(lineno) #endif -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ +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 -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ - const char* function_name); /*proto*/ + const char* function_name); 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); /*proto*/ + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) @@ -1184,16 +1080,16 @@ static CYTHON_INLINE 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); -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); #include -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { @@ -1227,39 +1123,27 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif -static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { - PyObject *method, *result = NULL; - if (unlikely(!args)) return NULL; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); - if (unlikely(!method)) goto bad; - result = __Pyx_PyObject_Call(method, args, NULL); - Py_DECREF(method); -bad: - Py_DECREF(args); - return result; -} -#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) -#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) -#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) -#define __Pyx_PyObject_CallMethod0(obj, name) \ - __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); +#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 + static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact); /*proto*/ + const char *name, int exact); static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ -static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join @@ -1275,7 +1159,7 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( @@ -1295,16 +1179,33 @@ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, trav static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, - PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ + 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); /*proto*/ + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +typedef struct { + int code_line; + PyCodeObject* code_object; +} __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); + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); @@ -1322,7 +1223,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); @@ -1334,7 +1235,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_Generator_USED #include @@ -1350,11 +1251,13 @@ typedef struct { PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; + PyObject *gi_name; + PyObject *gi_qualname; int resume_label; char is_running; } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, - PyObject *closure); + PyObject *closure, PyObject *name, PyObject *qualname); static int __pyx_Generator_init(void); static int __Pyx_Generator_clear(PyObject* self); #if 1 || PY_VERSION_HEX < 0x030300B0 @@ -1373,29 +1276,24 @@ static int __Pyx_check_binary_version(void); #endif #endif -static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ - -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ - -typedef struct { - int code_line; - PyCodeObject* code_object; -} __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); +static PyObject *__Pyx_ImportModule(const char *name); -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); /*proto*/ +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); +static PyObject *__pyx_f_4_nbt_8TAG_Byte_save_value(struct __pyx_obj_4_nbt_TAG_Byte *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_9TAG_Short_save_value(struct __pyx_obj_4_nbt_TAG_Short *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_7TAG_Int_save_value(struct __pyx_obj_4_nbt_TAG_Int *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_8TAG_Long_save_value(struct __pyx_obj_4_nbt_TAG_Long *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_9TAG_Float_save_value(struct __pyx_obj_4_nbt_TAG_Float *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_10TAG_Double_save_value(struct __pyx_obj_4_nbt_TAG_Double *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_14TAG_Byte_Array_save_value(struct __pyx_obj_4_nbt_TAG_Byte_Array *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_13TAG_Int_Array_save_value(struct __pyx_obj_4_nbt_TAG_Int_Array *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_15TAG_Short_Array_save_value(struct __pyx_obj_4_nbt_TAG_Short_Array *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_10TAG_String_save_value(struct __pyx_obj_4_nbt_TAG_String *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG_List *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ +static PyObject *__pyx_f_4_nbt_13_TAG_Compound_save_value(struct __pyx_obj_4_nbt__TAG_Compound *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ /* Module declarations from 'cpython.version' */ @@ -1670,6 +1568,7 @@ static char __pyx_k_data[] = "data"; static char __pyx_k_file[] = "file"; static char __pyx_k_gzip[] = "gzip"; static char __pyx_k_hexa[] = "hexa"; +static char __pyx_k_iter[] = "__iter__"; static char __pyx_k_join[] = "join"; static char __pyx_k_keys[] = "keys"; static char __pyx_k_load[] = "load"; @@ -1707,6 +1606,7 @@ static char __pyx_k_strict[] = "strict"; static char __pyx_k_04X_s_s[] = "%04X %-*s %s\n"; static char __pyx_k_IOError[] = "IOError"; static char __pyx_k_fileobj[] = "fileobj"; +static char __pyx_k_genexpr[] = "genexpr"; static char __pyx_k_hexdump[] = "hexdump"; static char __pyx_k_ndarray[] = "ndarray"; static char __pyx_k_prepare[] = "__prepare__"; @@ -1746,20 +1646,21 @@ static char __pyx_k_s_name_s_keys_r[] = "<%s name='%s' keys=%r>"; static char __pyx_k_s_name_s_value_r[] = "<%s name=\"%s\" value=%r>"; static char __pyx_k_Key_s_not_found_2[] = "Key %s not found"; static char __pyx_k_s_name_s_length_d[] = "<%s name=%s length=%d>"; +static char __pyx_k_TAG_Compound___iter[] = "_TAG_Compound.__iter__"; static char __pyx_k_NBT_Stream_too_short[] = "NBT Stream too short!"; +static char __pyx_k_contains___locals_genexpr[] = "__contains__..genexpr"; static char __pyx_k_Invalid_type_s_for_TAG_List_s[] = "Invalid type %s for TAG_List(%s)"; static char __pyx_k_s_name_s_list_type_r_length_d[] = "<%s name='%s' list_type=%r length=%d>"; static char __pyx_k_Cython_implementation_Named_Bin[] = "\nCython implementation\n\nNamed Binary Tag library. Serializes and deserializes TAG_* objects\nto and from binary data. Load a Minecraft level by calling nbt.load().\nCreate your own TAG_* objects and set their values.\nSave a TAG_* object to a file or StringIO object.\n\nRead the test functions at the end of the file to get started.\n\nThis library requires Numpy. Get it here:\nhttp://new.scipy.org/download.html\n\nOfficial NBT documentation is here:\nhttp://www.minecraft.net/docs/NBT.txt\n\n\nCopyright 2012 David Rio Vierra\n"; static char __pyx_k_Not_an_NBT_file_with_a_root_TAG[] = "Not an NBT file with a root TAG_Compound (file starts with \"%4s\" (0x%08x)"; +static char __pyx_k_home_dens_Projets_Python27_MCEd[] = "/home/dens/Projets/Python27/MCEdit-Unified/master/MCEdit-Unified/pymclevel/_nbt.pyx"; static char __pyx_k_Asked_to_save_TAG_List_with_diff[] = "Asked to save TAG_List with different types! Found %s and %s"; -static char __pyx_k_C_Users_Kris_Desktop_Tal_s_Folde[] = "C:\\Users\\Kris\\Desktop\\Tal's Folder\\Minecraft\\MCEdit\\appdata\\mcedit-master\\pymclevel\\_nbt.pyx"; static char __pyx_k_Cannot_add_unnamed_tag_to_TAG_Co[] = "Cannot add unnamed tag to TAG_Compound"; static char __pyx_k_NBT_Stream_too_short_Asked_for_d[] = "NBT Stream too short. Asked for %d, only had %d"; static PyObject *__pyx_kp_s_; static PyObject *__pyx_kp_s_02X; static PyObject *__pyx_kp_s_04X_s_s; static PyObject *__pyx_kp_s_Asked_to_save_TAG_List_with_diff; -static PyObject *__pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde; static PyObject *__pyx_kp_s_Cannot_add_unnamed_tag_to_TAG_Co; static PyObject *__pyx_n_s_FILTER; static PyObject *__pyx_n_s_GzipFile; @@ -1777,6 +1678,7 @@ static PyObject *__pyx_kp_s_NBT_Stream_too_short_Asked_for_d; static PyObject *__pyx_kp_s_Not_an_NBT_file_with_a_root_TAG; static PyObject *__pyx_n_s_StringIO; static PyObject *__pyx_n_s_TAG_Compound; +static PyObject *__pyx_n_s_TAG_Compound___iter; static PyObject *__pyx_n_s_TAG_List; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_ValueError; @@ -1794,6 +1696,7 @@ static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_collections; static PyObject *__pyx_n_s_compressed; +static PyObject *__pyx_n_s_contains___locals_genexpr; static PyObject *__pyx_n_s_count; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_doc; @@ -1805,14 +1708,17 @@ static PyObject *__pyx_n_s_filename_or_buf; static PyObject *__pyx_n_s_fileobj; static PyObject *__pyx_n_s_frombuffer; static PyObject *__pyx_n_s_fromstring; +static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_n_s_getvalue; static PyObject *__pyx_n_s_gunzip; static PyObject *__pyx_n_s_gzip; static PyObject *__pyx_n_s_hexa; static PyObject *__pyx_n_s_hexdump; +static PyObject *__pyx_kp_s_home_dens_Projets_Python27_MCEd; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_index; static PyObject *__pyx_n_s_itemsize; +static PyObject *__pyx_n_s_iter; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_length; @@ -1885,7 +1791,7 @@ static PyObject *__pyx_codeobj__17; static PyObject *__pyx_codeobj__19; static PyObject *__pyx_codeobj__21; -/* "_nbt.pyx":83 +/* "_nbt.pyx":85 * cdef public char tagID * * def __repr__(self): # <<<<<<<<<<<<<< @@ -1918,9 +1824,9 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value___repr__(struct __pyx_obj_4_nbt_TAG_V int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 83); + __Pyx_TraceCall("__repr__", __pyx_f[0], 85); - /* "_nbt.pyx":84 + /* "_nbt.pyx":86 * * def __repr__(self): * return "<%s name=\"%s\" value=%r>" % (self.__class__.__name__, self.name, self.value) # <<<<<<<<<<<<<< @@ -1928,16 +1834,16 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value___repr__(struct __pyx_obj_4_nbt_TAG_V * def __str__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -1948,14 +1854,14 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value___repr__(struct __pyx_obj_4_nbt_TAG_V __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_value_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_value_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_nbt.pyx":83 + /* "_nbt.pyx":85 * cdef public char tagID * * def __repr__(self): # <<<<<<<<<<<<<< @@ -1978,7 +1884,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value___repr__(struct __pyx_obj_4_nbt_TAG_V return __pyx_r; } -/* "_nbt.pyx":86 +/* "_nbt.pyx":88 * return "<%s name=\"%s\" value=%r>" % (self.__class__.__name__, self.name, self.value) * * def __str__(self): # <<<<<<<<<<<<<< @@ -2005,14 +1911,15 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_2__str__(struct __pyx_obj_4_nbt_TAG_V PyObject *__pyx_t_1 = NULL; 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_TraceDeclarations __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 86); + __Pyx_TraceCall("__str__", __pyx_f[0], 88); - /* "_nbt.pyx":87 + /* "_nbt.pyx":89 * * def __str__(self): * return nbt_util.nested_string(self) # <<<<<<<<<<<<<< @@ -2020,25 +1927,41 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_2__str__(struct __pyx_obj_4_nbt_TAG_V * property name: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nbt_util); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nested_string); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nbt_util); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nested_string); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_2 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + if (!__pyx_t_2) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "_nbt.pyx":86 + /* "_nbt.pyx":88 * return "<%s name=\"%s\" value=%r>" % (self.__class__.__name__, self.name, self.value) * * def __str__(self): # <<<<<<<<<<<<<< @@ -2051,6 +1974,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_2__str__(struct __pyx_obj_4_nbt_TAG_V __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("_nbt.TAG_Value.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -2060,7 +1984,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_2__str__(struct __pyx_obj_4_nbt_TAG_V return __pyx_r; } -/* "_nbt.pyx":90 +/* "_nbt.pyx":92 * * property name: * def __get__(self): # <<<<<<<<<<<<<< @@ -2086,9 +2010,9 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4name___get__(struct __pyx_obj_4_nbt_ __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 90); + __Pyx_TraceCall("__get__", __pyx_f[0], 92); - /* "_nbt.pyx":91 + /* "_nbt.pyx":93 * property name: * def __get__(self): * return self._name # <<<<<<<<<<<<<< @@ -2100,7 +2024,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4name___get__(struct __pyx_obj_4_nbt_ __pyx_r = __pyx_v_self->_name; goto __pyx_L0; - /* "_nbt.pyx":90 + /* "_nbt.pyx":92 * * property name: * def __get__(self): # <<<<<<<<<<<<<< @@ -2116,7 +2040,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4name___get__(struct __pyx_obj_4_nbt_ return __pyx_r; } -/* "_nbt.pyx":93 +/* "_nbt.pyx":95 * return self._name * * def __set__(self, val): # <<<<<<<<<<<<<< @@ -2149,10 +2073,10 @@ static int __pyx_pf_4_nbt_9TAG_Value_4name_2__set__(struct __pyx_obj_4_nbt_TAG_V int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 93); + __Pyx_TraceCall("__set__", __pyx_f[0], 95); __Pyx_INCREF(__pyx_v_val); - /* "_nbt.pyx":98 + /* "_nbt.pyx":100 * val = PyUnicode_DecodeUTF8(val, len(val), "strict") * ELSE: * if isinstance(val, unicode): # <<<<<<<<<<<<<< @@ -2163,19 +2087,19 @@ static int __pyx_pf_4_nbt_9TAG_Value_4name_2__set__(struct __pyx_obj_4_nbt_TAG_V __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":99 + /* "_nbt.pyx":101 * ELSE: * if isinstance(val, unicode): * val = str(val) # <<<<<<<<<<<<<< * self._name = val * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_val, __pyx_t_4); @@ -2184,14 +2108,14 @@ static int __pyx_pf_4_nbt_9TAG_Value_4name_2__set__(struct __pyx_obj_4_nbt_TAG_V } __pyx_L3:; - /* "_nbt.pyx":100 + /* "_nbt.pyx":102 * if isinstance(val, unicode): * val = str(val) * self._name = val # <<<<<<<<<<<<<< * * def __reduce__(self): */ - if (!(likely(PyBytes_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_val)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_val)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = __pyx_v_val; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -2200,7 +2124,7 @@ static int __pyx_pf_4_nbt_9TAG_Value_4name_2__set__(struct __pyx_obj_4_nbt_TAG_V __pyx_v_self->_name = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":93 + /* "_nbt.pyx":95 * return self._name * * def __set__(self, val): # <<<<<<<<<<<<<< @@ -2223,7 +2147,7 @@ static int __pyx_pf_4_nbt_9TAG_Value_4name_2__set__(struct __pyx_obj_4_nbt_TAG_V return __pyx_r; } -/* "_nbt.pyx":102 +/* "_nbt.pyx":104 * self._name = val * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -2255,21 +2179,21 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4__reduce__(struct __pyx_obj_4_nbt_TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__reduce__", 0); - __Pyx_TraceCall("__reduce__", __pyx_f[0], 102); + __Pyx_TraceCall("__reduce__", __pyx_f[0], 104); - /* "_nbt.pyx":103 + /* "_nbt.pyx":105 * * def __reduce__(self): * return self.__class__, (self.value, self._name) # <<<<<<<<<<<<<< * - * + * cdef class TAG_Byte(TAG_Value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -2277,7 +2201,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4__reduce__(struct __pyx_obj_4_nbt_TA PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->_name); __Pyx_GIVEREF(__pyx_v_self->_name); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -2289,7 +2213,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4__reduce__(struct __pyx_obj_4_nbt_TA __pyx_t_2 = 0; goto __pyx_L0; - /* "_nbt.pyx":102 + /* "_nbt.pyx":104 * self._name = val * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -2311,7 +2235,7 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_4__reduce__(struct __pyx_obj_4_nbt_TA return __pyx_r; } -/* "_nbt.pyx":81 +/* "_nbt.pyx":83 * ELSE: * cdef bytes _name * cdef public char tagID # <<<<<<<<<<<<<< @@ -2341,9 +2265,9 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Value_5tagID___get__(struct __pyx_obj_4_nbt int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 81); + __Pyx_TraceCall("__get__", __pyx_f[0], 83); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2383,8 +2307,8 @@ static int __pyx_pf_4_nbt_9TAG_Value_5tagID_2__set__(struct __pyx_obj_4_nbt_TAG_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 81); - __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 83); + __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->tagID = __pyx_t_1; /* function exit code */ @@ -2399,7 +2323,7 @@ static int __pyx_pf_4_nbt_9TAG_Value_5tagID_2__set__(struct __pyx_obj_4_nbt_TAG_ return __pyx_r; } -/* "_nbt.pyx":109 +/* "_nbt.pyx":110 * cdef public char value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -2416,20 +2340,20 @@ static PyObject *__pyx_f_4_nbt_8TAG_Byte_save_value(struct __pyx_obj_4_nbt_TAG_B int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 109); + __Pyx_TraceCall("save_value", __pyx_f[0], 110); - /* "_nbt.pyx":110 + /* "_nbt.pyx":111 * * cdef save_value(self, buf): * save_byte(self.value, buf) # <<<<<<<<<<<<<< * * def __init__(self, char value=0, name=""): */ - __pyx_t_1 = __pyx_f_4_nbt_save_byte(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_byte(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":109 + /* "_nbt.pyx":110 * cdef public char value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -2451,7 +2375,7 @@ static PyObject *__pyx_f_4_nbt_8TAG_Byte_save_value(struct __pyx_obj_4_nbt_TAG_B return __pyx_r; } -/* "_nbt.pyx":112 +/* "_nbt.pyx":113 * save_byte(self.value, buf) * * def __init__(self, char value=0, name=""): # <<<<<<<<<<<<<< @@ -2497,7 +2421,7 @@ static int __pyx_pw_4_nbt_8TAG_Byte_1__init__(PyObject *__pyx_v_self, PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -2508,7 +2432,7 @@ static int __pyx_pw_4_nbt_8TAG_Byte_1__init__(PyObject *__pyx_v_self, PyObject * } } if (values[0]) { - __pyx_v_value = __Pyx_PyInt_As_char(values[0]); if (unlikely((__pyx_v_value == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_value = __Pyx_PyInt_As_char(values[0]); if (unlikely((__pyx_v_value == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_value = ((char)0); } @@ -2516,7 +2440,7 @@ static int __pyx_pw_4_nbt_8TAG_Byte_1__init__(PyObject *__pyx_v_self, PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Byte.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2537,9 +2461,9 @@ static int __pyx_pf_4_nbt_8TAG_Byte___init__(struct __pyx_obj_4_nbt_TAG_Byte *__ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 112); + __Pyx_TraceCall("__init__", __pyx_f[0], 113); - /* "_nbt.pyx":113 + /* "_nbt.pyx":114 * * def __init__(self, char value=0, name=""): * self.value = value # <<<<<<<<<<<<<< @@ -2548,25 +2472,25 @@ static int __pyx_pf_4_nbt_8TAG_Byte___init__(struct __pyx_obj_4_nbt_TAG_Byte *__ */ __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":114 + /* "_nbt.pyx":115 * def __init__(self, char value=0, name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_BYTE * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":115 + /* "_nbt.pyx":116 * self.value = value * self.name = name * self.tagID = TAG_BYTE # <<<<<<<<<<<<<< * - * + * cdef class TAG_Short(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_BYTE; - /* "_nbt.pyx":112 + /* "_nbt.pyx":113 * save_byte(self.value, buf) * * def __init__(self, char value=0, name=""): # <<<<<<<<<<<<<< @@ -2586,7 +2510,7 @@ static int __pyx_pf_4_nbt_8TAG_Byte___init__(struct __pyx_obj_4_nbt_TAG_Byte *__ return __pyx_r; } -/* "_nbt.pyx":107 +/* "_nbt.pyx":108 * * cdef class TAG_Byte(TAG_Value): * cdef public char value # <<<<<<<<<<<<<< @@ -2616,9 +2540,9 @@ static PyObject *__pyx_pf_4_nbt_8TAG_Byte_5value___get__(struct __pyx_obj_4_nbt_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 107); + __Pyx_TraceCall("__get__", __pyx_f[0], 108); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2658,8 +2582,8 @@ static int __pyx_pf_4_nbt_8TAG_Byte_5value_2__set__(struct __pyx_obj_4_nbt_TAG_B int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 107); - __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 108); + __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ @@ -2837,7 +2761,7 @@ static int __pyx_pf_4_nbt_9TAG_Short___init__(struct __pyx_obj_4_nbt_TAG_Short * * self.name = name * self.tagID = TAG_SHORT # <<<<<<<<<<<<<< * - * + * cdef class TAG_Int(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_SHORT; @@ -2949,7 +2873,7 @@ static int __pyx_pf_4_nbt_9TAG_Short_5value_2__set__(struct __pyx_obj_4_nbt_TAG_ return __pyx_r; } -/* "_nbt.pyx":133 +/* "_nbt.pyx":132 * cdef public int value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -2966,20 +2890,20 @@ static PyObject *__pyx_f_4_nbt_7TAG_Int_save_value(struct __pyx_obj_4_nbt_TAG_In int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 133); + __Pyx_TraceCall("save_value", __pyx_f[0], 132); - /* "_nbt.pyx":134 + /* "_nbt.pyx":133 * * cdef save_value(self, buf): * save_int(self.value, buf) # <<<<<<<<<<<<<< * * def __init__(self, int value=0, name=""): */ - __pyx_t_1 = __pyx_f_4_nbt_save_int(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_int(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":133 + /* "_nbt.pyx":132 * cdef public int value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3001,7 +2925,7 @@ static PyObject *__pyx_f_4_nbt_7TAG_Int_save_value(struct __pyx_obj_4_nbt_TAG_In return __pyx_r; } -/* "_nbt.pyx":136 +/* "_nbt.pyx":135 * save_int(self.value, buf) * * def __init__(self, int value=0, name=""): # <<<<<<<<<<<<<< @@ -3047,7 +2971,7 @@ static int __pyx_pw_4_nbt_7TAG_Int_1__init__(PyObject *__pyx_v_self, PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3058,7 +2982,7 @@ static int __pyx_pw_4_nbt_7TAG_Int_1__init__(PyObject *__pyx_v_self, PyObject *_ } } if (values[0]) { - __pyx_v_value = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_value = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_value = ((int)0); } @@ -3066,7 +2990,7 @@ static int __pyx_pw_4_nbt_7TAG_Int_1__init__(PyObject *__pyx_v_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Int.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3087,9 +3011,9 @@ static int __pyx_pf_4_nbt_7TAG_Int___init__(struct __pyx_obj_4_nbt_TAG_Int *__py int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 136); + __Pyx_TraceCall("__init__", __pyx_f[0], 135); - /* "_nbt.pyx":137 + /* "_nbt.pyx":136 * * def __init__(self, int value=0, name=""): * self.value = value # <<<<<<<<<<<<<< @@ -3098,25 +3022,25 @@ static int __pyx_pf_4_nbt_7TAG_Int___init__(struct __pyx_obj_4_nbt_TAG_Int *__py */ __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":138 + /* "_nbt.pyx":137 * def __init__(self, int value=0, name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_INT * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":139 + /* "_nbt.pyx":138 * self.value = value * self.name = name * self.tagID = TAG_INT # <<<<<<<<<<<<<< * - * + * cdef class TAG_Long(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_INT; - /* "_nbt.pyx":136 + /* "_nbt.pyx":135 * save_int(self.value, buf) * * def __init__(self, int value=0, name=""): # <<<<<<<<<<<<<< @@ -3136,7 +3060,7 @@ static int __pyx_pf_4_nbt_7TAG_Int___init__(struct __pyx_obj_4_nbt_TAG_Int *__py return __pyx_r; } -/* "_nbt.pyx":131 +/* "_nbt.pyx":130 * * cdef class TAG_Int(TAG_Value): * cdef public int value # <<<<<<<<<<<<<< @@ -3166,9 +3090,9 @@ static PyObject *__pyx_pf_4_nbt_7TAG_Int_5value___get__(struct __pyx_obj_4_nbt_T int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 131); + __Pyx_TraceCall("__get__", __pyx_f[0], 130); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3208,8 +3132,8 @@ static int __pyx_pf_4_nbt_7TAG_Int_5value_2__set__(struct __pyx_obj_4_nbt_TAG_In int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 131); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 130); + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ @@ -3224,7 +3148,7 @@ static int __pyx_pf_4_nbt_7TAG_Int_5value_2__set__(struct __pyx_obj_4_nbt_TAG_In return __pyx_r; } -/* "_nbt.pyx":145 +/* "_nbt.pyx":143 * cdef public long long value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3241,20 +3165,20 @@ static PyObject *__pyx_f_4_nbt_8TAG_Long_save_value(struct __pyx_obj_4_nbt_TAG_L int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 145); + __Pyx_TraceCall("save_value", __pyx_f[0], 143); - /* "_nbt.pyx":146 + /* "_nbt.pyx":144 * * cdef save_value(self, buf): * save_long(self.value, buf) # <<<<<<<<<<<<<< * * def __init__(self, long long value=0, name=""): */ - __pyx_t_1 = __pyx_f_4_nbt_save_long(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_long(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":145 + /* "_nbt.pyx":143 * cdef public long long value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3276,7 +3200,7 @@ static PyObject *__pyx_f_4_nbt_8TAG_Long_save_value(struct __pyx_obj_4_nbt_TAG_L return __pyx_r; } -/* "_nbt.pyx":148 +/* "_nbt.pyx":146 * save_long(self.value, buf) * * def __init__(self, long long value=0, name=""): # <<<<<<<<<<<<<< @@ -3322,7 +3246,7 @@ static int __pyx_pw_4_nbt_8TAG_Long_1__init__(PyObject *__pyx_v_self, PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3333,7 +3257,7 @@ static int __pyx_pw_4_nbt_8TAG_Long_1__init__(PyObject *__pyx_v_self, PyObject * } } if (values[0]) { - __pyx_v_value = __Pyx_PyInt_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_value == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_value = __Pyx_PyInt_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_value == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_value = ((PY_LONG_LONG)0); } @@ -3341,7 +3265,7 @@ static int __pyx_pw_4_nbt_8TAG_Long_1__init__(PyObject *__pyx_v_self, PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Long.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3362,9 +3286,9 @@ static int __pyx_pf_4_nbt_8TAG_Long___init__(struct __pyx_obj_4_nbt_TAG_Long *__ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 148); + __Pyx_TraceCall("__init__", __pyx_f[0], 146); - /* "_nbt.pyx":149 + /* "_nbt.pyx":147 * * def __init__(self, long long value=0, name=""): * self.value = value # <<<<<<<<<<<<<< @@ -3373,25 +3297,25 @@ static int __pyx_pf_4_nbt_8TAG_Long___init__(struct __pyx_obj_4_nbt_TAG_Long *__ */ __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":150 + /* "_nbt.pyx":148 * def __init__(self, long long value=0, name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_LONG * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":151 + /* "_nbt.pyx":149 * self.value = value * self.name = name * self.tagID = TAG_LONG # <<<<<<<<<<<<<< * - * + * cdef class TAG_Float(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_LONG; - /* "_nbt.pyx":148 + /* "_nbt.pyx":146 * save_long(self.value, buf) * * def __init__(self, long long value=0, name=""): # <<<<<<<<<<<<<< @@ -3411,7 +3335,7 @@ static int __pyx_pf_4_nbt_8TAG_Long___init__(struct __pyx_obj_4_nbt_TAG_Long *__ return __pyx_r; } -/* "_nbt.pyx":143 +/* "_nbt.pyx":141 * * cdef class TAG_Long(TAG_Value): * cdef public long long value # <<<<<<<<<<<<<< @@ -3441,9 +3365,9 @@ static PyObject *__pyx_pf_4_nbt_8TAG_Long_5value___get__(struct __pyx_obj_4_nbt_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 143); + __Pyx_TraceCall("__get__", __pyx_f[0], 141); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3483,8 +3407,8 @@ static int __pyx_pf_4_nbt_8TAG_Long_5value_2__set__(struct __pyx_obj_4_nbt_TAG_L int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 143); - __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 141); + __pyx_t_1 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_1 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ @@ -3499,7 +3423,7 @@ static int __pyx_pf_4_nbt_8TAG_Long_5value_2__set__(struct __pyx_obj_4_nbt_TAG_L return __pyx_r; } -/* "_nbt.pyx":157 +/* "_nbt.pyx":154 * cdef public float value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3516,20 +3440,20 @@ static PyObject *__pyx_f_4_nbt_9TAG_Float_save_value(struct __pyx_obj_4_nbt_TAG_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 157); + __Pyx_TraceCall("save_value", __pyx_f[0], 154); - /* "_nbt.pyx":158 + /* "_nbt.pyx":155 * * cdef save_value(self, buf): * save_float(self.value, buf) # <<<<<<<<<<<<<< * * def __init__(self, float value=0., name=""): */ - __pyx_t_1 = __pyx_f_4_nbt_save_float(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_float(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":157 + /* "_nbt.pyx":154 * cdef public float value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3551,7 +3475,7 @@ static PyObject *__pyx_f_4_nbt_9TAG_Float_save_value(struct __pyx_obj_4_nbt_TAG_ return __pyx_r; } -/* "_nbt.pyx":160 +/* "_nbt.pyx":157 * save_float(self.value, buf) * * def __init__(self, float value=0., name=""): # <<<<<<<<<<<<<< @@ -3597,7 +3521,7 @@ static int __pyx_pw_4_nbt_9TAG_Float_1__init__(PyObject *__pyx_v_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3608,7 +3532,7 @@ static int __pyx_pw_4_nbt_9TAG_Float_1__init__(PyObject *__pyx_v_self, PyObject } } if (values[0]) { - __pyx_v_value = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_value = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_value = ((float)0.); } @@ -3616,7 +3540,7 @@ static int __pyx_pw_4_nbt_9TAG_Float_1__init__(PyObject *__pyx_v_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Float.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3637,9 +3561,9 @@ static int __pyx_pf_4_nbt_9TAG_Float___init__(struct __pyx_obj_4_nbt_TAG_Float * int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 160); + __Pyx_TraceCall("__init__", __pyx_f[0], 157); - /* "_nbt.pyx":161 + /* "_nbt.pyx":158 * * def __init__(self, float value=0., name=""): * self.value = value # <<<<<<<<<<<<<< @@ -3648,25 +3572,25 @@ static int __pyx_pf_4_nbt_9TAG_Float___init__(struct __pyx_obj_4_nbt_TAG_Float * */ __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":162 + /* "_nbt.pyx":159 * def __init__(self, float value=0., name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_FLOAT * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":163 + /* "_nbt.pyx":160 * self.value = value * self.name = name * self.tagID = TAG_FLOAT # <<<<<<<<<<<<<< * - * + * cdef class TAG_Double(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_FLOAT; - /* "_nbt.pyx":160 + /* "_nbt.pyx":157 * save_float(self.value, buf) * * def __init__(self, float value=0., name=""): # <<<<<<<<<<<<<< @@ -3686,7 +3610,7 @@ static int __pyx_pf_4_nbt_9TAG_Float___init__(struct __pyx_obj_4_nbt_TAG_Float * return __pyx_r; } -/* "_nbt.pyx":155 +/* "_nbt.pyx":152 * * cdef class TAG_Float(TAG_Value): * cdef public float value # <<<<<<<<<<<<<< @@ -3716,9 +3640,9 @@ static PyObject *__pyx_pf_4_nbt_9TAG_Float_5value___get__(struct __pyx_obj_4_nbt int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 155); + __Pyx_TraceCall("__get__", __pyx_f[0], 152); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3758,8 +3682,8 @@ static int __pyx_pf_4_nbt_9TAG_Float_5value_2__set__(struct __pyx_obj_4_nbt_TAG_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 155); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 152); + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ @@ -3774,7 +3698,7 @@ static int __pyx_pf_4_nbt_9TAG_Float_5value_2__set__(struct __pyx_obj_4_nbt_TAG_ return __pyx_r; } -/* "_nbt.pyx":169 +/* "_nbt.pyx":165 * cdef public double value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3791,20 +3715,20 @@ static PyObject *__pyx_f_4_nbt_10TAG_Double_save_value(struct __pyx_obj_4_nbt_TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 169); + __Pyx_TraceCall("save_value", __pyx_f[0], 165); - /* "_nbt.pyx":170 + /* "_nbt.pyx":166 * * cdef save_value(self, buf): * save_double(self.value, buf) # <<<<<<<<<<<<<< * * def __init__(self, double value=0., name=""): */ - __pyx_t_1 = __pyx_f_4_nbt_save_double(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_double(__pyx_v_self->value, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":169 + /* "_nbt.pyx":165 * cdef public double value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -3826,7 +3750,7 @@ static PyObject *__pyx_f_4_nbt_10TAG_Double_save_value(struct __pyx_obj_4_nbt_TA return __pyx_r; } -/* "_nbt.pyx":172 +/* "_nbt.pyx":168 * save_double(self.value, buf) * * def __init__(self, double value=0., name=""): # <<<<<<<<<<<<<< @@ -3872,7 +3796,7 @@ static int __pyx_pw_4_nbt_10TAG_Double_1__init__(PyObject *__pyx_v_self, PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3883,7 +3807,7 @@ static int __pyx_pw_4_nbt_10TAG_Double_1__init__(PyObject *__pyx_v_self, PyObjec } } if (values[0]) { - __pyx_v_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_value = ((double)0.); } @@ -3891,7 +3815,7 @@ static int __pyx_pw_4_nbt_10TAG_Double_1__init__(PyObject *__pyx_v_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Double.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3912,9 +3836,9 @@ static int __pyx_pf_4_nbt_10TAG_Double___init__(struct __pyx_obj_4_nbt_TAG_Doubl int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 172); + __Pyx_TraceCall("__init__", __pyx_f[0], 168); - /* "_nbt.pyx":173 + /* "_nbt.pyx":169 * * def __init__(self, double value=0., name=""): * self.value = value # <<<<<<<<<<<<<< @@ -3923,25 +3847,25 @@ static int __pyx_pf_4_nbt_10TAG_Double___init__(struct __pyx_obj_4_nbt_TAG_Doubl */ __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":174 + /* "_nbt.pyx":170 * def __init__(self, double value=0., name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_DOUBLE * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":175 + /* "_nbt.pyx":171 * self.value = value * self.name = name * self.tagID = TAG_DOUBLE # <<<<<<<<<<<<<< * - * + * cdef class TAG_Byte_Array(TAG_Value): */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_DOUBLE; - /* "_nbt.pyx":172 + /* "_nbt.pyx":168 * save_double(self.value, buf) * * def __init__(self, double value=0., name=""): # <<<<<<<<<<<<<< @@ -3961,7 +3885,7 @@ static int __pyx_pf_4_nbt_10TAG_Double___init__(struct __pyx_obj_4_nbt_TAG_Doubl return __pyx_r; } -/* "_nbt.pyx":167 +/* "_nbt.pyx":163 * * cdef class TAG_Double(TAG_Value): * cdef public double value # <<<<<<<<<<<<<< @@ -3991,9 +3915,9 @@ static PyObject *__pyx_pf_4_nbt_10TAG_Double_5value___get__(struct __pyx_obj_4_n int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 167); + __Pyx_TraceCall("__get__", __pyx_f[0], 163); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4033,8 +3957,8 @@ static int __pyx_pf_4_nbt_10TAG_Double_5value_2__set__(struct __pyx_obj_4_nbt_TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 167); - __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 163); + __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->value = __pyx_t_1; /* function exit code */ @@ -4049,7 +3973,7 @@ static int __pyx_pf_4_nbt_10TAG_Double_5value_2__set__(struct __pyx_obj_4_nbt_TA return __pyx_r; } -/* "_nbt.pyx":182 +/* "_nbt.pyx":177 * dtype = numpy.dtype('u1') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -4096,7 +4020,7 @@ static int __pyx_pw_4_nbt_14TAG_Byte_Array_1__init__(PyObject *__pyx_v_self, PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4111,7 +4035,7 @@ static int __pyx_pw_4_nbt_14TAG_Byte_Array_1__init__(PyObject *__pyx_v_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Byte_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4132,15 +4056,18 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 182); + __Pyx_TraceCall("__init__", __pyx_f[0], 177); __Pyx_INCREF(__pyx_v_value); - /* "_nbt.pyx":183 + /* "_nbt.pyx":178 * * def __init__(self, value=None, name=""): * if value is None: # <<<<<<<<<<<<<< @@ -4151,36 +4078,51 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":184 + /* "_nbt.pyx":179 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + } __Pyx_INCREF(__pyx_tuple__2); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__2); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":186 + /* "_nbt.pyx":181 * value = zeros((0,), self.dtype) * * self.value = value # <<<<<<<<<<<<<< @@ -4193,16 +4135,16 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B __Pyx_DECREF(__pyx_v_self->value); __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":187 + /* "_nbt.pyx":182 * * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_BYTE_ARRAY * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":188 + /* "_nbt.pyx":183 * self.value = value * self.name = name * self.tagID = TAG_BYTE_ARRAY # <<<<<<<<<<<<<< @@ -4211,7 +4153,7 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_BYTE_ARRAY; - /* "_nbt.pyx":182 + /* "_nbt.pyx":177 * dtype = numpy.dtype('u1') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -4226,6 +4168,8 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_nbt.TAG_Byte_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -4235,7 +4179,7 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array___init__(struct __pyx_obj_4_nbt_TAG_B return __pyx_r; } -/* "_nbt.pyx":190 +/* "_nbt.pyx":185 * self.tagID = TAG_BYTE_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -4253,9 +4197,9 @@ static PyObject *__pyx_f_4_nbt_14TAG_Byte_Array_save_value(struct __pyx_obj_4_nb int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 190); + __Pyx_TraceCall("save_value", __pyx_f[0], 185); - /* "_nbt.pyx":191 + /* "_nbt.pyx":186 * * cdef save_value(self, buf): * save_array(self.value, buf, 1) # <<<<<<<<<<<<<< @@ -4264,12 +4208,12 @@ static PyObject *__pyx_f_4_nbt_14TAG_Byte_Array_save_value(struct __pyx_obj_4_nb */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":190 + /* "_nbt.pyx":185 * self.tagID = TAG_BYTE_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -4292,7 +4236,7 @@ static PyObject *__pyx_f_4_nbt_14TAG_Byte_Array_save_value(struct __pyx_obj_4_nb return __pyx_r; } -/* "_nbt.pyx":193 +/* "_nbt.pyx":188 * save_array(self.value, buf, 1) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4326,30 +4270,30 @@ static PyObject *__pyx_pf_4_nbt_14TAG_Byte_Array_2__repr__(struct __pyx_obj_4_nb int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 193); + __Pyx_TraceCall("__repr__", __pyx_f[0], 188); - /* "_nbt.pyx":194 + /* "_nbt.pyx":189 * * def __repr__(self): * return "<%s name=%s length=%d>" % (self.__class__.__name__, self.name, len(self.value)) # <<<<<<<<<<<<<< * - * + * cdef class TAG_Int_Array(TAG_Value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -4360,14 +4304,14 @@ static PyObject *__pyx_pf_4_nbt_14TAG_Byte_Array_2__repr__(struct __pyx_obj_4_nb __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_length_d, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_length_d, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_nbt.pyx":193 + /* "_nbt.pyx":188 * save_array(self.value, buf, 1) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4390,7 +4334,7 @@ static PyObject *__pyx_pf_4_nbt_14TAG_Byte_Array_2__repr__(struct __pyx_obj_4_nb return __pyx_r; } -/* "_nbt.pyx":179 +/* "_nbt.pyx":174 * * cdef class TAG_Byte_Array(TAG_Value): * cdef public object value # <<<<<<<<<<<<<< @@ -4416,7 +4360,7 @@ static PyObject *__pyx_pf_4_nbt_14TAG_Byte_Array_5value___get__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 179); + __Pyx_TraceCall("__get__", __pyx_f[0], 174); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; @@ -4448,7 +4392,7 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array_5value_2__set__(struct __pyx_obj_4_nb __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 179); + __Pyx_TraceCall("__set__", __pyx_f[0], 174); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->value); @@ -4480,7 +4424,7 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array_5value_4__del__(struct __pyx_obj_4_nb __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 179); + __Pyx_TraceCall("__del__", __pyx_f[0], 174); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->value); @@ -4494,7 +4438,7 @@ static int __pyx_pf_4_nbt_14TAG_Byte_Array_5value_4__del__(struct __pyx_obj_4_nb return __pyx_r; } -/* "_nbt.pyx":201 +/* "_nbt.pyx":195 * dtype = numpy.dtype('>u4') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -4541,7 +4485,7 @@ static int __pyx_pw_4_nbt_13TAG_Int_Array_1__init__(PyObject *__pyx_v_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4556,7 +4500,7 @@ static int __pyx_pw_4_nbt_13TAG_Int_Array_1__init__(PyObject *__pyx_v_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Int_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4577,15 +4521,18 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 201); + __Pyx_TraceCall("__init__", __pyx_f[0], 195); __Pyx_INCREF(__pyx_v_value); - /* "_nbt.pyx":202 + /* "_nbt.pyx":196 * * def __init__(self, value=None, name=""): * if value is None: # <<<<<<<<<<<<<< @@ -4596,36 +4543,51 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":203 + /* "_nbt.pyx":197 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_tuple__3); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_tuple__3); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":205 + /* "_nbt.pyx":199 * value = zeros((0,), self.dtype) * * self.value = value # <<<<<<<<<<<<<< @@ -4638,16 +4600,16 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In __Pyx_DECREF(__pyx_v_self->value); __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":206 + /* "_nbt.pyx":200 * * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_INT_ARRAY * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":207 + /* "_nbt.pyx":201 * self.value = value * self.name = name * self.tagID = TAG_INT_ARRAY # <<<<<<<<<<<<<< @@ -4656,7 +4618,7 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_INT_ARRAY; - /* "_nbt.pyx":201 + /* "_nbt.pyx":195 * dtype = numpy.dtype('>u4') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -4671,6 +4633,8 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_nbt.TAG_Int_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -4680,7 +4644,7 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array___init__(struct __pyx_obj_4_nbt_TAG_In return __pyx_r; } -/* "_nbt.pyx":209 +/* "_nbt.pyx":203 * self.tagID = TAG_INT_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -4698,23 +4662,23 @@ static PyObject *__pyx_f_4_nbt_13TAG_Int_Array_save_value(struct __pyx_obj_4_nbt int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 209); + __Pyx_TraceCall("save_value", __pyx_f[0], 203); - /* "_nbt.pyx":210 + /* "_nbt.pyx":204 * * cdef save_value(self, buf): * save_array(self.value, buf, 4) # <<<<<<<<<<<<<< * - * + * cdef class TAG_Short_Array(TAG_Value): */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":209 + /* "_nbt.pyx":203 * self.tagID = TAG_INT_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -4737,7 +4701,7 @@ static PyObject *__pyx_f_4_nbt_13TAG_Int_Array_save_value(struct __pyx_obj_4_nbt return __pyx_r; } -/* "_nbt.pyx":198 +/* "_nbt.pyx":192 * * cdef class TAG_Int_Array(TAG_Value): * cdef public object value # <<<<<<<<<<<<<< @@ -4763,7 +4727,7 @@ static PyObject *__pyx_pf_4_nbt_13TAG_Int_Array_5value___get__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 198); + __Pyx_TraceCall("__get__", __pyx_f[0], 192); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; @@ -4795,7 +4759,7 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array_5value_2__set__(struct __pyx_obj_4_nbt __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 198); + __Pyx_TraceCall("__set__", __pyx_f[0], 192); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->value); @@ -4827,7 +4791,7 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array_5value_4__del__(struct __pyx_obj_4_nbt __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 198); + __Pyx_TraceCall("__del__", __pyx_f[0], 192); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->value); @@ -4841,7 +4805,7 @@ static int __pyx_pf_4_nbt_13TAG_Int_Array_5value_4__del__(struct __pyx_obj_4_nbt return __pyx_r; } -/* "_nbt.pyx":217 +/* "_nbt.pyx":210 * dtype = numpy.dtype('>u2') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -4888,7 +4852,7 @@ static int __pyx_pw_4_nbt_15TAG_Short_Array_1__init__(PyObject *__pyx_v_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4903,7 +4867,7 @@ static int __pyx_pw_4_nbt_15TAG_Short_Array_1__init__(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_Short_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4924,15 +4888,18 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 217); + __Pyx_TraceCall("__init__", __pyx_f[0], 210); __Pyx_INCREF(__pyx_v_value); - /* "_nbt.pyx":218 + /* "_nbt.pyx":211 * * def __init__(self, value=None, name=""): * if value is None: # <<<<<<<<<<<<<< @@ -4943,36 +4910,51 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":219 + /* "_nbt.pyx":212 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_7 = 1; + } + } + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + } __Pyx_INCREF(__pyx_tuple__4); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_tuple__4); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":221 + /* "_nbt.pyx":214 * value = zeros((0,), self.dtype) * * self.value = value # <<<<<<<<<<<<<< @@ -4985,16 +4967,16 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ __Pyx_DECREF(__pyx_v_self->value); __pyx_v_self->value = __pyx_v_value; - /* "_nbt.pyx":222 + /* "_nbt.pyx":215 * * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_SHORT_ARRAY * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":223 + /* "_nbt.pyx":216 * self.value = value * self.name = name * self.tagID = TAG_SHORT_ARRAY # <<<<<<<<<<<<<< @@ -5003,7 +4985,7 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_SHORT_ARRAY; - /* "_nbt.pyx":217 + /* "_nbt.pyx":210 * dtype = numpy.dtype('>u2') * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -5018,6 +5000,8 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_nbt.TAG_Short_Array.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -5027,7 +5011,7 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array___init__(struct __pyx_obj_4_nbt_TAG_ return __pyx_r; } -/* "_nbt.pyx":225 +/* "_nbt.pyx":218 * self.tagID = TAG_SHORT_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -5045,23 +5029,23 @@ static PyObject *__pyx_f_4_nbt_15TAG_Short_Array_save_value(struct __pyx_obj_4_n int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 225); + __Pyx_TraceCall("save_value", __pyx_f[0], 218); - /* "_nbt.pyx":226 + /* "_nbt.pyx":219 * * cdef save_value(self, buf): * save_array(self.value, buf, 2) # <<<<<<<<<<<<<< * - * + * cdef class TAG_String(TAG_Value): */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_array(__pyx_t_1, __pyx_v_buf, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":225 + /* "_nbt.pyx":218 * self.tagID = TAG_SHORT_ARRAY * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -5084,7 +5068,7 @@ static PyObject *__pyx_f_4_nbt_15TAG_Short_Array_save_value(struct __pyx_obj_4_n return __pyx_r; } -/* "_nbt.pyx":214 +/* "_nbt.pyx":207 * * cdef class TAG_Short_Array(TAG_Value): * cdef public object value # <<<<<<<<<<<<<< @@ -5110,7 +5094,7 @@ static PyObject *__pyx_pf_4_nbt_15TAG_Short_Array_5value___get__(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 214); + __Pyx_TraceCall("__get__", __pyx_f[0], 207); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; @@ -5142,7 +5126,7 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array_5value_2__set__(struct __pyx_obj_4_n __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 214); + __Pyx_TraceCall("__set__", __pyx_f[0], 207); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->value); @@ -5174,7 +5158,7 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array_5value_4__del__(struct __pyx_obj_4_n __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 214); + __Pyx_TraceCall("__del__", __pyx_f[0], 207); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->value); @@ -5188,7 +5172,7 @@ static int __pyx_pf_4_nbt_15TAG_Short_Array_5value_4__del__(struct __pyx_obj_4_n return __pyx_r; } -/* "_nbt.pyx":232 +/* "_nbt.pyx":224 * cdef unicode _value * * def __init__(self, value="", name=""): # <<<<<<<<<<<<<< @@ -5235,7 +5219,7 @@ static int __pyx_pw_4_nbt_10TAG_String_1__init__(PyObject *__pyx_v_self, PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5250,7 +5234,7 @@ static int __pyx_pw_4_nbt_10TAG_String_1__init__(PyObject *__pyx_v_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.TAG_String.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5271,27 +5255,27 @@ static int __pyx_pf_4_nbt_10TAG_String___init__(struct __pyx_obj_4_nbt_TAG_Strin int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 232); + __Pyx_TraceCall("__init__", __pyx_f[0], 224); - /* "_nbt.pyx":233 + /* "_nbt.pyx":225 * * def __init__(self, value="", name=""): * self.value = value # <<<<<<<<<<<<<< * self.name = name * self.tagID = TAG_STRING */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":234 + /* "_nbt.pyx":226 * def __init__(self, value="", name=""): * self.value = value * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_STRING * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":235 + /* "_nbt.pyx":227 * self.value = value * self.name = name * self.tagID = TAG_STRING # <<<<<<<<<<<<<< @@ -5300,7 +5284,7 @@ static int __pyx_pf_4_nbt_10TAG_String___init__(struct __pyx_obj_4_nbt_TAG_Strin */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_STRING; - /* "_nbt.pyx":232 + /* "_nbt.pyx":224 * cdef unicode _value * * def __init__(self, value="", name=""): # <<<<<<<<<<<<<< @@ -5320,7 +5304,7 @@ static int __pyx_pf_4_nbt_10TAG_String___init__(struct __pyx_obj_4_nbt_TAG_Strin return __pyx_r; } -/* "_nbt.pyx":238 +/* "_nbt.pyx":230 * * property value: * def __get__(self): # <<<<<<<<<<<<<< @@ -5346,9 +5330,9 @@ static PyObject *__pyx_pf_4_nbt_10TAG_String_5value___get__(struct __pyx_obj_4_n __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 238); + __Pyx_TraceCall("__get__", __pyx_f[0], 230); - /* "_nbt.pyx":239 + /* "_nbt.pyx":231 * property value: * def __get__(self): * return self._value # <<<<<<<<<<<<<< @@ -5360,7 +5344,7 @@ static PyObject *__pyx_pf_4_nbt_10TAG_String_5value___get__(struct __pyx_obj_4_n __pyx_r = __pyx_v_self->_value; goto __pyx_L0; - /* "_nbt.pyx":238 + /* "_nbt.pyx":230 * * property value: * def __get__(self): # <<<<<<<<<<<<<< @@ -5376,7 +5360,7 @@ static PyObject *__pyx_pf_4_nbt_10TAG_String_5value___get__(struct __pyx_obj_4_n return __pyx_r; } -/* "_nbt.pyx":241 +/* "_nbt.pyx":233 * return self._value * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -5410,10 +5394,10 @@ static int __pyx_pf_4_nbt_10TAG_String_5value_2__set__(struct __pyx_obj_4_nbt_TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 241); + __Pyx_TraceCall("__set__", __pyx_f[0], 233); __Pyx_INCREF(__pyx_v_value); - /* "_nbt.pyx":242 + /* "_nbt.pyx":234 * * def __set__(self, value): * if isinstance(value, str): # <<<<<<<<<<<<<< @@ -5424,16 +5408,16 @@ static int __pyx_pf_4_nbt_10TAG_String_5value_2__set__(struct __pyx_obj_4_nbt_TA __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":243 + /* "_nbt.pyx":235 * def __set__(self, value): * if isinstance(value, str): * value = PyUnicode_DecodeUTF8(value, len(value), "strict") # <<<<<<<<<<<<<< * self._value = value * */ - __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = PyUnicode_DecodeUTF8(__pyx_t_3, __pyx_t_4, __pyx_k_strict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyUnicode_DecodeUTF8(__pyx_t_3, __pyx_t_4, __pyx_k_strict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; @@ -5441,14 +5425,14 @@ static int __pyx_pf_4_nbt_10TAG_String_5value_2__set__(struct __pyx_obj_4_nbt_TA } __pyx_L3:; - /* "_nbt.pyx":244 + /* "_nbt.pyx":236 * if isinstance(value, str): * value = PyUnicode_DecodeUTF8(value, len(value), "strict") * self._value = value # <<<<<<<<<<<<<< * * cdef save_value(self, buf): */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_v_value; __Pyx_INCREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -5457,7 +5441,7 @@ static int __pyx_pf_4_nbt_10TAG_String_5value_2__set__(struct __pyx_obj_4_nbt_TA __pyx_v_self->_value = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "_nbt.pyx":241 + /* "_nbt.pyx":233 * return self._value * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -5479,7 +5463,7 @@ static int __pyx_pf_4_nbt_10TAG_String_5value_2__set__(struct __pyx_obj_4_nbt_TA return __pyx_r; } -/* "_nbt.pyx":246 +/* "_nbt.pyx":238 * self._value = value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -5497,28 +5481,28 @@ static PyObject *__pyx_f_4_nbt_10TAG_String_save_value(struct __pyx_obj_4_nbt_TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 246); + __Pyx_TraceCall("save_value", __pyx_f[0], 238); - /* "_nbt.pyx":247 + /* "_nbt.pyx":239 * * cdef save_value(self, buf): * save_string(self._value.encode('utf-8'), buf) # <<<<<<<<<<<<<< * - * + * cdef class _TAG_List(TAG_Value): */ if (unlikely(__pyx_v_self->_value == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_self->_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_self->_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __pyx_f_4_nbt_save_string(((PyObject*)__pyx_t_1), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_string(((PyObject*)__pyx_t_1), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":246 + /* "_nbt.pyx":238 * self._value = value * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -5541,7 +5525,7 @@ static PyObject *__pyx_f_4_nbt_10TAG_String_save_value(struct __pyx_obj_4_nbt_TA return __pyx_r; } -/* "_nbt.pyx":254 +/* "_nbt.pyx":245 * cdef public char list_type * * def __init__(self, value=None, name="", list_type=TAG_BYTE): # <<<<<<<<<<<<<< @@ -5596,7 +5580,7 @@ static int __pyx_pw_4_nbt_9_TAG_List_1__init__(PyObject *__pyx_v_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5613,7 +5597,7 @@ static int __pyx_pw_4_nbt_9_TAG_List_1__init__(PyObject *__pyx_v_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt._TAG_List.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5638,21 +5622,22 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * PyObject *(*__pyx_t_6)(PyObject *); 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_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 254); + __Pyx_TraceCall("__init__", __pyx_f[0], 245); - /* "_nbt.pyx":255 + /* "_nbt.pyx":246 * * def __init__(self, value=None, name="", list_type=TAG_BYTE): * self.value = [] # <<<<<<<<<<<<<< * self.name = name * self.list_type = list_type */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->value); @@ -5660,26 +5645,26 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * __pyx_v_self->value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":256 + /* "_nbt.pyx":247 * def __init__(self, value=None, name="", list_type=TAG_BYTE): * self.value = [] * self.name = name # <<<<<<<<<<<<<< * self.list_type = list_type * self.tagID = TAG_LIST */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":257 + /* "_nbt.pyx":248 * self.value = [] * self.name = name * self.list_type = list_type # <<<<<<<<<<<<<< * self.tagID = TAG_LIST * if value: */ - __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_v_list_type); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_v_list_type); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->list_type = __pyx_t_2; - /* "_nbt.pyx":258 + /* "_nbt.pyx":249 * self.name = name * self.list_type = list_type * self.tagID = TAG_LIST # <<<<<<<<<<<<<< @@ -5688,69 +5673,71 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_LIST; - /* "_nbt.pyx":259 + /* "_nbt.pyx":250 * self.list_type = list_type * self.tagID = TAG_LIST * if value: # <<<<<<<<<<<<<< * self.list_type = value[0].tagID * for tag in value: */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - /* "_nbt.pyx":260 + /* "_nbt.pyx":251 * self.tagID = TAG_LIST * if value: * self.list_type = value[0].tagID # <<<<<<<<<<<<<< * for tag in value: * self.check_tag(tag) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tagID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tagID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_t_4); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_t_4); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->list_type = __pyx_t_2; - /* "_nbt.pyx":261 + /* "_nbt.pyx":252 * if value: * self.list_type = value[0].tagID * for tag in value: # <<<<<<<<<<<<<< * self.check_tag(tag) * self.value = list(value) */ - if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) { + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) { - if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) { - if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_1 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -5759,53 +5746,77 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":262 + /* "_nbt.pyx":253 * self.list_type = value[0].tagID * for tag in value: * self.check_tag(tag) # <<<<<<<<<<<<<< * self.value = list(value) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_tag); - __Pyx_GIVEREF(__pyx_v_tag); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + if (!__pyx_t_8) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_v_tag); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_tag); + __Pyx_GIVEREF(__pyx_v_tag); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_nbt.pyx":252 + * if value: + * self.list_type = value[0].tagID + * for tag in value: # <<<<<<<<<<<<<< + * self.check_tag(tag) + * self.value = list(value) + */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":263 + /* "_nbt.pyx":254 * for tag in value: * self.check_tag(tag) * self.value = list(value) # <<<<<<<<<<<<<< * - * + * def __repr__(self): */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GIVEREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->value); __Pyx_DECREF(__pyx_v_self->value); - __pyx_v_self->value = ((PyObject*)__pyx_t_8); - __pyx_t_8 = 0; + __pyx_v_self->value = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":254 + /* "_nbt.pyx":245 * cdef public char list_type * * def __init__(self, value=None, name="", list_type=TAG_BYTE): # <<<<<<<<<<<<<< @@ -5821,6 +5832,7 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("_nbt._TAG_List.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -5830,8 +5842,8 @@ static int __pyx_pf_4_nbt_9_TAG_List___init__(struct __pyx_obj_4_nbt__TAG_List * return __pyx_r; } -/* "_nbt.pyx":266 - * +/* "_nbt.pyx":256 + * self.value = list(value) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, @@ -5865,9 +5877,9 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_2__repr__(struct __pyx_obj_4_nbt__TAG int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 266); + __Pyx_TraceCall("__repr__", __pyx_f[0], 256); - /* "_nbt.pyx":267 + /* "_nbt.pyx":257 * * def __repr__(self): * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, # <<<<<<<<<<<<<< @@ -5875,46 +5887,46 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_2__repr__(struct __pyx_obj_4_nbt__TAG * len(self)) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "_nbt.pyx":268 + /* "_nbt.pyx":258 * def __repr__(self): * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, * tag_classes[self.list_type], # <<<<<<<<<<<<<< * len(self)) * */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tag_classes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tag_classes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_self->list_type, char, 1, __Pyx_PyInt_From_char, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_self->list_type, char, 1, __Pyx_PyInt_From_char, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":269 + /* "_nbt.pyx":259 * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, * tag_classes[self.list_type], * len(self)) # <<<<<<<<<<<<<< * * def check_tag(self, value): */ - __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "_nbt.pyx":267 + /* "_nbt.pyx":257 * * def __repr__(self): * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, # <<<<<<<<<<<<<< * tag_classes[self.list_type], * len(self)) */ - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -5928,15 +5940,15 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_2__repr__(struct __pyx_obj_4_nbt__TAG __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_list_type_r_length_d, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_list_type_r_length_d, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_nbt.pyx":266 - * + /* "_nbt.pyx":256 + * self.value = list(value) * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s name='%s' list_type=%r length=%d>" % (self.__class__.__name__, self.name, @@ -5959,7 +5971,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_2__repr__(struct __pyx_obj_4_nbt__TAG return __pyx_r; } -/* "_nbt.pyx":271 +/* "_nbt.pyx":261 * len(self)) * * def check_tag(self, value): # <<<<<<<<<<<<<< @@ -5992,41 +6004,41 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_4check_tag(struct __pyx_obj_4_nbt__TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("check_tag", 0); - __Pyx_TraceCall("check_tag", __pyx_f[0], 271); + __Pyx_TraceCall("check_tag", __pyx_f[0], 261); - /* "_nbt.pyx":272 + /* "_nbt.pyx":262 * * def check_tag(self, value): * if value.tagID != self.list_type: # <<<<<<<<<<<<<< * raise TypeError("Invalid type %s for TAG_List(%s)" % (value.__class__, tag_classes[self.list_type])) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_char(__pyx_v_self->list_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_char(__pyx_v_self->list_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "_nbt.pyx":273 + /* "_nbt.pyx":263 * def check_tag(self, value): * if value.tagID != self.list_type: * raise TypeError("Invalid type %s for TAG_List(%s)" % (value.__class__, tag_classes[self.list_type])) # <<<<<<<<<<<<<< * * # --- collection methods --- */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tag_classes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tag_classes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_self->list_type, char, 1, __Pyx_PyInt_From_char, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_self->list_type, char, 1, __Pyx_PyInt_From_char, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -6034,23 +6046,23 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_4check_tag(struct __pyx_obj_4_nbt__TA __Pyx_GIVEREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_type_s_for_TAG_List_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_type_s_for_TAG_List_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":271 + /* "_nbt.pyx":261 * len(self)) * * def check_tag(self, value): # <<<<<<<<<<<<<< @@ -6074,7 +6086,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_4check_tag(struct __pyx_obj_4_nbt__TA return __pyx_r; } -/* "_nbt.pyx":276 +/* "_nbt.pyx":266 * * # --- collection methods --- * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6104,9 +6116,9 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_6__getitem__(struct __pyx_obj_4_nbt__ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 276); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 266); - /* "_nbt.pyx":277 + /* "_nbt.pyx":267 * # --- collection methods --- * def __getitem__(self, index): * return self.value[index] # <<<<<<<<<<<<<< @@ -6116,15 +6128,15 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_6__getitem__(struct __pyx_obj_4_nbt__ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->value == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_v_self->value, __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_self->value, __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_nbt.pyx":276 + /* "_nbt.pyx":266 * * # --- collection methods --- * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6144,7 +6156,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_6__getitem__(struct __pyx_obj_4_nbt__ return __pyx_r; } -/* "_nbt.pyx":279 +/* "_nbt.pyx":269 * return self.value[index] * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -6177,14 +6189,15 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li PyObject *__pyx_t_6 = NULL; 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_TraceDeclarations __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 279); + __Pyx_TraceCall("__setitem__", __pyx_f[0], 269); - /* "_nbt.pyx":280 + /* "_nbt.pyx":270 * * def __setitem__(self, index, value): * if isinstance(index, slice): # <<<<<<<<<<<<<< @@ -6195,43 +6208,45 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_nbt.pyx":281 + /* "_nbt.pyx":271 * def __setitem__(self, index, value): * if isinstance(index, slice): * for tag in value: # <<<<<<<<<<<<<< * self.check_tag(tag) * else: */ - if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) { + if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) { __pyx_t_3 = __pyx_v_value; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -6240,54 +6255,94 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_6); __pyx_t_6 = 0; - /* "_nbt.pyx":282 + /* "_nbt.pyx":272 * if isinstance(index, slice): * for tag in value: * self.check_tag(tag) # <<<<<<<<<<<<<< * else: * self.check_tag(value) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_tag); - __Pyx_GIVEREF(__pyx_v_tag); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + if (!__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_tag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_v_tag); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_tag); + __Pyx_GIVEREF(__pyx_v_tag); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_nbt.pyx":271 + * def __setitem__(self, index, value): + * if isinstance(index, slice): + * for tag in value: # <<<<<<<<<<<<<< + * self.check_tag(tag) + * else: + */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } /*else*/ { - /* "_nbt.pyx":284 + /* "_nbt.pyx":274 * self.check_tag(tag) * else: * self.check_tag(value) # <<<<<<<<<<<<<< * self.value[index] = value * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + } + } + if (!__pyx_t_7) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_v_value); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L3:; - /* "_nbt.pyx":285 + /* "_nbt.pyx":275 * else: * self.check_tag(value) * self.value[index] = value # <<<<<<<<<<<<<< @@ -6296,11 +6351,11 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li */ if (unlikely(__pyx_v_self->value == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(PyObject_SetItem(__pyx_v_self->value, __pyx_v_index, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_self->value, __pyx_v_index, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":279 + /* "_nbt.pyx":269 * return self.value[index] * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -6316,6 +6371,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("_nbt._TAG_List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -6325,7 +6381,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_8__setitem__(struct __pyx_obj_4_nbt__TAG_Li return __pyx_r; } -/* "_nbt.pyx":287 +/* "_nbt.pyx":277 * self.value[index] = value * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6356,9 +6412,9 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_10__iter__(struct __pyx_obj_4_nbt__TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - __Pyx_TraceCall("__iter__", __pyx_f[0], 287); + __Pyx_TraceCall("__iter__", __pyx_f[0], 277); - /* "_nbt.pyx":288 + /* "_nbt.pyx":278 * * def __iter__(self): * return iter(self.value) # <<<<<<<<<<<<<< @@ -6368,14 +6424,14 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_10__iter__(struct __pyx_obj_4_nbt__TA __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_nbt.pyx":287 + /* "_nbt.pyx":277 * self.value[index] = value * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6396,7 +6452,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_10__iter__(struct __pyx_obj_4_nbt__TA return __pyx_r; } -/* "_nbt.pyx":290 +/* "_nbt.pyx":280 * return iter(self.value) * * def __len__(self): # <<<<<<<<<<<<<< @@ -6427,9 +6483,9 @@ static Py_ssize_t __pyx_pf_4_nbt_9_TAG_List_12__len__(struct __pyx_obj_4_nbt__TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 290); + __Pyx_TraceCall("__len__", __pyx_f[0], 280); - /* "_nbt.pyx":291 + /* "_nbt.pyx":281 * * def __len__(self): * return len(self.value) # <<<<<<<<<<<<<< @@ -6440,14 +6496,14 @@ static Py_ssize_t __pyx_pf_4_nbt_9_TAG_List_12__len__(struct __pyx_obj_4_nbt__TA __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_nbt.pyx":290 + /* "_nbt.pyx":280 * return iter(self.value) * * def __len__(self): # <<<<<<<<<<<<<< @@ -6466,7 +6522,7 @@ static Py_ssize_t __pyx_pf_4_nbt_9_TAG_List_12__len__(struct __pyx_obj_4_nbt__TA return __pyx_r; } -/* "_nbt.pyx":293 +/* "_nbt.pyx":283 * return len(self.value) * * def insert(self, index, tag): # <<<<<<<<<<<<<< @@ -6505,11 +6561,11 @@ static PyObject *__pyx_pw_4_nbt_9_TAG_List_15insert(PyObject *__pyx_v_self, PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6522,7 +6578,7 @@ static PyObject *__pyx_pw_4_nbt_9_TAG_List_15insert(PyObject *__pyx_v_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt._TAG_List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6544,15 +6600,16 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_14insert(struct __pyx_obj_4_nbt__TAG_ char __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("insert", 0); - __Pyx_TraceCall("insert", __pyx_f[0], 293); + __Pyx_TraceCall("insert", __pyx_f[0], 283); - /* "_nbt.pyx":294 + /* "_nbt.pyx":284 * * def insert(self, index, tag): * if len(self.value) == 0: # <<<<<<<<<<<<<< @@ -6563,52 +6620,68 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_14insert(struct __pyx_obj_4_nbt__TAG_ __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_3) { - /* "_nbt.pyx":295 + /* "_nbt.pyx":285 * def insert(self, index, tag): * if len(self.value) == 0: * self.list_type = tag.tagID # <<<<<<<<<<<<<< * else: * self.check_tag(tag) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tag, __pyx_n_s_tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tag, __pyx_n_s_tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_char(__pyx_t_1); if (unlikely((__pyx_t_4 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_char(__pyx_t_1); if (unlikely((__pyx_t_4 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->list_type = __pyx_t_4; goto __pyx_L3; } /*else*/ { - /* "_nbt.pyx":297 + /* "_nbt.pyx":287 * self.list_type = tag.tagID * else: * self.check_tag(tag) # <<<<<<<<<<<<<< * * self.value.insert(index, tag) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_tag); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tag); - __Pyx_GIVEREF(__pyx_v_tag); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + if (!__pyx_t_6) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_tag); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_tag); + __Pyx_GIVEREF(__pyx_v_tag); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "_nbt.pyx":299 + /* "_nbt.pyx":289 * self.check_tag(tag) * * self.value.insert(index, tag) # <<<<<<<<<<<<<< @@ -6617,12 +6690,12 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_14insert(struct __pyx_obj_4_nbt__TAG_ */ if (unlikely(__pyx_v_self->value == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "insert"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = PyList_Insert(__pyx_v_self->value, __pyx_t_2, __pyx_v_tag); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyList_Insert(__pyx_v_self->value, __pyx_t_2, __pyx_v_tag); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":293 + /* "_nbt.pyx":283 * return len(self.value) * * def insert(self, index, tag): # <<<<<<<<<<<<<< @@ -6637,6 +6710,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_14insert(struct __pyx_obj_4_nbt__TAG_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_nbt._TAG_List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -6646,7 +6720,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_14insert(struct __pyx_obj_4_nbt__TAG_ return __pyx_r; } -/* "_nbt.pyx":301 +/* "_nbt.pyx":291 * self.value.insert(index, tag) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -6675,9 +6749,9 @@ static int __pyx_pf_4_nbt_9_TAG_List_16__delitem__(struct __pyx_obj_4_nbt__TAG_L int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[0], 301); + __Pyx_TraceCall("__delitem__", __pyx_f[0], 291); - /* "_nbt.pyx":302 + /* "_nbt.pyx":292 * * def __delitem__(self, key): * del self.value[key] # <<<<<<<<<<<<<< @@ -6686,11 +6760,11 @@ static int __pyx_pf_4_nbt_9_TAG_List_16__delitem__(struct __pyx_obj_4_nbt__TAG_L */ if (unlikely(__pyx_v_self->value == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (PyObject_DelItem(__pyx_v_self->value, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_DelItem(__pyx_v_self->value, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":301 + /* "_nbt.pyx":291 * self.value.insert(index, tag) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -6710,7 +6784,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_16__delitem__(struct __pyx_obj_4_nbt__TAG_L return __pyx_r; } -/* "_nbt.pyx":304 +/* "_nbt.pyx":294 * del self.value[key] * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -6735,9 +6809,9 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 304); + __Pyx_TraceCall("save_value", __pyx_f[0], 294); - /* "_nbt.pyx":305 + /* "_nbt.pyx":295 * * cdef save_value(self, buf): * cdef char list_type = self.list_type # <<<<<<<<<<<<<< @@ -6747,21 +6821,21 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG __pyx_t_1 = __pyx_v_self->list_type; __pyx_v_list_type = __pyx_t_1; - /* "_nbt.pyx":308 + /* "_nbt.pyx":298 * cdef TAG_Value tag * * save_tag_id(list_type, buf) # <<<<<<<<<<<<<< - * save_int(len(self.value), buf) + * save_int( len(self.value), buf) * */ - __pyx_t_2 = __pyx_f_4_nbt_save_tag_id(__pyx_v_list_type, __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_tag_id(__pyx_v_list_type, __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":309 + /* "_nbt.pyx":299 * * save_tag_id(list_type, buf) - * save_int(len(self.value), buf) # <<<<<<<<<<<<<< + * save_int( len(self.value), buf) # <<<<<<<<<<<<<< * * cdef TAG_Value subtag */ @@ -6769,15 +6843,15 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __pyx_f_4_nbt_save_int(((int)__pyx_t_3), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_int(((int)__pyx_t_3), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":312 + /* "_nbt.pyx":302 * * cdef TAG_Value subtag * for subtag in self.value: # <<<<<<<<<<<<<< @@ -6786,21 +6860,21 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG */ if (unlikely(__pyx_v_self->value == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_subtag, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_4)); __pyx_t_4 = 0; - /* "_nbt.pyx":313 + /* "_nbt.pyx":303 * cdef TAG_Value subtag * for subtag in self.value: * if subtag.tagID != list_type: # <<<<<<<<<<<<<< @@ -6810,34 +6884,34 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG __pyx_t_5 = ((__pyx_v_subtag->tagID != __pyx_v_list_type) != 0); if (__pyx_t_5) { - /* "_nbt.pyx":314 + /* "_nbt.pyx":304 * for subtag in self.value: * if subtag.tagID != list_type: * raise ValueError("Asked to save TAG_List with different types! Found %s and %s" % (subtag.tagID, # <<<<<<<<<<<<<< * list_type)) * save_tag_value(subtag, buf) */ - __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_subtag->tagID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_subtag->tagID); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - /* "_nbt.pyx":315 + /* "_nbt.pyx":305 * if subtag.tagID != list_type: * raise ValueError("Asked to save TAG_List with different types! Found %s and %s" % (subtag.tagID, * list_type)) # <<<<<<<<<<<<<< * save_tag_value(subtag, buf) * */ - __pyx_t_6 = __Pyx_PyInt_From_char(__pyx_v_list_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_char(__pyx_v_list_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - /* "_nbt.pyx":314 + /* "_nbt.pyx":304 * for subtag in self.value: * if subtag.tagID != list_type: * raise ValueError("Asked to save TAG_List with different types! Found %s and %s" % (subtag.tagID, # <<<<<<<<<<<<<< * list_type)) * save_tag_value(subtag, buf) */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -6845,36 +6919,44 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG __Pyx_GIVEREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Asked_to_save_TAG_List_with_diff, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Asked_to_save_TAG_List_with_diff, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":316 + /* "_nbt.pyx":306 * raise ValueError("Asked to save TAG_List with different types! Found %s and %s" % (subtag.tagID, * list_type)) * save_tag_value(subtag, buf) # <<<<<<<<<<<<<< * * */ - __pyx_t_6 = __pyx_f_4_nbt_save_tag_value(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_4_nbt_save_tag_value(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "_nbt.pyx":302 + * + * cdef TAG_Value subtag + * for subtag in self.value: # <<<<<<<<<<<<<< + * if subtag.tagID != list_type: + * raise ValueError("Asked to save TAG_List with different types! Found %s and %s" % (subtag.tagID, + */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":304 + /* "_nbt.pyx":294 * del self.value[key] * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -6900,7 +6982,7 @@ static PyObject *__pyx_f_4_nbt_9_TAG_List_save_value(struct __pyx_obj_4_nbt__TAG return __pyx_r; } -/* "_nbt.pyx":251 +/* "_nbt.pyx":242 * * cdef class _TAG_List(TAG_Value): * cdef public list value # <<<<<<<<<<<<<< @@ -6926,7 +7008,7 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_5value___get__(struct __pyx_obj_4_nbt __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 251); + __Pyx_TraceCall("__get__", __pyx_f[0], 242); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; @@ -6962,8 +7044,8 @@ static int __pyx_pf_4_nbt_9_TAG_List_5value_2__set__(struct __pyx_obj_4_nbt__TAG int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 251); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 242); + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -7003,7 +7085,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_5value_4__del__(struct __pyx_obj_4_nbt__TAG __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 251); + __Pyx_TraceCall("__del__", __pyx_f[0], 242); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->value); @@ -7017,7 +7099,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_5value_4__del__(struct __pyx_obj_4_nbt__TAG return __pyx_r; } -/* "_nbt.pyx":252 +/* "_nbt.pyx":243 * cdef class _TAG_List(TAG_Value): * cdef public list value * cdef public char list_type # <<<<<<<<<<<<<< @@ -7047,9 +7129,9 @@ static PyObject *__pyx_pf_4_nbt_9_TAG_List_9list_type___get__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 252); + __Pyx_TraceCall("__get__", __pyx_f[0], 243); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->list_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->list_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7089,8 +7171,8 @@ static int __pyx_pf_4_nbt_9_TAG_List_9list_type_2__set__(struct __pyx_obj_4_nbt_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 252); - __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_TraceCall("__set__", __pyx_f[0], 243); + __pyx_t_1 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_1 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->list_type = __pyx_t_1; /* function exit code */ @@ -7105,7 +7187,7 @@ static int __pyx_pf_4_nbt_9_TAG_List_9list_type_2__set__(struct __pyx_obj_4_nbt_ return __pyx_r; } -/* "_nbt.pyx":326 +/* "_nbt.pyx":316 * cdef public object value * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -7152,7 +7234,7 @@ static int __pyx_pw_4_nbt_13_TAG_Compound_1__init__(PyObject *__pyx_v_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -7167,7 +7249,7 @@ static int __pyx_pw_4_nbt_13_TAG_Compound_1__init__(PyObject *__pyx_v_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt._TAG_Compound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7183,49 +7265,52 @@ static int __pyx_pw_4_nbt_13_TAG_Compound_1__init__(PyObject *__pyx_v_self, PyOb static int __pyx_pf_4_nbt_13_TAG_Compound___init__(struct __pyx_obj_4_nbt__TAG_Compound *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 326); + __Pyx_TraceCall("__init__", __pyx_f[0], 316); - /* "_nbt.pyx":327 + /* "_nbt.pyx":317 * * def __init__(self, value=None, name=""): * self.value = value or [] # <<<<<<<<<<<<<< * self.name = name * self.tagID = TAG_COMPOUND */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!__pyx_t_1) { - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_value); - __pyx_t_3 = __pyx_v_value; + __pyx_t_1 = __pyx_v_value; + goto __pyx_L3_bool_binop_done; } - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_L3_bool_binop_done:; + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->value); __Pyx_DECREF(__pyx_v_self->value); - __pyx_v_self->value = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_self->value = __pyx_t_1; + __pyx_t_1 = 0; - /* "_nbt.pyx":328 + /* "_nbt.pyx":318 * def __init__(self, value=None, name=""): * self.value = value or [] * self.name = name # <<<<<<<<<<<<<< * self.tagID = TAG_COMPOUND * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":329 + /* "_nbt.pyx":319 * self.value = value or [] * self.name = name * self.tagID = TAG_COMPOUND # <<<<<<<<<<<<<< @@ -7234,7 +7319,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound___init__(struct __pyx_obj_4_nbt__TAG_C */ __pyx_v_self->__pyx_base.tagID = __pyx_v_4_nbt_TAG_COMPOUND; - /* "_nbt.pyx":326 + /* "_nbt.pyx":316 * cdef public object value * * def __init__(self, value=None, name=""): # <<<<<<<<<<<<<< @@ -7246,7 +7331,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound___init__(struct __pyx_obj_4_nbt__TAG_C __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_nbt._TAG_Compound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; @@ -7256,7 +7341,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound___init__(struct __pyx_obj_4_nbt__TAG_C return __pyx_r; } -/* "_nbt.pyx":335 +/* "_nbt.pyx":325 * # * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -7291,65 +7376,67 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_2__getitem__(struct __pyx_obj_4_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 335); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 325); - /* "_nbt.pyx":337 + /* "_nbt.pyx":327 * def __getitem__(self, key): * cdef TAG_Value tag * for tag in self.value: # <<<<<<<<<<<<<< * if tag._name == key: * return tag */ - if (PyList_CheckExact(__pyx_v_self->value) || PyTuple_CheckExact(__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_v_self->value)) { __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else { - __pyx_t_4 = __pyx_t_3(__pyx_t_1); - if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_tag, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_4)); __pyx_t_4 = 0; - /* "_nbt.pyx":338 + /* "_nbt.pyx":328 * cdef TAG_Value tag * for tag in self.value: * if tag._name == key: # <<<<<<<<<<<<<< * return tag * raise KeyError("Key %s not found." % key) */ - __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_tag->_name, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_tag->_name, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - /* "_nbt.pyx":339 + /* "_nbt.pyx":329 * for tag in self.value: * if tag._name == key: * return tag # <<<<<<<<<<<<<< @@ -7362,31 +7449,39 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_2__getitem__(struct __pyx_obj_4_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } + + /* "_nbt.pyx":327 + * def __getitem__(self, key): + * cdef TAG_Value tag + * for tag in self.value: # <<<<<<<<<<<<<< + * if tag._name == key: + * return tag + */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":340 + /* "_nbt.pyx":330 * if tag._name == key: * return tag * raise KeyError("Key %s not found." % key) # <<<<<<<<<<<<<< * * def __setitem__(self, key, tag): */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_s_not_found, __pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_s_not_found, __pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":335 + /* "_nbt.pyx":325 * # * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -7408,7 +7503,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_2__getitem__(struct __pyx_obj_4_ return __pyx_r; } -/* "_nbt.pyx":342 +/* "_nbt.pyx":332 * raise KeyError("Key %s not found." % key) * * def __setitem__(self, key, tag): # <<<<<<<<<<<<<< @@ -7445,67 +7540,69 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_4__setitem__(struct __pyx_obj_4_nbt__T int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__setitem__", 0); - __Pyx_TraceCall("__setitem__", __pyx_f[0], 342); + __Pyx_TraceCall("__setitem__", __pyx_f[0], 332); - /* "_nbt.pyx":343 + /* "_nbt.pyx":333 * * def __setitem__(self, key, tag): * tag.name = key # <<<<<<<<<<<<<< * cdef TAG_Value v * self.value = [v for v in self.value if v._name != key] */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_tag, __pyx_n_s_name_2, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_tag, __pyx_n_s_name_2, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":345 + /* "_nbt.pyx":335 * tag.name = key * cdef TAG_Value v * self.value = [v for v in self.value if v._name != key] # <<<<<<<<<<<<<< * self.value.append(tag) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyList_CheckExact(__pyx_v_self->value) || PyTuple_CheckExact(__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_v_self->value)) { __pyx_t_2 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) { - if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) { - if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_v, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_v->_name, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_v->_name, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; @@ -7517,16 +7614,16 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_4__setitem__(struct __pyx_obj_4_nbt__T __pyx_v_self->value = __pyx_t_1; __pyx_t_1 = 0; - /* "_nbt.pyx":346 + /* "_nbt.pyx":336 * cdef TAG_Value v * self.value = [v for v in self.value if v._name != key] * self.value.append(tag) # <<<<<<<<<<<<<< * * def __delitem__(self, key): */ - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->value, __pyx_v_tag); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->value, __pyx_v_tag); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":342 + /* "_nbt.pyx":332 * raise KeyError("Key %s not found." % key) * * def __setitem__(self, key, tag): # <<<<<<<<<<<<<< @@ -7550,7 +7647,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_4__setitem__(struct __pyx_obj_4_nbt__T return __pyx_r; } -/* "_nbt.pyx":348 +/* "_nbt.pyx":338 * self.value.append(tag) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -7587,9 +7684,9 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_6__delitem__(struct __pyx_obj_4_nbt__T int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__delitem__", 0); - __Pyx_TraceCall("__delitem__", __pyx_f[0], 348); + __Pyx_TraceCall("__delitem__", __pyx_f[0], 338); - /* "_nbt.pyx":349 + /* "_nbt.pyx":339 * * def __delitem__(self, key): * oldlen = len(self.value) # <<<<<<<<<<<<<< @@ -7598,60 +7695,62 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_6__delitem__(struct __pyx_obj_4_nbt__T */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_oldlen = __pyx_t_2; - /* "_nbt.pyx":351 + /* "_nbt.pyx":341 * oldlen = len(self.value) * cdef TAG_Value v * self.value = [v for v in self.value if v._name != key] # <<<<<<<<<<<<<< * if oldlen == len(self.value): * raise KeyError("Key %s not found" % key) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyList_CheckExact(__pyx_v_self->value) || PyTuple_CheckExact(__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_v_self->value)) { __pyx_t_3 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; + __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_5); } - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_v, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_v->_name, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_v->_name, __pyx_v_key, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; @@ -7663,7 +7762,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_6__delitem__(struct __pyx_obj_4_nbt__T __pyx_v_self->value = __pyx_t_1; __pyx_t_1 = 0; - /* "_nbt.pyx":352 + /* "_nbt.pyx":342 * cdef TAG_Value v * self.value = [v for v in self.value if v._name != key] * if oldlen == len(self.value): # <<<<<<<<<<<<<< @@ -7672,34 +7771,34 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_6__delitem__(struct __pyx_obj_4_nbt__T */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((__pyx_v_oldlen == __pyx_t_2) != 0); if (__pyx_t_6) { - /* "_nbt.pyx":353 + /* "_nbt.pyx":343 * self.value = [v for v in self.value if v._name != key] * if oldlen == len(self.value): * raise KeyError("Key %s not found" % key) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_s_not_found_2, __pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_s_not_found_2, __pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":348 + /* "_nbt.pyx":338 * self.value.append(tag) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -7724,7 +7823,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_6__delitem__(struct __pyx_obj_4_nbt__T } static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_10generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "_nbt.pyx":355 +/* "_nbt.pyx":345 * raise KeyError("Key %s not found" % key) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -7760,24 +7859,21 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_8__iter__(struct __pyx_obj_4_nbt return NULL; } __Pyx_GOTREF(__pyx_cur_scope); - __Pyx_TraceCall("__iter__", __pyx_f[0], 355); + __Pyx_TraceCall("__iter__", __pyx_f[0], 345); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4_nbt_13_TAG_Compound_10generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4_nbt_13_TAG_Compound_10generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_TAG_Compound___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("_nbt._TAG_Compound.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; - __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r); @@ -7806,57 +7902,59 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_10generator(__pyx_GeneratorObjec return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":357 + /* "_nbt.pyx":347 * def __iter__(self): * cdef TAG_Value v * for v in self.value: # <<<<<<<<<<<<<< * yield v._name * */ - if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_self->value) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_self->value)) { __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_v)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_4)); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":358 + /* "_nbt.pyx":348 * cdef TAG_Value v * for v in self.value: * yield v._name # <<<<<<<<<<<<<< @@ -7880,11 +7978,19 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_10generator(__pyx_GeneratorObjec __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "_nbt.pyx":347 + * def __iter__(self): + * cdef TAG_Value v + * for v in self.value: # <<<<<<<<<<<<<< + * yield v._name + * + */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":355 + /* "_nbt.pyx":345 * raise KeyError("Key %s not found" % key) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -7907,7 +8013,7 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_10generator(__pyx_GeneratorObjec return NULL; } -/* "_nbt.pyx":360 +/* "_nbt.pyx":350 * yield v._name * * def __contains__(self, k): # <<<<<<<<<<<<<< @@ -7929,7 +8035,7 @@ static int __pyx_pw_4_nbt_13_TAG_Compound_12__contains__(PyObject *__pyx_v_self, } static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "_nbt.pyx":361 +/* "_nbt.pyx":351 * * def __contains__(self, k): * return any(tag.name == k for tag in self.value) # <<<<<<<<<<<<<< @@ -7955,21 +8061,18 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_12__contains___genexpr(PyObject __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); - __Pyx_TraceCall("genexpr", __pyx_f[0], 361); + __Pyx_TraceCall("genexpr", __pyx_f[0], 351); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_contains___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("_nbt._TAG_Compound.__contains__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; - __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r); @@ -7999,38 +8102,40 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1(__pyx return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value)) { + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -8040,10 +8145,10 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1(__pyx __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_tag, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tag, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tag, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_k)) { __Pyx_RaiseClosureNameError("k"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_k, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_k)) { __Pyx_RaiseClosureNameError("k"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_k, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -8062,7 +8167,7 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1(__pyx __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8082,7 +8187,7 @@ static PyObject *__pyx_gb_4_nbt_13_TAG_Compound_12__contains___2generator1(__pyx return NULL; } -/* "_nbt.pyx":360 +/* "_nbt.pyx":350 * yield v._name * * def __contains__(self, k): # <<<<<<<<<<<<<< @@ -8108,7 +8213,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_11__contains__(struct __pyx_obj_4_nbt_ return -1; } __Pyx_GOTREF(__pyx_cur_scope); - __Pyx_TraceCall("__contains__", __pyx_f[0], 360); + __Pyx_TraceCall("__contains__", __pyx_f[0], 350); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); @@ -8116,29 +8221,29 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_11__contains__(struct __pyx_obj_4_nbt_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_k); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_k); - /* "_nbt.pyx":361 + /* "_nbt.pyx":351 * * def __contains__(self, k): * return any(tag.name == k for tag in self.value) # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_1 = __pyx_pf_4_nbt_13_TAG_Compound_12__contains___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_4_nbt_13_TAG_Compound_12__contains___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; - /* "_nbt.pyx":360 + /* "_nbt.pyx":350 * yield v._name * * def __contains__(self, k): # <<<<<<<<<<<<<< @@ -8159,7 +8264,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_11__contains__(struct __pyx_obj_4_nbt_ return __pyx_r; } -/* "_nbt.pyx":363 +/* "_nbt.pyx":353 * return any(tag.name == k for tag in self.value) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8190,9 +8295,9 @@ static Py_ssize_t __pyx_pf_4_nbt_13_TAG_Compound_13__len__(struct __pyx_obj_4_nb int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__len__", 0); - __Pyx_TraceCall("__len__", __pyx_f[0], 363); + __Pyx_TraceCall("__len__", __pyx_f[0], 353); - /* "_nbt.pyx":364 + /* "_nbt.pyx":354 * * def __len__(self): * return len(self.value) # <<<<<<<<<<<<<< @@ -8201,12 +8306,12 @@ static Py_ssize_t __pyx_pf_4_nbt_13_TAG_Compound_13__len__(struct __pyx_obj_4_nb */ __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_nbt.pyx":363 + /* "_nbt.pyx":353 * return any(tag.name == k for tag in self.value) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8225,7 +8330,7 @@ static Py_ssize_t __pyx_pf_4_nbt_13_TAG_Compound_13__len__(struct __pyx_obj_4_nb return __pyx_r; } -/* "_nbt.pyx":366 +/* "_nbt.pyx":356 * return len(self.value) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8253,14 +8358,15 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_15__repr__(struct __pyx_obj_4_nb PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 366); + __Pyx_TraceCall("__repr__", __pyx_f[0], 356); - /* "_nbt.pyx":367 + /* "_nbt.pyx":357 * * def __repr__(self): * return "<%s name='%s' keys=%r>" % (str(self.__class__.__name__), self.name, self.keys()) # <<<<<<<<<<<<<< @@ -8268,45 +8374,60 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_15__repr__(struct __pyx_obj_4_nb * def add(self, TAG_Value tag): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_keys_r, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_name_s_keys_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "_nbt.pyx":366 + /* "_nbt.pyx":356 * return len(self.value) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8320,6 +8441,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_15__repr__(struct __pyx_obj_4_nb __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("_nbt._TAG_Compound.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8329,7 +8451,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_15__repr__(struct __pyx_obj_4_nb return __pyx_r; } -/* "_nbt.pyx":369 +/* "_nbt.pyx":359 * return "<%s name='%s' keys=%r>" % (str(self.__class__.__name__), self.name, self.keys()) * * def add(self, TAG_Value tag): # <<<<<<<<<<<<<< @@ -8346,7 +8468,7 @@ static PyObject *__pyx_pw_4_nbt_13_TAG_Compound_18add(PyObject *__pyx_v_self, Py PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_4_nbt_TAG_Value, 1, "tag", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), __pyx_ptype_4_nbt_TAG_Value, 1, "tag", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4_nbt_13_TAG_Compound_17add(((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_v_self), ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_v_tag)); /* function exit code */ @@ -8369,9 +8491,9 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_17add(struct __pyx_obj_4_nbt__TA int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("add", 0); - __Pyx_TraceCall("add", __pyx_f[0], 369); + __Pyx_TraceCall("add", __pyx_f[0], 359); - /* "_nbt.pyx":370 + /* "_nbt.pyx":360 * * def add(self, TAG_Value tag): * if not tag._name: # <<<<<<<<<<<<<< @@ -8382,30 +8504,30 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_17add(struct __pyx_obj_4_nbt__TA __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":371 + /* "_nbt.pyx":361 * def add(self, TAG_Value tag): * if not tag._name: * raise ValueError("Cannot add unnamed tag to TAG_Compound") # <<<<<<<<<<<<<< * * self[tag._name] = tag */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":373 + /* "_nbt.pyx":363 * raise ValueError("Cannot add unnamed tag to TAG_Compound") * * self[tag._name] = tag # <<<<<<<<<<<<<< * * def get_all(self, key): */ - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_tag->_name, ((PyObject *)__pyx_v_tag)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_tag->_name, ((PyObject *)__pyx_v_tag)) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":369 + /* "_nbt.pyx":359 * return "<%s name='%s' keys=%r>" % (str(self.__class__.__name__), self.name, self.keys()) * * def add(self, TAG_Value tag): # <<<<<<<<<<<<<< @@ -8427,7 +8549,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_17add(struct __pyx_obj_4_nbt__TA return __pyx_r; } -/* "_nbt.pyx":375 +/* "_nbt.pyx":365 * self[tag._name] = tag * * def get_all(self, key): # <<<<<<<<<<<<<< @@ -8464,9 +8586,9 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_19get_all(struct __pyx_obj_4_nbt int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("get_all", 0); - __Pyx_TraceCall("get_all", __pyx_f[0], 375); + __Pyx_TraceCall("get_all", __pyx_f[0], 365); - /* "_nbt.pyx":376 + /* "_nbt.pyx":366 * * def get_all(self, key): * return [v for v in self.value if v.name == key] # <<<<<<<<<<<<<< @@ -8474,38 +8596,40 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_19get_all(struct __pyx_obj_4_nbt * cdef save_value(self, buf): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyList_CheckExact(__pyx_v_self->value) || PyTuple_CheckExact(__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_v_self->value)) { __pyx_t_2 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) { - if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) { - if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -8513,14 +8637,14 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_19get_all(struct __pyx_obj_4_nbt } __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; @@ -8530,7 +8654,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_19get_all(struct __pyx_obj_4_nbt __pyx_t_1 = 0; goto __pyx_L0; - /* "_nbt.pyx":375 + /* "_nbt.pyx":365 * self[tag._name] = tag * * def get_all(self, key): # <<<<<<<<<<<<<< @@ -8554,7 +8678,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_19get_all(struct __pyx_obj_4_nbt return __pyx_r; } -/* "_nbt.pyx":378 +/* "_nbt.pyx":368 * return [v for v in self.value if v.name == key] * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -8575,101 +8699,111 @@ static PyObject *__pyx_f_4_nbt_13_TAG_Compound_save_value(struct __pyx_obj_4_nbt int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_value", 0); - __Pyx_TraceCall("save_value", __pyx_f[0], 378); + __Pyx_TraceCall("save_value", __pyx_f[0], 368); - /* "_nbt.pyx":380 + /* "_nbt.pyx":370 * cdef save_value(self, buf): * cdef TAG_Value subtag * for subtag in self.value: # <<<<<<<<<<<<<< * save_tag_id(subtag.tagID, buf) * save_tag_name(subtag, buf) */ - if (PyList_CheckExact(__pyx_v_self->value) || PyTuple_CheckExact(__pyx_v_self->value)) { + if (likely(PyList_CheckExact(__pyx_v_self->value)) || PyTuple_CheckExact(__pyx_v_self->value)) { __pyx_t_1 = __pyx_v_self->value; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XDECREF_SET(__pyx_v_subtag, ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_4)); __pyx_t_4 = 0; - /* "_nbt.pyx":381 + /* "_nbt.pyx":371 * cdef TAG_Value subtag * for subtag in self.value: * save_tag_id(subtag.tagID, buf) # <<<<<<<<<<<<<< * save_tag_name(subtag, buf) * save_tag_value(subtag, buf) */ - __pyx_t_4 = __pyx_f_4_nbt_save_tag_id(__pyx_v_subtag->tagID, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4_nbt_save_tag_id(__pyx_v_subtag->tagID, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":382 + /* "_nbt.pyx":372 * for subtag in self.value: * save_tag_id(subtag.tagID, buf) * save_tag_name(subtag, buf) # <<<<<<<<<<<<<< * save_tag_value(subtag, buf) * save_tag_id(TAG_END, buf) */ - __pyx_t_4 = __pyx_f_4_nbt_save_tag_name(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4_nbt_save_tag_name(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":383 + /* "_nbt.pyx":373 * save_tag_id(subtag.tagID, buf) * save_tag_name(subtag, buf) * save_tag_value(subtag, buf) # <<<<<<<<<<<<<< * save_tag_id(TAG_END, buf) * */ - __pyx_t_4 = __pyx_f_4_nbt_save_tag_value(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4_nbt_save_tag_value(__pyx_v_subtag, __pyx_v_buf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "_nbt.pyx":370 + * cdef save_value(self, buf): + * cdef TAG_Value subtag + * for subtag in self.value: # <<<<<<<<<<<<<< + * save_tag_id(subtag.tagID, buf) + * save_tag_name(subtag, buf) + */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":384 + /* "_nbt.pyx":374 * save_tag_name(subtag, buf) * save_tag_value(subtag, buf) * save_tag_id(TAG_END, buf) # <<<<<<<<<<<<<< * * def save(self, filename_or_buf=None, compressed=True): */ - __pyx_t_1 = __pyx_f_4_nbt_save_tag_id(__pyx_v_4_nbt_TAG_END, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_save_tag_id(__pyx_v_4_nbt_TAG_END, __pyx_v_buf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":378 + /* "_nbt.pyx":368 * return [v for v in self.value if v.name == key] * * cdef save_value(self, buf): # <<<<<<<<<<<<<< @@ -8693,7 +8827,7 @@ static PyObject *__pyx_f_4_nbt_13_TAG_Compound_save_value(struct __pyx_obj_4_nbt return __pyx_r; } -/* "_nbt.pyx":386 +/* "_nbt.pyx":376 * save_tag_id(TAG_END, buf) * * def save(self, filename_or_buf=None, compressed=True): # <<<<<<<<<<<<<< @@ -8741,7 +8875,7 @@ static PyObject *__pyx_pw_4_nbt_13_TAG_Compound_22save(PyObject *__pyx_v_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "save") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "save") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8756,7 +8890,7 @@ static PyObject *__pyx_pw_4_nbt_13_TAG_Compound_22save(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("save", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("save", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt._TAG_Compound.save", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8779,191 +8913,283 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_21save(struct __pyx_obj_4_nbt__T __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save", 0); - __Pyx_TraceCall("save", __pyx_f[0], 386); + __Pyx_TraceCall("save", __pyx_f[0], 376); - /* "_nbt.pyx":391 + /* "_nbt.pyx":381 * to write the data to that object. Pass nothing to return the data as a string. * """ * io = StringIO() # <<<<<<<<<<<<<< * save_tag_id(self.tagID, io) * save_tag_name(self, io) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_io = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_io = __pyx_t_1; + __pyx_t_1 = 0; - /* "_nbt.pyx":392 + /* "_nbt.pyx":382 * """ * io = StringIO() * save_tag_id(self.tagID, io) # <<<<<<<<<<<<<< * save_tag_name(self, io) * save_tag_value(self, io) */ - __pyx_t_2 = __pyx_f_4_nbt_save_tag_id(__pyx_v_self->__pyx_base.tagID, __pyx_v_io); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_save_tag_id(__pyx_v_self->__pyx_base.tagID, __pyx_v_io); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":393 + /* "_nbt.pyx":383 * io = StringIO() * save_tag_id(self.tagID, io) * save_tag_name(self, io) # <<<<<<<<<<<<<< * save_tag_value(self, io) * data = io.getvalue() */ - __pyx_t_2 = __pyx_f_4_nbt_save_tag_name(((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_v_self), __pyx_v_io); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_save_tag_name(((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_v_self), __pyx_v_io); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":394 + /* "_nbt.pyx":384 * save_tag_id(self.tagID, io) * save_tag_name(self, io) * save_tag_value(self, io) # <<<<<<<<<<<<<< * data = io.getvalue() * if compressed: */ - __pyx_t_2 = __pyx_f_4_nbt_save_tag_value(((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_v_self), __pyx_v_io); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_save_tag_value(((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_v_self), __pyx_v_io); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":395 + /* "_nbt.pyx":385 * save_tag_name(self, io) * save_tag_value(self, io) * data = io.getvalue() # <<<<<<<<<<<<<< * if compressed: * gzio = StringIO() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_io, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_data = __pyx_t_1; __pyx_t_1 = 0; - /* "_nbt.pyx":396 + /* "_nbt.pyx":386 * save_tag_value(self, io) * data = io.getvalue() * if compressed: # <<<<<<<<<<<<<< * gzio = StringIO() * gz = gzip.GzipFile(fileobj=gzio, mode='wb') */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compressed); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_3) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_compressed); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { - /* "_nbt.pyx":397 + /* "_nbt.pyx":387 * data = io.getvalue() * if compressed: * gzio = StringIO() # <<<<<<<<<<<<<< * gz = gzip.GzipFile(fileobj=gzio, mode='wb') * gz.write(data) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_gzio = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_gzio = __pyx_t_1; + __pyx_t_1 = 0; - /* "_nbt.pyx":398 + /* "_nbt.pyx":388 * if compressed: * gzio = StringIO() * gz = gzip.GzipFile(fileobj=gzio, mode='wb') # <<<<<<<<<<<<<< * gz.write(data) * gz.close() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gzip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_gzip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fileobj, __pyx_v_gzio) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_wb) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fileobj, __pyx_v_gzio) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_n_s_wb) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_gz = __pyx_t_4; - __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_gz = __pyx_t_3; + __pyx_t_3 = 0; - /* "_nbt.pyx":399 + /* "_nbt.pyx":389 * gzio = StringIO() * gz = gzip.GzipFile(fileobj=gzio, mode='wb') * gz.write(data) # <<<<<<<<<<<<<< * gz.close() * data = gzio.getvalue() */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_gz, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gz, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "_nbt.pyx":400 - * gz = gzip.GzipFile(fileobj=gzio, mode='wb') - * gz.write(data) - * gz.close() # <<<<<<<<<<<<<< - * data = gzio.getvalue() - * - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gz, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + if (!__pyx_t_2) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "_nbt.pyx":390 + * gz = gzip.GzipFile(fileobj=gzio, mode='wb') + * gz.write(data) + * gz.close() # <<<<<<<<<<<<<< + * data = gzio.getvalue() + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gz, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":401 + /* "_nbt.pyx":391 * gz.write(data) * gz.close() * data = gzio.getvalue() # <<<<<<<<<<<<<< * * if filename_or_buf is None: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":403 + /* "_nbt.pyx":393 * data = gzio.getvalue() * * if filename_or_buf is None: # <<<<<<<<<<<<<< * return data * */ - __pyx_t_3 = (__pyx_v_filename_or_buf == Py_None); - __pyx_t_5 = (__pyx_t_3 != 0); - if (__pyx_t_5) { + __pyx_t_4 = (__pyx_v_filename_or_buf == Py_None); + __pyx_t_6 = (__pyx_t_4 != 0); + if (__pyx_t_6) { - /* "_nbt.pyx":404 + /* "_nbt.pyx":394 * * if filename_or_buf is None: * return data # <<<<<<<<<<<<<< @@ -8976,84 +9202,116 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_21save(struct __pyx_obj_4_nbt__T goto __pyx_L0; } - /* "_nbt.pyx":406 + /* "_nbt.pyx":396 * return data * * if isinstance(filename_or_buf, basestring): # <<<<<<<<<<<<<< * f = file(filename_or_buf, "wb") * f.write(data) */ - __pyx_t_5 = __Pyx_PyBaseString_Check(__pyx_v_filename_or_buf); - __pyx_t_3 = (__pyx_t_5 != 0); - if (__pyx_t_3) { + __pyx_t_6 = __Pyx_PyBaseString_Check(__pyx_v_filename_or_buf); + __pyx_t_4 = (__pyx_t_6 != 0); + if (__pyx_t_4) { - /* "_nbt.pyx":407 + /* "_nbt.pyx":397 * * if isinstance(filename_or_buf, basestring): * f = file(filename_or_buf, "wb") # <<<<<<<<<<<<<< * f.write(data) * else: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_filename_or_buf); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename_or_buf); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename_or_buf); __Pyx_GIVEREF(__pyx_v_filename_or_buf); __Pyx_INCREF(__pyx_n_s_wb); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_wb); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_wb); __Pyx_GIVEREF(__pyx_n_s_wb); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_f = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; - /* "_nbt.pyx":408 + /* "_nbt.pyx":398 * if isinstance(filename_or_buf, basestring): * f = file(filename_or_buf, "wb") * f.write(data) # <<<<<<<<<<<<<< * else: * filename_or_buf.write(data) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + if (!__pyx_t_5) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } /*else*/ { - /* "_nbt.pyx":410 + /* "_nbt.pyx":400 * f.write(data) * else: * filename_or_buf.write(data) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename_or_buf, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename_or_buf, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + if (!__pyx_t_2) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; - /* "_nbt.pyx":386 + /* "_nbt.pyx":376 * save_tag_id(TAG_END, buf) * * def save(self, filename_or_buf=None, compressed=True): # <<<<<<<<<<<<<< @@ -9067,7 +9325,8 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_21save(struct __pyx_obj_4_nbt__T __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("_nbt._TAG_Compound.save", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9082,7 +9341,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_21save(struct __pyx_obj_4_nbt__T return __pyx_r; } -/* "_nbt.pyx":324 +/* "_nbt.pyx":314 * * cdef class _TAG_Compound(TAG_Value): * cdef public object value # <<<<<<<<<<<<<< @@ -9108,7 +9367,7 @@ static PyObject *__pyx_pf_4_nbt_13_TAG_Compound_5value___get__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 324); + __Pyx_TraceCall("__get__", __pyx_f[0], 314); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; @@ -9140,7 +9399,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_5value_2__set__(struct __pyx_obj_4_nbt __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__set__", 0); - __Pyx_TraceCall("__set__", __pyx_f[0], 324); + __Pyx_TraceCall("__set__", __pyx_f[0], 314); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->value); @@ -9172,7 +9431,7 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_5value_4__del__(struct __pyx_obj_4_nbt __Pyx_RefNannyDeclarations __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_TraceCall("__del__", __pyx_f[0], 324); + __Pyx_TraceCall("__del__", __pyx_f[0], 314); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->value); @@ -9186,11 +9445,11 @@ static int __pyx_pf_4_nbt_13_TAG_Compound_5value_4__del__(struct __pyx_obj_4_nbt return __pyx_r; } -/* "_nbt.pyx":419 +/* "_nbt.pyx":410 * * #cdef int needswap = (sys.byteorder == "little") - * cdef swab(void * vbuf, int nbytes): # <<<<<<<<<<<<<< - * cdef unsigned char * buf = vbuf + * cdef swab(void *vbuf, int nbytes): # <<<<<<<<<<<<<< + * cdef unsigned char *buf = vbuf * #print "Swapping ", nbytes, "bytes" */ @@ -9205,33 +9464,33 @@ static PyObject *__pyx_f_4_nbt_swab(void *__pyx_v_vbuf, int __pyx_v_nbytes) { unsigned char __pyx_t_4; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("swab", 0); - __Pyx_TraceCall("swab", __pyx_f[0], 419); + __Pyx_TraceCall("swab", __pyx_f[0], 410); - /* "_nbt.pyx":420 + /* "_nbt.pyx":411 * #cdef int needswap = (sys.byteorder == "little") - * cdef swab(void * vbuf, int nbytes): - * cdef unsigned char * buf = vbuf # <<<<<<<<<<<<<< + * cdef swab(void *vbuf, int nbytes): + * cdef unsigned char *buf = vbuf # <<<<<<<<<<<<<< * #print "Swapping ", nbytes, "bytes" * #for i in range(nbytes): print buf[i], */ __pyx_v_buf = ((unsigned char *)__pyx_v_vbuf); - /* "_nbt.pyx":426 + /* "_nbt.pyx":417 * #if not needswap: return * cdef int i - * for i in range((nbytes+1)/2): # <<<<<<<<<<<<<< - * buf[i], buf[nbytes - i -1] = buf[nbytes - i - 1], buf[i] - * #for i in range(nbytes): print buf[i], + * for i in range((nbytes + 1) / 2): # <<<<<<<<<<<<<< + * buf[i], buf[nbytes - i - 1] = buf[nbytes - i - 1], buf[i] + * #for i in range(nbytes): print buf[i], */ __pyx_t_1 = __Pyx_div_long((__pyx_v_nbytes + 1), 2); for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "_nbt.pyx":427 + /* "_nbt.pyx":418 * cdef int i - * for i in range((nbytes+1)/2): - * buf[i], buf[nbytes - i -1] = buf[nbytes - i - 1], buf[i] # <<<<<<<<<<<<<< - * #for i in range(nbytes): print buf[i], + * for i in range((nbytes + 1) / 2): + * buf[i], buf[nbytes - i - 1] = buf[nbytes - i - 1], buf[i] # <<<<<<<<<<<<<< + * #for i in range(nbytes): print buf[i], * */ __pyx_t_3 = (__pyx_v_buf[((__pyx_v_nbytes - __pyx_v_i) - 1)]); @@ -9240,11 +9499,11 @@ static PyObject *__pyx_f_4_nbt_swab(void *__pyx_v_vbuf, int __pyx_v_nbytes) { (__pyx_v_buf[((__pyx_v_nbytes - __pyx_v_i) - 1)]) = __pyx_t_4; } - /* "_nbt.pyx":419 + /* "_nbt.pyx":410 * * #cdef int needswap = (sys.byteorder == "little") - * cdef swab(void * vbuf, int nbytes): # <<<<<<<<<<<<<< - * cdef unsigned char * buf = vbuf + * cdef swab(void *vbuf, int nbytes): # <<<<<<<<<<<<<< + * cdef unsigned char *buf = vbuf * #print "Swapping ", nbytes, "bytes" */ @@ -9256,8 +9515,8 @@ static PyObject *__pyx_f_4_nbt_swab(void *__pyx_v_vbuf, int __pyx_v_nbytes) { return __pyx_r; } -/* "_nbt.pyx":431 - * +/* "_nbt.pyx":421 + * #for i in range(nbytes): print buf[i], * * def gunzip(data): # <<<<<<<<<<<<<< * return gzip.GzipFile(fileobj=StringIO(data)).read() @@ -9266,7 +9525,7 @@ static PyObject *__pyx_f_4_nbt_swab(void *__pyx_v_vbuf, int __pyx_v_nbytes) { /* Python wrapper */ static PyObject *__pyx_pw_4_nbt_1gunzip(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/ -static PyMethodDef __pyx_mdef_4_nbt_1gunzip = {__Pyx_NAMESTR("gunzip"), (PyCFunction)__pyx_pw_4_nbt_1gunzip, METH_O, __Pyx_DOCSTR(0)}; +static PyMethodDef __pyx_mdef_4_nbt_1gunzip = {"gunzip", (PyCFunction)__pyx_pw_4_nbt_1gunzip, METH_O, 0}; static PyObject *__pyx_pw_4_nbt_1gunzip(PyObject *__pyx_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -9286,57 +9545,90 @@ static PyObject *__pyx_pf_4_nbt_gunzip(CYTHON_UNUSED PyObject *__pyx_self, PyObj PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; 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_TraceDeclarations __Pyx_RefNannySetupContext("gunzip", 0); - __Pyx_TraceCall("gunzip", __pyx_f[0], 431); + __Pyx_TraceCall("gunzip", __pyx_f[0], 421); - /* "_nbt.pyx":432 + /* "_nbt.pyx":422 * * def gunzip(data): * return gzip.GzipFile(fileobj=StringIO(data)).read() # <<<<<<<<<<<<<< * - * + * def try_gunzip(data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_gzip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gzip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GzipFile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fileobj, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + if (!__pyx_t_6) { + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fileobj, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "_nbt.pyx":431 - * + /* "_nbt.pyx":421 + * #for i in range(nbytes): print buf[i], * * def gunzip(data): # <<<<<<<<<<<<<< * return gzip.GzipFile(fileobj=StringIO(data)).read() @@ -9350,6 +9642,8 @@ static PyObject *__pyx_pf_4_nbt_gunzip(CYTHON_UNUSED PyObject *__pyx_self, PyObj __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_nbt.gunzip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9359,8 +9653,8 @@ static PyObject *__pyx_pf_4_nbt_gunzip(CYTHON_UNUSED PyObject *__pyx_self, PyObj return __pyx_r; } -/* "_nbt.pyx":435 - * +/* "_nbt.pyx":424 + * return gzip.GzipFile(fileobj=StringIO(data)).read() * * def try_gunzip(data): # <<<<<<<<<<<<<< * try: @@ -9369,7 +9663,7 @@ static PyObject *__pyx_pf_4_nbt_gunzip(CYTHON_UNUSED PyObject *__pyx_self, PyObj /* Python wrapper */ static PyObject *__pyx_pw_4_nbt_3try_gunzip(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/ -static PyMethodDef __pyx_mdef_4_nbt_3try_gunzip = {__Pyx_NAMESTR("try_gunzip"), (PyCFunction)__pyx_pw_4_nbt_3try_gunzip, METH_O, __Pyx_DOCSTR(0)}; +static PyMethodDef __pyx_mdef_4_nbt_3try_gunzip = {"try_gunzip", (PyCFunction)__pyx_pw_4_nbt_3try_gunzip, METH_O, 0}; static PyObject *__pyx_pw_4_nbt_3try_gunzip(PyObject *__pyx_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -9390,17 +9684,17 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("try_gunzip", 0); - __Pyx_TraceCall("try_gunzip", __pyx_f[0], 435); + __Pyx_TraceCall("try_gunzip", __pyx_f[0], 424); __Pyx_INCREF(__pyx_v_data); - /* "_nbt.pyx":436 + /* "_nbt.pyx":425 * * def try_gunzip(data): * try: # <<<<<<<<<<<<<< @@ -9414,57 +9708,74 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "_nbt.pyx":437 + /* "_nbt.pyx":426 * def try_gunzip(data): * try: * data = gunzip(data) # <<<<<<<<<<<<<< * except IOError, zlib.error: * pass */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gunzip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_gunzip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_data); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data); - __Pyx_GIVEREF(__pyx_v_data); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + if (!__pyx_t_6) { + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_4); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_v_data); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); + __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":438 + /* "_nbt.pyx":427 * try: * data = gunzip(data) * except IOError, zlib.error: # <<<<<<<<<<<<<< * pass * return data */ - __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_IOError); - if (__pyx_t_7) { + __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_IOError); + if (__pyx_t_8) { __Pyx_AddTraceback("_nbt.try_gunzip", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_PyObject_SetAttrStr(__pyx_t_8, __pyx_n_s_error, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zlib); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_PyObject_SetAttrStr(__pyx_t_6, __pyx_n_s_error, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; @@ -9482,20 +9793,20 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, __pyx_L10_try_end:; } - /* "_nbt.pyx":440 + /* "_nbt.pyx":429 * except IOError, zlib.error: * pass * return data # <<<<<<<<<<<<<< * - * + * def load(filename="", buf=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_data); __pyx_r = __pyx_v_data; goto __pyx_L0; - /* "_nbt.pyx":435 - * + /* "_nbt.pyx":424 + * return gzip.GzipFile(fileobj=StringIO(data)).read() * * def try_gunzip(data): # <<<<<<<<<<<<<< * try: @@ -9507,7 +9818,7 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_nbt.try_gunzip", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9518,8 +9829,8 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "_nbt.pyx":443 - * +/* "_nbt.pyx":431 + * return data * * def load(filename="", buf=None): # <<<<<<<<<<<<<< * if filename: @@ -9528,7 +9839,7 @@ static PyObject *__pyx_pf_4_nbt_2try_gunzip(CYTHON_UNUSED PyObject *__pyx_self, /* Python wrapper */ static PyObject *__pyx_pw_4_nbt_5load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4_nbt_5load = {__Pyx_NAMESTR("load"), (PyCFunction)__pyx_pw_4_nbt_5load, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyMethodDef __pyx_mdef_4_nbt_5load = {"load", (PyCFunction)__pyx_pw_4_nbt_5load, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4_nbt_5load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_buf = 0; @@ -9566,7 +9877,7 @@ static PyObject *__pyx_pw_4_nbt_5load(PyObject *__pyx_self, PyObject *__pyx_args } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9581,7 +9892,7 @@ static PyObject *__pyx_pw_4_nbt_5load(PyObject *__pyx_self, PyObject *__pyx_args } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("load", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("load", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.load", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9602,32 +9913,33 @@ static PyObject *__pyx_pf_4_nbt_4load(CYTHON_UNUSED PyObject *__pyx_self, PyObje PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load", 0); - __Pyx_TraceCall("load", __pyx_f[0], 443); + __Pyx_TraceCall("load", __pyx_f[0], 431); __Pyx_INCREF(__pyx_v_buf); - /* "_nbt.pyx":444 + /* "_nbt.pyx":432 * * def load(filename="", buf=None): * if filename: # <<<<<<<<<<<<<< * buf = file(filename, "rb") * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "_nbt.pyx":445 + /* "_nbt.pyx":433 * def load(filename="", buf=None): * if filename: * buf = file(filename, "rb") # <<<<<<<<<<<<<< * * if hasattr(buf, "read"): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename); @@ -9635,7 +9947,7 @@ static PyObject *__pyx_pf_4_nbt_4load(CYTHON_UNUSED PyObject *__pyx_self, PyObje __Pyx_INCREF(__pyx_n_s_rb); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_rb); __Pyx_GIVEREF(__pyx_n_s_rb); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_file, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_3); @@ -9644,64 +9956,95 @@ static PyObject *__pyx_pf_4_nbt_4load(CYTHON_UNUSED PyObject *__pyx_self, PyObje } __pyx_L3:; - /* "_nbt.pyx":447 + /* "_nbt.pyx":435 * buf = file(filename, "rb") * * if hasattr(buf, "read"): # <<<<<<<<<<<<<< * buf = buf.read() * */ - __pyx_t_1 = PyObject_HasAttr(__pyx_v_buf, __pyx_n_s_read); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_HasAttr(__pyx_v_buf, __pyx_n_s_read); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - /* "_nbt.pyx":448 + /* "_nbt.pyx":436 * * if hasattr(buf, "read"): * buf = buf.read() # <<<<<<<<<<<<<< * * return load_buffer(try_gunzip(buf)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; - /* "_nbt.pyx":450 + /* "_nbt.pyx":438 * buf = buf.read() * * return load_buffer(try_gunzip(buf)) # <<<<<<<<<<<<<< * - * + * cdef class load_ctx: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_try_gunzip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_try_gunzip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_buf); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_buf); - __Pyx_GIVEREF(__pyx_v_buf); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (!__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_buf); + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_buf); + __Pyx_GIVEREF(__pyx_v_buf); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_buffer(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __pyx_f_4_nbt_load_buffer(((PyObject*)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; - /* "_nbt.pyx":443 - * + /* "_nbt.pyx":431 + * return data * * def load(filename="", buf=None): # <<<<<<<<<<<<<< * if filename: @@ -9713,6 +10056,7 @@ static PyObject *__pyx_pf_4_nbt_4load(CYTHON_UNUSED PyObject *__pyx_self, PyObje __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("_nbt.load", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9723,10 +10067,10 @@ static PyObject *__pyx_pf_4_nbt_4load(CYTHON_UNUSED PyObject *__pyx_self, PyObje return __pyx_r; } -/* "_nbt.pyx":459 - * +/* "_nbt.pyx":445 + * cdef size_t size * - * cdef char * require(load_ctx self, size_t s) except NULL: # <<<<<<<<<<<<<< + * cdef char *require(load_ctx self, size_t s) except NULL: # <<<<<<<<<<<<<< * if s > self.size - self.offset: * raise NBTFormatError("NBT Stream too short. Asked for %d, only had %d" % (s, (self.size - self.offset))) */ @@ -9740,16 +10084,17 @@ static char *__pyx_f_4_nbt_require(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_self PyObject *__pyx_t_3 = NULL; 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_TraceDeclarations __Pyx_RefNannySetupContext("require", 0); - __Pyx_TraceCall("require", __pyx_f[0], 459); + __Pyx_TraceCall("require", __pyx_f[0], 445); - /* "_nbt.pyx":460 + /* "_nbt.pyx":446 * - * cdef char * require(load_ctx self, size_t s) except NULL: + * cdef char *require(load_ctx self, size_t s) except NULL: * if s > self.size - self.offset: # <<<<<<<<<<<<<< * raise NBTFormatError("NBT Stream too short. Asked for %d, only had %d" % (s, (self.size - self.offset))) * @@ -9757,76 +10102,93 @@ static char *__pyx_f_4_nbt_require(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_self __pyx_t_1 = ((__pyx_v_s > (__pyx_v_self->size - __pyx_v_self->offset)) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":461 - * cdef char * require(load_ctx self, size_t s) except NULL: + /* "_nbt.pyx":447 + * cdef char *require(load_ctx self, size_t s) except NULL: * if s > self.size - self.offset: * raise NBTFormatError("NBT Stream too short. Asked for %d, only had %d" % (s, (self.size - self.offset))) # <<<<<<<<<<<<<< * - * cdef char * ret = self.buffer + self.offset + * cdef char *ret = self.buffer + self.offset */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_s); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_self->size - __pyx_v_self->offset)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_s); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_FromSize_t((__pyx_v_self->size - __pyx_v_self->offset)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_3 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_NBT_Stream_too_short_Asked_for_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_NBT_Stream_too_short_Asked_for_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + if (!__pyx_t_6) { + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else { + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL; + PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":463 + /* "_nbt.pyx":449 * raise NBTFormatError("NBT Stream too short. Asked for %d, only had %d" % (s, (self.size - self.offset))) * - * cdef char * ret = self.buffer + self.offset # <<<<<<<<<<<<<< + * cdef char *ret = self.buffer + self.offset # <<<<<<<<<<<<<< * self.offset += s * return ret */ __pyx_v_ret = (__pyx_v_self->buffer + __pyx_v_self->offset); - /* "_nbt.pyx":464 + /* "_nbt.pyx":450 * - * cdef char * ret = self.buffer + self.offset + * cdef char *ret = self.buffer + self.offset * self.offset += s # <<<<<<<<<<<<<< * return ret * */ __pyx_v_self->offset = (__pyx_v_self->offset + __pyx_v_s); - /* "_nbt.pyx":465 - * cdef char * ret = self.buffer + self.offset + /* "_nbt.pyx":451 + * cdef char *ret = self.buffer + self.offset * self.offset += s * return ret # <<<<<<<<<<<<<< * - * + * cdef load_buffer(bytes buf): */ __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "_nbt.pyx":459 - * + /* "_nbt.pyx":445 + * cdef size_t size * - * cdef char * require(load_ctx self, size_t s) except NULL: # <<<<<<<<<<<<<< + * cdef char *require(load_ctx self, size_t s) except NULL: # <<<<<<<<<<<<<< * if s > self.size - self.offset: * raise NBTFormatError("NBT Stream too short. Asked for %d, only had %d" % (s, (self.size - self.offset))) */ @@ -9837,6 +10199,7 @@ static char *__pyx_f_4_nbt_require(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_self __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("_nbt.require", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -9845,8 +10208,8 @@ static char *__pyx_f_4_nbt_require(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_self return __pyx_r; } -/* "_nbt.pyx":468 - * +/* "_nbt.pyx":453 + * return ret * * cdef load_buffer(bytes buf): # <<<<<<<<<<<<<< * cdef load_ctx ctx = load_ctx() @@ -9867,26 +10230,27 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { PyObject *__pyx_t_5 = NULL; 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_TraceDeclarations __Pyx_RefNannySetupContext("load_buffer", 0); - __Pyx_TraceCall("load_buffer", __pyx_f[0], 468); + __Pyx_TraceCall("load_buffer", __pyx_f[0], 453); - /* "_nbt.pyx":469 + /* "_nbt.pyx":454 * * cdef load_buffer(bytes buf): * cdef load_ctx ctx = load_ctx() # <<<<<<<<<<<<<< * ctx.offset = 1 * ctx.buffer = buf */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4_nbt_load_ctx)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4_nbt_load_ctx)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_ctx = ((struct __pyx_obj_4_nbt_load_ctx *)__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":470 + /* "_nbt.pyx":455 * cdef load_buffer(bytes buf): * cdef load_ctx ctx = load_ctx() * ctx.offset = 1 # <<<<<<<<<<<<<< @@ -9895,17 +10259,17 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { */ __pyx_v_ctx->offset = 1; - /* "_nbt.pyx":471 + /* "_nbt.pyx":456 * cdef load_ctx ctx = load_ctx() * ctx.offset = 1 * ctx.buffer = buf # <<<<<<<<<<<<<< * ctx.size = len(buf) * if len(buf) < 1: */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ctx->buffer = __pyx_t_2; - /* "_nbt.pyx":472 + /* "_nbt.pyx":457 * ctx.offset = 1 * ctx.buffer = buf * ctx.size = len(buf) # <<<<<<<<<<<<<< @@ -9914,12 +10278,12 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = PyBytes_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyBytes_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ctx->size = __pyx_t_3; - /* "_nbt.pyx":473 + /* "_nbt.pyx":458 * ctx.buffer = buf * ctx.size = len(buf) * if len(buf) < 1: # <<<<<<<<<<<<<< @@ -9928,40 +10292,40 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { */ if (unlikely(__pyx_v_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = PyBytes_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyBytes_GET_SIZE(__pyx_v_buf); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 < 1) != 0); if (__pyx_t_4) { - /* "_nbt.pyx":474 + /* "_nbt.pyx":459 * ctx.size = len(buf) * if len(buf) < 1: * raise NBTFormatError("NBT Stream too short!") # <<<<<<<<<<<<<< * - * cdef unsigned int * magic_no = ctx.buffer + * cdef unsigned int *magic_no = ctx.buffer */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":476 + /* "_nbt.pyx":461 * raise NBTFormatError("NBT Stream too short!") * - * cdef unsigned int * magic_no = ctx.buffer # <<<<<<<<<<<<<< + * cdef unsigned int *magic_no = ctx.buffer # <<<<<<<<<<<<<< * * if ctx.buffer[0] != TAG_COMPOUND: */ __pyx_v_magic_no = ((unsigned int *)__pyx_v_ctx->buffer); - /* "_nbt.pyx":478 - * cdef unsigned int * magic_no = ctx.buffer + /* "_nbt.pyx":463 + * cdef unsigned int *magic_no = ctx.buffer * * if ctx.buffer[0] != TAG_COMPOUND: # <<<<<<<<<<<<<< * raise NBTFormatError('Not an NBT file with a root TAG_Compound ' @@ -9970,94 +10334,103 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { __pyx_t_4 = (((__pyx_v_ctx->buffer[0]) != __pyx_v_4_nbt_TAG_COMPOUND) != 0); if (__pyx_t_4) { - /* "_nbt.pyx":479 + /* "_nbt.pyx":464 * * if ctx.buffer[0] != TAG_COMPOUND: * raise NBTFormatError('Not an NBT file with a root TAG_Compound ' # <<<<<<<<<<<<<< * '(file starts with "%4s" (0x%08x)' % (ctx.buffer, magic_no[0])) * name = load_name(ctx) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NBTFormatError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); - /* "_nbt.pyx":480 + /* "_nbt.pyx":465 * if ctx.buffer[0] != TAG_COMPOUND: * raise NBTFormatError('Not an NBT file with a root TAG_Compound ' * '(file starts with "%4s" (0x%08x)' % (ctx.buffer, magic_no[0])) # <<<<<<<<<<<<<< * name = load_name(ctx) * tag = load_compound(ctx) */ - __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_ctx->buffer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int((__pyx_v_magic_no[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_ctx->buffer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int((__pyx_v_magic_no[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Not_an_NBT_file_with_a_root_TAG, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "_nbt.pyx":479 - * - * if ctx.buffer[0] != TAG_COMPOUND: - * raise NBTFormatError('Not an NBT file with a root TAG_Compound ' # <<<<<<<<<<<<<< - * '(file starts with "%4s" (0x%08x)' % (ctx.buffer, magic_no[0])) - * name = load_name(ctx) - */ - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Not_an_NBT_file_with_a_root_TAG, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + if (!__pyx_t_8) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL; + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_6, 0, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "_nbt.pyx":481 + /* "_nbt.pyx":466 * raise NBTFormatError('Not an NBT file with a root TAG_Compound ' * '(file starts with "%4s" (0x%08x)' % (ctx.buffer, magic_no[0])) * name = load_name(ctx) # <<<<<<<<<<<<<< * tag = load_compound(ctx) * tag.name = name */ - __pyx_t_6 = __pyx_f_4_nbt_load_name(__pyx_v_ctx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_name = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_5 = __pyx_f_4_nbt_load_name(__pyx_v_ctx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_name = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; - /* "_nbt.pyx":482 + /* "_nbt.pyx":467 * '(file starts with "%4s" (0x%08x)' % (ctx.buffer, magic_no[0])) * name = load_name(ctx) * tag = load_compound(ctx) # <<<<<<<<<<<<<< * tag.name = name * return tag */ - __pyx_t_6 = __pyx_f_4_nbt_load_compound(__pyx_v_ctx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_tag = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_t_5 = __pyx_f_4_nbt_load_compound(__pyx_v_ctx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_tag = __pyx_t_5; + __pyx_t_5 = 0; - /* "_nbt.pyx":483 + /* "_nbt.pyx":468 * name = load_name(ctx) * tag = load_compound(ctx) * tag.name = name # <<<<<<<<<<<<<< * return tag * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_tag, __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_tag, __pyx_n_s_name_2, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":484 + /* "_nbt.pyx":469 * tag = load_compound(ctx) * tag.name = name * return tag # <<<<<<<<<<<<<< @@ -10069,8 +10442,8 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { __pyx_r = __pyx_v_tag; goto __pyx_L0; - /* "_nbt.pyx":468 - * + /* "_nbt.pyx":453 + * return ret * * cdef load_buffer(bytes buf): # <<<<<<<<<<<<<< * cdef load_ctx ctx = load_ctx() @@ -10083,6 +10456,7 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_nbt.load_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -10095,12 +10469,12 @@ static PyObject *__pyx_f_4_nbt_load_buffer(PyObject *__pyx_v_buf) { return __pyx_r; } -/* "_nbt.pyx":486 +/* "_nbt.pyx":471 * return tag * * cdef load_byte(load_ctx ctx): # <<<<<<<<<<<<<< - * * cdef TAG_Byte tag = TAG_Byte.__new__(TAG_Byte) + * tag.value = require(ctx, 1)[0] */ static PyObject *__pyx_f_4_nbt_load_byte(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_ctx) { @@ -10114,32 +10488,32 @@ static PyObject *__pyx_f_4_nbt_load_byte(struct __pyx_obj_4_nbt_load_ctx *__pyx_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_byte", 0); - __Pyx_TraceCall("load_byte", __pyx_f[0], 486); + __Pyx_TraceCall("load_byte", __pyx_f[0], 471); - /* "_nbt.pyx":488 - * cdef load_byte(load_ctx ctx): + /* "_nbt.pyx":472 * + * cdef load_byte(load_ctx ctx): * cdef TAG_Byte tag = TAG_Byte.__new__(TAG_Byte) # <<<<<<<<<<<<<< * tag.value = require(ctx, 1)[0] * tag.tagID = TAG_BYTE */ - __pyx_t_1 = __pyx_tp_new_4_nbt_TAG_Byte(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4_nbt_TAG_Byte(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4_nbt_TAG_Byte)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4_nbt_TAG_Byte)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Byte *)__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":489 - * + /* "_nbt.pyx":473 + * cdef load_byte(load_ctx ctx): * cdef TAG_Byte tag = TAG_Byte.__new__(TAG_Byte) * tag.value = require(ctx, 1)[0] # <<<<<<<<<<<<<< * tag.tagID = TAG_BYTE * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag->value = (__pyx_t_2[0]); - /* "_nbt.pyx":490 + /* "_nbt.pyx":474 * cdef TAG_Byte tag = TAG_Byte.__new__(TAG_Byte) * tag.value = require(ctx, 1)[0] * tag.tagID = TAG_BYTE # <<<<<<<<<<<<<< @@ -10148,24 +10522,24 @@ static PyObject *__pyx_f_4_nbt_load_byte(struct __pyx_obj_4_nbt_load_ctx *__pyx_ */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_BYTE; - /* "_nbt.pyx":491 + /* "_nbt.pyx":475 * tag.value = require(ctx, 1)[0] * tag.tagID = TAG_BYTE * return tag # <<<<<<<<<<<<<< * - * + * cdef load_short(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":486 + /* "_nbt.pyx":471 * return tag * * cdef load_byte(load_ctx ctx): # <<<<<<<<<<<<<< - * * cdef TAG_Byte tag = TAG_Byte.__new__(TAG_Byte) + * tag.value = require(ctx, 1)[0] */ /* function exit code */ @@ -10181,11 +10555,11 @@ static PyObject *__pyx_f_4_nbt_load_byte(struct __pyx_obj_4_nbt_load_ctx *__pyx_ return __pyx_r; } -/* "_nbt.pyx":494 - * +/* "_nbt.pyx":477 + * return tag * * cdef load_short(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef short * ptr = require(ctx, 2) + * cdef short *ptr = require(ctx, 2) * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) */ @@ -10201,33 +10575,33 @@ static PyObject *__pyx_f_4_nbt_load_short(struct __pyx_obj_4_nbt_load_ctx *__pyx int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_short", 0); - __Pyx_TraceCall("load_short", __pyx_f[0], 494); + __Pyx_TraceCall("load_short", __pyx_f[0], 477); - /* "_nbt.pyx":495 + /* "_nbt.pyx":478 * * cdef load_short(load_ctx ctx): - * cdef short * ptr = require(ctx, 2) # <<<<<<<<<<<<<< + * cdef short *ptr = require(ctx, 2) # <<<<<<<<<<<<<< * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) * tag.value = ptr[0] */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((short *)__pyx_t_1); - /* "_nbt.pyx":496 + /* "_nbt.pyx":479 * cdef load_short(load_ctx ctx): - * cdef short * ptr = require(ctx, 2) + * cdef short *ptr = require(ctx, 2) * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) # <<<<<<<<<<<<<< * tag.value = ptr[0] * swab(&tag.value, 2) */ - __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Short(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Short)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Short(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Short)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Short)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Short)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Short *)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":497 - * cdef short * ptr = require(ctx, 2) + /* "_nbt.pyx":480 + * cdef short *ptr = require(ctx, 2) * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) * tag.value = ptr[0] # <<<<<<<<<<<<<< * swab(&tag.value, 2) @@ -10235,18 +10609,18 @@ static PyObject *__pyx_f_4_nbt_load_short(struct __pyx_obj_4_nbt_load_ctx *__pyx */ __pyx_v_tag->value = (__pyx_v_ptr[0]); - /* "_nbt.pyx":498 + /* "_nbt.pyx":481 * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) * tag.value = ptr[0] * swab(&tag.value, 2) # <<<<<<<<<<<<<< * tag.tagID = TAG_SHORT * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":499 + /* "_nbt.pyx":482 * tag.value = ptr[0] * swab(&tag.value, 2) * tag.tagID = TAG_SHORT # <<<<<<<<<<<<<< @@ -10255,23 +10629,23 @@ static PyObject *__pyx_f_4_nbt_load_short(struct __pyx_obj_4_nbt_load_ctx *__pyx */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_SHORT; - /* "_nbt.pyx":500 + /* "_nbt.pyx":483 * swab(&tag.value, 2) * tag.tagID = TAG_SHORT * return tag # <<<<<<<<<<<<<< * - * + * cdef load_int(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":494 - * + /* "_nbt.pyx":477 + * return tag * * cdef load_short(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef short * ptr = require(ctx, 2) + * cdef short *ptr = require(ctx, 2) * cdef TAG_Short tag = TAG_Short.__new__(TAG_Short) */ @@ -10288,11 +10662,11 @@ static PyObject *__pyx_f_4_nbt_load_short(struct __pyx_obj_4_nbt_load_ctx *__pyx return __pyx_r; } -/* "_nbt.pyx":503 - * +/* "_nbt.pyx":485 + * return tag * * cdef load_int(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) */ @@ -10308,33 +10682,33 @@ static PyObject *__pyx_f_4_nbt_load_int(struct __pyx_obj_4_nbt_load_ctx *__pyx_v int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_int", 0); - __Pyx_TraceCall("load_int", __pyx_f[0], 503); + __Pyx_TraceCall("load_int", __pyx_f[0], 485); - /* "_nbt.pyx":504 + /* "_nbt.pyx":486 * * cdef load_int(load_ctx ctx): - * cdef int * ptr = require(ctx, 4) # <<<<<<<<<<<<<< + * cdef int *ptr = require(ctx, 4) # <<<<<<<<<<<<<< * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) * tag.value = (ptr[0]) */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((int *)__pyx_t_1); - /* "_nbt.pyx":505 + /* "_nbt.pyx":487 * cdef load_int(load_ctx ctx): - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) # <<<<<<<<<<<<<< * tag.value = (ptr[0]) * swab(&tag.value, 4) */ - __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Int(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Int)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Int(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Int)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Int)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Int)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Int *)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":506 - * cdef int * ptr = require(ctx, 4) + /* "_nbt.pyx":488 + * cdef int *ptr = require(ctx, 4) * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) * tag.value = (ptr[0]) # <<<<<<<<<<<<<< * swab(&tag.value, 4) @@ -10342,18 +10716,18 @@ static PyObject *__pyx_f_4_nbt_load_int(struct __pyx_obj_4_nbt_load_ctx *__pyx_v */ __pyx_v_tag->value = (__pyx_v_ptr[0]); - /* "_nbt.pyx":507 + /* "_nbt.pyx":489 * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) * tag.value = (ptr[0]) * swab(&tag.value, 4) # <<<<<<<<<<<<<< * tag.tagID = TAG_INT * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":508 + /* "_nbt.pyx":490 * tag.value = (ptr[0]) * swab(&tag.value, 4) * tag.tagID = TAG_INT # <<<<<<<<<<<<<< @@ -10362,23 +10736,23 @@ static PyObject *__pyx_f_4_nbt_load_int(struct __pyx_obj_4_nbt_load_ctx *__pyx_v */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_INT; - /* "_nbt.pyx":509 + /* "_nbt.pyx":491 * swab(&tag.value, 4) * tag.tagID = TAG_INT * return tag # <<<<<<<<<<<<<< * - * + * cdef load_long(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":503 - * + /* "_nbt.pyx":485 + * return tag * * cdef load_int(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef TAG_Int tag = TAG_Int.__new__(TAG_Int) */ @@ -10395,11 +10769,11 @@ static PyObject *__pyx_f_4_nbt_load_int(struct __pyx_obj_4_nbt_load_ctx *__pyx_v return __pyx_r; } -/* "_nbt.pyx":512 - * +/* "_nbt.pyx":493 + * return tag * * cdef load_long(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef long long * ptr = require(ctx, 8) + * cdef long long *ptr = require(ctx, 8) * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) */ @@ -10415,33 +10789,33 @@ static PyObject *__pyx_f_4_nbt_load_long(struct __pyx_obj_4_nbt_load_ctx *__pyx_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_long", 0); - __Pyx_TraceCall("load_long", __pyx_f[0], 512); + __Pyx_TraceCall("load_long", __pyx_f[0], 493); - /* "_nbt.pyx":513 + /* "_nbt.pyx":494 * * cdef load_long(load_ctx ctx): - * cdef long long * ptr = require(ctx, 8) # <<<<<<<<<<<<<< + * cdef long long *ptr = require(ctx, 8) # <<<<<<<<<<<<<< * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) * tag.value = ptr[0] */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 8); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 8); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((PY_LONG_LONG *)__pyx_t_1); - /* "_nbt.pyx":514 + /* "_nbt.pyx":495 * cdef load_long(load_ctx ctx): - * cdef long long * ptr = require(ctx, 8) + * cdef long long *ptr = require(ctx, 8) * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) # <<<<<<<<<<<<<< * tag.value = ptr[0] * swab(&tag.value, 8) */ - __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Long(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Long)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Long(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Long)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Long)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Long)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Long *)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":515 - * cdef long long * ptr = require(ctx, 8) + /* "_nbt.pyx":496 + * cdef long long *ptr = require(ctx, 8) * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) * tag.value = ptr[0] # <<<<<<<<<<<<<< * swab(&tag.value, 8) @@ -10449,18 +10823,18 @@ static PyObject *__pyx_f_4_nbt_load_long(struct __pyx_obj_4_nbt_load_ctx *__pyx_ */ __pyx_v_tag->value = (__pyx_v_ptr[0]); - /* "_nbt.pyx":516 + /* "_nbt.pyx":497 * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) * tag.value = ptr[0] * swab(&tag.value, 8) # <<<<<<<<<<<<<< * tag.tagID = TAG_LONG * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":517 + /* "_nbt.pyx":498 * tag.value = ptr[0] * swab(&tag.value, 8) * tag.tagID = TAG_LONG # <<<<<<<<<<<<<< @@ -10469,23 +10843,23 @@ static PyObject *__pyx_f_4_nbt_load_long(struct __pyx_obj_4_nbt_load_ctx *__pyx_ */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_LONG; - /* "_nbt.pyx":518 + /* "_nbt.pyx":499 * swab(&tag.value, 8) * tag.tagID = TAG_LONG * return tag # <<<<<<<<<<<<<< * - * + * cdef load_float(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":512 - * + /* "_nbt.pyx":493 + * return tag * * cdef load_long(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef long long * ptr = require(ctx, 8) + * cdef long long *ptr = require(ctx, 8) * cdef TAG_Long tag = TAG_Long.__new__(TAG_Long) */ @@ -10502,11 +10876,11 @@ static PyObject *__pyx_f_4_nbt_load_long(struct __pyx_obj_4_nbt_load_ctx *__pyx_ return __pyx_r; } -/* "_nbt.pyx":521 - * +/* "_nbt.pyx":501 + * return tag * * cdef load_float(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef float * ptr = require(ctx, 4) + * cdef float *ptr = require(ctx, 4) * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) */ @@ -10522,33 +10896,33 @@ static PyObject *__pyx_f_4_nbt_load_float(struct __pyx_obj_4_nbt_load_ctx *__pyx int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_float", 0); - __Pyx_TraceCall("load_float", __pyx_f[0], 521); + __Pyx_TraceCall("load_float", __pyx_f[0], 501); - /* "_nbt.pyx":522 + /* "_nbt.pyx":502 * * cdef load_float(load_ctx ctx): - * cdef float * ptr = require(ctx, 4) # <<<<<<<<<<<<<< + * cdef float *ptr = require(ctx, 4) # <<<<<<<<<<<<<< * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) * tag.value = ptr[0] */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((float *)__pyx_t_1); - /* "_nbt.pyx":523 + /* "_nbt.pyx":503 * cdef load_float(load_ctx ctx): - * cdef float * ptr = require(ctx, 4) + * cdef float *ptr = require(ctx, 4) * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) # <<<<<<<<<<<<<< * tag.value = ptr[0] * swab(&tag.value, 4) */ - __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Float(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Float)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Float(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Float)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Float)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Float)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Float *)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":524 - * cdef float * ptr = require(ctx, 4) + /* "_nbt.pyx":504 + * cdef float *ptr = require(ctx, 4) * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) * tag.value = ptr[0] # <<<<<<<<<<<<<< * swab(&tag.value, 4) @@ -10556,18 +10930,18 @@ static PyObject *__pyx_f_4_nbt_load_float(struct __pyx_obj_4_nbt_load_ctx *__pyx */ __pyx_v_tag->value = (__pyx_v_ptr[0]); - /* "_nbt.pyx":525 + /* "_nbt.pyx":505 * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) * tag.value = ptr[0] * swab(&tag.value, 4) # <<<<<<<<<<<<<< * tag.tagID = TAG_FLOAT * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":526 + /* "_nbt.pyx":506 * tag.value = ptr[0] * swab(&tag.value, 4) * tag.tagID = TAG_FLOAT # <<<<<<<<<<<<<< @@ -10576,23 +10950,23 @@ static PyObject *__pyx_f_4_nbt_load_float(struct __pyx_obj_4_nbt_load_ctx *__pyx */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_FLOAT; - /* "_nbt.pyx":527 + /* "_nbt.pyx":507 * swab(&tag.value, 4) * tag.tagID = TAG_FLOAT * return tag # <<<<<<<<<<<<<< * - * + * cdef load_double(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":521 - * + /* "_nbt.pyx":501 + * return tag * * cdef load_float(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef float * ptr = require(ctx, 4) + * cdef float *ptr = require(ctx, 4) * cdef TAG_Float tag = TAG_Float.__new__(TAG_Float) */ @@ -10609,11 +10983,11 @@ static PyObject *__pyx_f_4_nbt_load_float(struct __pyx_obj_4_nbt_load_ctx *__pyx return __pyx_r; } -/* "_nbt.pyx":530 - * +/* "_nbt.pyx":509 + * return tag * * cdef load_double(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef double * ptr = require(ctx, 8) + * cdef double *ptr = require(ctx, 8) * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) */ @@ -10629,33 +11003,33 @@ static PyObject *__pyx_f_4_nbt_load_double(struct __pyx_obj_4_nbt_load_ctx *__py int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_double", 0); - __Pyx_TraceCall("load_double", __pyx_f[0], 530); + __Pyx_TraceCall("load_double", __pyx_f[0], 509); - /* "_nbt.pyx":531 + /* "_nbt.pyx":510 * * cdef load_double(load_ctx ctx): - * cdef double * ptr = require(ctx, 8) # <<<<<<<<<<<<<< + * cdef double *ptr = require(ctx, 8) # <<<<<<<<<<<<<< * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) * tag.value = ptr[0] */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 8); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 8); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((double *)__pyx_t_1); - /* "_nbt.pyx":532 + /* "_nbt.pyx":511 * cdef load_double(load_ctx ctx): - * cdef double * ptr = require(ctx, 8) + * cdef double *ptr = require(ctx, 8) * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) # <<<<<<<<<<<<<< * tag.value = ptr[0] * swab(&tag.value, 8) */ - __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Double(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Double)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_tp_new_4_nbt_TAG_Double(((PyTypeObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Double)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Double)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt_TAG_Double)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Double *)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":533 - * cdef double * ptr = require(ctx, 8) + /* "_nbt.pyx":512 + * cdef double *ptr = require(ctx, 8) * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) * tag.value = ptr[0] # <<<<<<<<<<<<<< * swab(&tag.value, 8) @@ -10663,18 +11037,18 @@ static PyObject *__pyx_f_4_nbt_load_double(struct __pyx_obj_4_nbt_load_ctx *__py */ __pyx_v_tag->value = (__pyx_v_ptr[0]); - /* "_nbt.pyx":534 + /* "_nbt.pyx":513 * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) * tag.value = ptr[0] * swab(&tag.value, 8) # <<<<<<<<<<<<<< * tag.tagID = TAG_DOUBLE * return tag */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_tag->value), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":535 + /* "_nbt.pyx":514 * tag.value = ptr[0] * swab(&tag.value, 8) * tag.tagID = TAG_DOUBLE # <<<<<<<<<<<<<< @@ -10683,23 +11057,23 @@ static PyObject *__pyx_f_4_nbt_load_double(struct __pyx_obj_4_nbt_load_ctx *__py */ __pyx_v_tag->__pyx_base.tagID = __pyx_v_4_nbt_TAG_DOUBLE; - /* "_nbt.pyx":536 + /* "_nbt.pyx":515 * swab(&tag.value, 8) * tag.tagID = TAG_DOUBLE * return tag # <<<<<<<<<<<<<< * - * + * cdef load_array(load_ctx ctx, object TagClass): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":530 - * + /* "_nbt.pyx":509 + * return tag * * cdef load_double(load_ctx ctx): # <<<<<<<<<<<<<< - * cdef double * ptr = require(ctx, 8) + * cdef double *ptr = require(ctx, 8) * cdef TAG_Double tag = TAG_Double.__new__(TAG_Double) */ @@ -10716,11 +11090,11 @@ static PyObject *__pyx_f_4_nbt_load_double(struct __pyx_obj_4_nbt_load_ctx *__py return __pyx_r; } -/* "_nbt.pyx":539 - * +/* "_nbt.pyx":517 + * return tag * * cdef load_array(load_ctx ctx, object TagClass): # <<<<<<<<<<<<<< - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] */ @@ -10738,125 +11112,145 @@ static PyObject *__pyx_f_4_nbt_load_array(struct __pyx_obj_4_nbt_load_ctx *__pyx size_t __pyx_t_5; Py_ssize_t __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_TraceDeclarations __Pyx_RefNannySetupContext("load_array", 0); - __Pyx_TraceCall("load_array", __pyx_f[0], 539); + __Pyx_TraceCall("load_array", __pyx_f[0], 517); - /* "_nbt.pyx":540 + /* "_nbt.pyx":518 * * cdef load_array(load_ctx ctx, object TagClass): - * cdef int * ptr = require(ctx, 4) # <<<<<<<<<<<<<< + * cdef int *ptr = require(ctx, 4) # <<<<<<<<<<<<<< * cdef int length = ptr[0] * swab(&length, 4) */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((int *)__pyx_t_1); - /* "_nbt.pyx":541 + /* "_nbt.pyx":519 * cdef load_array(load_ctx ctx, object TagClass): - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] # <<<<<<<<<<<<<< * swab(&length, 4) * */ __pyx_v_length = (__pyx_v_ptr[0]); - /* "_nbt.pyx":542 - * cdef int * ptr = require(ctx, 4) + /* "_nbt.pyx":520 + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] * swab(&length, 4) # <<<<<<<<<<<<<< * * byte_length = length * TagClass.dtype.itemsize */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":544 + /* "_nbt.pyx":522 * swab(&length, 4) * * byte_length = length * TagClass.dtype.itemsize # <<<<<<<<<<<<<< * cdef char *arr = require(ctx, byte_length) * return TagClass(fromstring(arr[:byte_length], dtype=TagClass.dtype, count=length)) */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_TagClass, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_TagClass, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_byte_length = __pyx_t_3; __pyx_t_3 = 0; - /* "_nbt.pyx":545 + /* "_nbt.pyx":523 * * byte_length = length * TagClass.dtype.itemsize * cdef char *arr = require(ctx, byte_length) # <<<<<<<<<<<<<< * return TagClass(fromstring(arr[:byte_length], dtype=TagClass.dtype, count=length)) * */ - __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_byte_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_t_5); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_byte_length); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_t_5); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_arr = __pyx_t_1; - /* "_nbt.pyx":546 + /* "_nbt.pyx":524 * byte_length = length * TagClass.dtype.itemsize * cdef char *arr = require(ctx, byte_length) * return TagClass(fromstring(arr[:byte_length], dtype=TagClass.dtype, count=length)) # <<<<<<<<<<<<<< * - * + * cdef load_compound(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromstring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_byte_length); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_arr + 0, __pyx_t_6 - 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_byte_length); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_arr + 0, __pyx_t_6 - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_TagClass, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_TagClass, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_count, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_TagClass, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_7; - __pyx_t_7 = 0; + __Pyx_INCREF(__pyx_v_TagClass); + __pyx_t_2 = __pyx_v_TagClass; __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (!__pyx_t_7) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL; + PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "_nbt.pyx":539 - * + /* "_nbt.pyx":517 + * return tag * * cdef load_array(load_ctx ctx, object TagClass): # <<<<<<<<<<<<<< - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] */ @@ -10866,6 +11260,7 @@ static PyObject *__pyx_f_4_nbt_load_array(struct __pyx_obj_4_nbt_load_ctx *__pyx __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_nbt.load_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -10876,8 +11271,8 @@ static PyObject *__pyx_f_4_nbt_load_array(struct __pyx_obj_4_nbt_load_ctx *__pyx return __pyx_r; } -/* "_nbt.pyx":549 - * +/* "_nbt.pyx":526 + * return TagClass(fromstring(arr[:byte_length], dtype=TagClass.dtype, count=length)) * * cdef load_compound(load_ctx ctx): # <<<<<<<<<<<<<< * cdef char tagID @@ -10891,33 +11286,49 @@ static PyObject *__pyx_f_4_nbt_load_compound(struct __pyx_obj_4_nbt_load_ctx *__ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - char *__pyx_t_3; - int __pyx_t_4; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; int __pyx_t_5; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_compound", 0); - __Pyx_TraceCall("load_compound", __pyx_f[0], 549); + __Pyx_TraceCall("load_compound", __pyx_f[0], 526); - /* "_nbt.pyx":551 + /* "_nbt.pyx":528 * cdef load_compound(load_ctx ctx): * cdef char tagID * cdef _TAG_Compound root_tag = TAG_Compound() # <<<<<<<<<<<<<< * * while True: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_Compound); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_Compound); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4_nbt__TAG_Compound))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_root_tag = ((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_3 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4_nbt__TAG_Compound))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_root_tag = ((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_t_1); + __pyx_t_1 = 0; - /* "_nbt.pyx":553 + /* "_nbt.pyx":530 * cdef _TAG_Compound root_tag = TAG_Compound() * * while True: # <<<<<<<<<<<<<< @@ -10926,27 +11337,27 @@ static PyObject *__pyx_f_4_nbt_load_compound(struct __pyx_obj_4_nbt_load_ctx *__ */ while (1) { - /* "_nbt.pyx":554 + /* "_nbt.pyx":531 * * while True: * tagID = require(ctx, 1)[0] # <<<<<<<<<<<<<< * if tagID == TAG_END: * break */ - __pyx_t_3 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_tagID = (__pyx_t_3[0]); + __pyx_t_4 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_tagID = (__pyx_t_4[0]); - /* "_nbt.pyx":555 + /* "_nbt.pyx":532 * while True: * tagID = require(ctx, 1)[0] * if tagID == TAG_END: # <<<<<<<<<<<<<< * break * else: */ - __pyx_t_4 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_END) != 0); - if (__pyx_t_4) { + __pyx_t_5 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_END) != 0); + if (__pyx_t_5) { - /* "_nbt.pyx":556 + /* "_nbt.pyx":533 * tagID = require(ctx, 1)[0] * if tagID == TAG_END: * break # <<<<<<<<<<<<<< @@ -10957,35 +11368,35 @@ static PyObject *__pyx_f_4_nbt_load_compound(struct __pyx_obj_4_nbt_load_ctx *__ } /*else*/ { - /* "_nbt.pyx":558 + /* "_nbt.pyx":535 * break * else: * root_tag.value.append(load_named(ctx, tagID)) # <<<<<<<<<<<<<< * * return root_tag */ - __pyx_t_2 = __pyx_f_4_nbt_load_named(__pyx_v_ctx, __pyx_v_tagID); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_root_tag->value, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_load_named(__pyx_v_ctx, __pyx_v_tagID); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_root_tag->value, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } __pyx_L4_break:; - /* "_nbt.pyx":560 + /* "_nbt.pyx":537 * root_tag.value.append(load_named(ctx, tagID)) * * return root_tag # <<<<<<<<<<<<<< * - * + * cdef load_named(load_ctx ctx, char tagID): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_root_tag)); __pyx_r = ((PyObject *)__pyx_v_root_tag); goto __pyx_L0; - /* "_nbt.pyx":549 - * + /* "_nbt.pyx":526 + * return TagClass(fromstring(arr[:byte_length], dtype=TagClass.dtype, count=length)) * * cdef load_compound(load_ctx ctx): # <<<<<<<<<<<<<< * cdef char tagID @@ -10996,6 +11407,7 @@ static PyObject *__pyx_f_4_nbt_load_compound(struct __pyx_obj_4_nbt_load_ctx *__ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_nbt.load_compound", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -11006,8 +11418,8 @@ static PyObject *__pyx_f_4_nbt_load_compound(struct __pyx_obj_4_nbt_load_ctx *__ return __pyx_r; } -/* "_nbt.pyx":563 - * +/* "_nbt.pyx":539 + * return root_tag * * cdef load_named(load_ctx ctx, char tagID): # <<<<<<<<<<<<<< * name = load_name(ctx) @@ -11025,34 +11437,34 @@ static PyObject *__pyx_f_4_nbt_load_named(struct __pyx_obj_4_nbt_load_ctx *__pyx int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_named", 0); - __Pyx_TraceCall("load_named", __pyx_f[0], 563); + __Pyx_TraceCall("load_named", __pyx_f[0], 539); - /* "_nbt.pyx":564 + /* "_nbt.pyx":540 * * cdef load_named(load_ctx ctx, char tagID): * name = load_name(ctx) # <<<<<<<<<<<<<< * cdef TAG_Value tag = load_tag(tagID, ctx) * tag._name = name */ - __pyx_t_1 = __pyx_f_4_nbt_load_name(__pyx_v_ctx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_load_name(__pyx_v_ctx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":565 + /* "_nbt.pyx":541 * cdef load_named(load_ctx ctx, char tagID): * name = load_name(ctx) * cdef TAG_Value tag = load_tag(tagID, ctx) # <<<<<<<<<<<<<< * tag._name = name * return tag */ - __pyx_t_1 = __pyx_f_4_nbt_load_tag(__pyx_v_tagID, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_load_tag(__pyx_v_tagID, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4_nbt_TAG_Value))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt_TAG_Value *)__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":566 + /* "_nbt.pyx":542 * name = load_name(ctx) * cdef TAG_Value tag = load_tag(tagID, ctx) * tag._name = name # <<<<<<<<<<<<<< @@ -11065,20 +11477,20 @@ static PyObject *__pyx_f_4_nbt_load_named(struct __pyx_obj_4_nbt_load_ctx *__pyx __Pyx_DECREF(__pyx_v_tag->_name); __pyx_v_tag->_name = __pyx_v_name; - /* "_nbt.pyx":567 + /* "_nbt.pyx":543 * cdef TAG_Value tag = load_tag(tagID, ctx) * tag._name = name * return tag # <<<<<<<<<<<<<< * - * + * cdef load_list(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":563 - * + /* "_nbt.pyx":539 + * return root_tag * * cdef load_named(load_ctx ctx, char tagID): # <<<<<<<<<<<<<< * name = load_name(ctx) @@ -11099,12 +11511,12 @@ static PyObject *__pyx_f_4_nbt_load_named(struct __pyx_obj_4_nbt_load_ctx *__pyx return __pyx_r; } -/* "_nbt.pyx":570 - * +/* "_nbt.pyx":545 + * return tag * * cdef load_list(load_ctx ctx): # <<<<<<<<<<<<<< - * * cdef char list_type = require(ctx, 1)[0] + * cdef int *ptr = require(ctx, 4) */ static PyObject *__pyx_f_4_nbt_load_list(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_ctx) { @@ -11128,72 +11540,72 @@ static PyObject *__pyx_f_4_nbt_load_list(struct __pyx_obj_4_nbt_load_ctx *__pyx_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_list", 0); - __Pyx_TraceCall("load_list", __pyx_f[0], 570); + __Pyx_TraceCall("load_list", __pyx_f[0], 545); - /* "_nbt.pyx":572 - * cdef load_list(load_ctx ctx): + /* "_nbt.pyx":546 * + * cdef load_list(load_ctx ctx): * cdef char list_type = require(ctx, 1)[0] # <<<<<<<<<<<<<< - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_list_type = (__pyx_t_1[0]); - /* "_nbt.pyx":573 - * + /* "_nbt.pyx":547 + * cdef load_list(load_ctx ctx): * cdef char list_type = require(ctx, 1)[0] - * cdef int * ptr = require(ctx, 4) # <<<<<<<<<<<<<< + * cdef int *ptr = require(ctx, 4) # <<<<<<<<<<<<<< * cdef int length = ptr[0] * swab(&length, 4) */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((int *)__pyx_t_1); - /* "_nbt.pyx":574 + /* "_nbt.pyx":548 * cdef char list_type = require(ctx, 1)[0] - * cdef int * ptr = require(ctx, 4) + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] # <<<<<<<<<<<<<< * swab(&length, 4) * */ __pyx_v_length = (__pyx_v_ptr[0]); - /* "_nbt.pyx":575 - * cdef int * ptr = require(ctx, 4) + /* "_nbt.pyx":549 + * cdef int *ptr = require(ctx, 4) * cdef int length = ptr[0] * swab(&length, 4) # <<<<<<<<<<<<<< * * cdef _TAG_List tag = TAG_List(list_type=list_type) */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":577 + /* "_nbt.pyx":551 * swab(&length, 4) * * cdef _TAG_List tag = TAG_List(list_type=list_type) # <<<<<<<<<<<<<< * cdef list val = tag.value * cdef int i */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_List); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_List); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_list_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_list_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_list_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_list_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt__TAG_List))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4_nbt__TAG_List))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_tag = ((struct __pyx_obj_4_nbt__TAG_List *)__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":578 + /* "_nbt.pyx":552 * * cdef _TAG_List tag = TAG_List(list_type=list_type) * cdef list val = tag.value # <<<<<<<<<<<<<< @@ -11205,7 +11617,7 @@ static PyObject *__pyx_f_4_nbt_load_list(struct __pyx_obj_4_nbt_load_ctx *__pyx_ __pyx_v_val = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_nbt.pyx":580 + /* "_nbt.pyx":554 * cdef list val = tag.value * cdef int i * for i in range(length): # <<<<<<<<<<<<<< @@ -11216,37 +11628,37 @@ static PyObject *__pyx_f_4_nbt_load_list(struct __pyx_obj_4_nbt_load_ctx *__pyx_ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "_nbt.pyx":581 + /* "_nbt.pyx":555 * cdef int i * for i in range(length): * PyList_Append(val, load_tag(list_type, ctx)) # <<<<<<<<<<<<<< * * return tag */ - __pyx_t_4 = __pyx_f_4_nbt_load_tag(__pyx_v_list_type, __pyx_v_ctx); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4_nbt_load_tag(__pyx_v_list_type, __pyx_v_ctx); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyList_Append(__pyx_v_val, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_Append(__pyx_v_val, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "_nbt.pyx":583 + /* "_nbt.pyx":557 * PyList_Append(val, load_tag(list_type, ctx)) * * return tag # <<<<<<<<<<<<<< * - * + * cdef unicode load_string(load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_tag)); __pyx_r = ((PyObject *)__pyx_v_tag); goto __pyx_L0; - /* "_nbt.pyx":570 - * + /* "_nbt.pyx":545 + * return tag * * cdef load_list(load_ctx ctx): # <<<<<<<<<<<<<< - * * cdef char list_type = require(ctx, 1)[0] + * cdef int *ptr = require(ctx, 4) */ /* function exit code */ @@ -11265,12 +11677,12 @@ static PyObject *__pyx_f_4_nbt_load_list(struct __pyx_obj_4_nbt_load_ctx *__pyx_ return __pyx_r; } -/* "_nbt.pyx":586 - * +/* "_nbt.pyx":559 + * return tag * * cdef unicode load_string(load_ctx ctx): # <<<<<<<<<<<<<< - * - * cdef unsigned short * ptr = require(ctx, 2) + * cdef unsigned short *ptr = require(ctx, 2) + * cdef unsigned short length = ptr[0] */ static PyObject *__pyx_f_4_nbt_load_string(struct __pyx_obj_4_nbt_load_ctx *__pyx_v_ctx) { @@ -11286,52 +11698,52 @@ static PyObject *__pyx_f_4_nbt_load_string(struct __pyx_obj_4_nbt_load_ctx *__py int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_string", 0); - __Pyx_TraceCall("load_string", __pyx_f[0], 586); + __Pyx_TraceCall("load_string", __pyx_f[0], 559); - /* "_nbt.pyx":588 - * cdef unicode load_string(load_ctx ctx): + /* "_nbt.pyx":560 * - * cdef unsigned short * ptr = require(ctx, 2) # <<<<<<<<<<<<<< + * cdef unicode load_string(load_ctx ctx): + * cdef unsigned short *ptr = require(ctx, 2) # <<<<<<<<<<<<<< * cdef unsigned short length = ptr[0] * swab(&length, 2) */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((unsigned short *)__pyx_t_1); - /* "_nbt.pyx":589 - * - * cdef unsigned short * ptr = require(ctx, 2) + /* "_nbt.pyx":561 + * cdef unicode load_string(load_ctx ctx): + * cdef unsigned short *ptr = require(ctx, 2) * cdef unsigned short length = ptr[0] # <<<<<<<<<<<<<< * swab(&length, 2) * */ __pyx_v_length = (__pyx_v_ptr[0]); - /* "_nbt.pyx":590 - * cdef unsigned short * ptr = require(ctx, 2) + /* "_nbt.pyx":562 + * cdef unsigned short *ptr = require(ctx, 2) * cdef unsigned short length = ptr[0] * swab(&length, 2) # <<<<<<<<<<<<<< * * u = PyUnicode_DecodeUTF8(require(ctx, length), length, "strict") */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":592 + /* "_nbt.pyx":564 * swab(&length, 2) * * u = PyUnicode_DecodeUTF8(require(ctx, length), length, "strict") # <<<<<<<<<<<<<< * return u * */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_v_length); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_t_1, __pyx_v_length, __pyx_k_strict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_v_length); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_t_1, __pyx_v_length, __pyx_k_strict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_v_u = __pyx_t_2; + __pyx_v_u = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":593 + /* "_nbt.pyx":565 * * u = PyUnicode_DecodeUTF8(require(ctx, length), length, "strict") * return u # <<<<<<<<<<<<<< @@ -11339,17 +11751,16 @@ static PyObject *__pyx_f_4_nbt_load_string(struct __pyx_obj_4_nbt_load_ctx *__py * IF UNICODE_NAMES: */ __Pyx_XDECREF(__pyx_r); - if (!(likely(PyUnicode_CheckExact(__pyx_v_u))||((__pyx_v_u) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_u)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_u); - __pyx_r = ((PyObject*)__pyx_v_u); + __pyx_r = __pyx_v_u; goto __pyx_L0; - /* "_nbt.pyx":586 - * + /* "_nbt.pyx":559 + * return tag * * cdef unicode load_string(load_ctx ctx): # <<<<<<<<<<<<<< - * - * cdef unsigned short * ptr = require(ctx, 2) + * cdef unsigned short *ptr = require(ctx, 2) + * cdef unsigned short length = ptr[0] */ /* function exit code */ @@ -11365,7 +11776,7 @@ static PyObject *__pyx_f_4_nbt_load_string(struct __pyx_obj_4_nbt_load_ctx *__py return __pyx_r; } -/* "_nbt.pyx":599 +/* "_nbt.pyx":571 * return load_string(ctx) * ELSE: * cdef bytes load_name(load_ctx ctx): # <<<<<<<<<<<<<< @@ -11385,19 +11796,19 @@ static PyObject *__pyx_f_4_nbt_load_name(struct __pyx_obj_4_nbt_load_ctx *__pyx_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_name", 0); - __Pyx_TraceCall("load_name", __pyx_f[0], 599); + __Pyx_TraceCall("load_name", __pyx_f[0], 571); - /* "_nbt.pyx":603 + /* "_nbt.pyx":575 * Like load_string, but returns a str instead so python can intern it, saving memory. * """ * cdef unsigned short *ptr = require(ctx, 2) # <<<<<<<<<<<<<< * cdef unsigned short length = ptr[0] * swab(&length, 2) */ - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, 2); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ptr = ((unsigned short *)__pyx_t_1); - /* "_nbt.pyx":604 + /* "_nbt.pyx":576 * """ * cdef unsigned short *ptr = require(ctx, 2) * cdef unsigned short length = ptr[0] # <<<<<<<<<<<<<< @@ -11406,18 +11817,18 @@ static PyObject *__pyx_f_4_nbt_load_name(struct __pyx_obj_4_nbt_load_ctx *__pyx_ */ __pyx_v_length = (__pyx_v_ptr[0]); - /* "_nbt.pyx":605 + /* "_nbt.pyx":577 * cdef unsigned short *ptr = require(ctx, 2) * cdef unsigned short length = ptr[0] * swab(&length, 2) # <<<<<<<<<<<<<< * * return require(ctx, length)[:length] */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":607 + /* "_nbt.pyx":579 * swab(&length, 2) * * return require(ctx, length)[:length] # <<<<<<<<<<<<<< @@ -11425,14 +11836,14 @@ static PyObject *__pyx_f_4_nbt_load_name(struct __pyx_obj_4_nbt_load_ctx *__pyx_ * cdef load_tag(char tagID, load_ctx ctx): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_v_length); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_t_1 + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_require(__pyx_v_ctx, __pyx_v_length); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_t_1 + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_nbt.pyx":599 + /* "_nbt.pyx":571 * return load_string(ctx) * ELSE: * cdef bytes load_name(load_ctx ctx): # <<<<<<<<<<<<<< @@ -11452,7 +11863,7 @@ static PyObject *__pyx_f_4_nbt_load_name(struct __pyx_obj_4_nbt_load_ctx *__pyx_ return __pyx_r; } -/* "_nbt.pyx":609 +/* "_nbt.pyx":581 * return require(ctx, length)[:length] * * cdef load_tag(char tagID, load_ctx ctx): # <<<<<<<<<<<<<< @@ -11472,9 +11883,9 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("load_tag", 0); - __Pyx_TraceCall("load_tag", __pyx_f[0], 609); + __Pyx_TraceCall("load_tag", __pyx_f[0], 581); - /* "_nbt.pyx":610 + /* "_nbt.pyx":582 * * cdef load_tag(char tagID, load_ctx ctx): * if tagID == TAG_BYTE: # <<<<<<<<<<<<<< @@ -11484,7 +11895,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_BYTE) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":611 + /* "_nbt.pyx":583 * cdef load_tag(char tagID, load_ctx ctx): * if tagID == TAG_BYTE: * return load_byte(ctx) # <<<<<<<<<<<<<< @@ -11492,14 +11903,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_SHORT: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_byte(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_byte(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":613 + /* "_nbt.pyx":585 * return load_byte(ctx) * * if tagID == TAG_SHORT: # <<<<<<<<<<<<<< @@ -11509,7 +11920,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_SHORT) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":614 + /* "_nbt.pyx":586 * * if tagID == TAG_SHORT: * return load_short(ctx) # <<<<<<<<<<<<<< @@ -11517,14 +11928,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_INT: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_short(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_short(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":616 + /* "_nbt.pyx":588 * return load_short(ctx) * * if tagID == TAG_INT: # <<<<<<<<<<<<<< @@ -11534,7 +11945,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_INT) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":617 + /* "_nbt.pyx":589 * * if tagID == TAG_INT: * return load_int(ctx) # <<<<<<<<<<<<<< @@ -11542,14 +11953,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_LONG: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_int(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_int(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":619 + /* "_nbt.pyx":591 * return load_int(ctx) * * if tagID == TAG_LONG: # <<<<<<<<<<<<<< @@ -11559,7 +11970,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_LONG) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":620 + /* "_nbt.pyx":592 * * if tagID == TAG_LONG: * return load_long(ctx) # <<<<<<<<<<<<<< @@ -11567,14 +11978,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_FLOAT: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_long(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_long(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":622 + /* "_nbt.pyx":594 * return load_long(ctx) * * if tagID == TAG_FLOAT: # <<<<<<<<<<<<<< @@ -11584,7 +11995,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_FLOAT) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":623 + /* "_nbt.pyx":595 * * if tagID == TAG_FLOAT: * return load_float(ctx) # <<<<<<<<<<<<<< @@ -11592,14 +12003,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_DOUBLE: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_float(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_float(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":625 + /* "_nbt.pyx":597 * return load_float(ctx) * * if tagID == TAG_DOUBLE: # <<<<<<<<<<<<<< @@ -11609,7 +12020,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_DOUBLE) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":626 + /* "_nbt.pyx":598 * * if tagID == TAG_DOUBLE: * return load_double(ctx) # <<<<<<<<<<<<<< @@ -11617,14 +12028,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_BYTE_ARRAY: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_double(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_double(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":628 + /* "_nbt.pyx":600 * return load_double(ctx) * * if tagID == TAG_BYTE_ARRAY: # <<<<<<<<<<<<<< @@ -11634,7 +12045,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_BYTE_ARRAY) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":629 + /* "_nbt.pyx":601 * * if tagID == TAG_BYTE_ARRAY: * return load_array(ctx, TAG_Byte_Array) # <<<<<<<<<<<<<< @@ -11642,14 +12053,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_STRING: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte_Array))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte_Array))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "_nbt.pyx":631 + /* "_nbt.pyx":603 * return load_array(ctx, TAG_Byte_Array) * * if tagID == TAG_STRING: # <<<<<<<<<<<<<< @@ -11659,19 +12070,19 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_STRING) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":632 + /* "_nbt.pyx":604 * * if tagID == TAG_STRING: * u = load_string(ctx) # <<<<<<<<<<<<<< * return TAG_String(u) * */ - __pyx_t_2 = __pyx_f_4_nbt_load_string(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_load_string(__pyx_v_ctx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_u = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":633 + /* "_nbt.pyx":605 * if tagID == TAG_STRING: * u = load_string(ctx) * return TAG_String(u) # <<<<<<<<<<<<<< @@ -11679,12 +12090,12 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_LIST: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_u); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_u); __Pyx_GIVEREF(__pyx_v_u); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_String)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_String)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -11692,7 +12103,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n goto __pyx_L0; } - /* "_nbt.pyx":635 + /* "_nbt.pyx":607 * return TAG_String(u) * * if tagID == TAG_LIST: # <<<<<<<<<<<<<< @@ -11702,7 +12113,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_LIST) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":636 + /* "_nbt.pyx":608 * * if tagID == TAG_LIST: * return load_list(ctx) # <<<<<<<<<<<<<< @@ -11710,14 +12121,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_COMPOUND: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4_nbt_load_list(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_load_list(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } - /* "_nbt.pyx":638 + /* "_nbt.pyx":610 * return load_list(ctx) * * if tagID == TAG_COMPOUND: # <<<<<<<<<<<<<< @@ -11727,7 +12138,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_COMPOUND) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":639 + /* "_nbt.pyx":611 * * if tagID == TAG_COMPOUND: * return load_compound(ctx) # <<<<<<<<<<<<<< @@ -11735,14 +12146,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_INT_ARRAY: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4_nbt_load_compound(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_load_compound(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } - /* "_nbt.pyx":641 + /* "_nbt.pyx":613 * return load_compound(ctx) * * if tagID == TAG_INT_ARRAY: # <<<<<<<<<<<<<< @@ -11752,7 +12163,7 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_INT_ARRAY) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":642 + /* "_nbt.pyx":614 * * if tagID == TAG_INT_ARRAY: * return load_array(ctx, TAG_Int_Array) # <<<<<<<<<<<<<< @@ -11760,14 +12171,14 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n * if tagID == TAG_SHORT_ARRAY: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Int_Array))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Int_Array))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } - /* "_nbt.pyx":644 + /* "_nbt.pyx":616 * return load_array(ctx, TAG_Int_Array) * * if tagID == TAG_SHORT_ARRAY: # <<<<<<<<<<<<<< @@ -11777,22 +12188,22 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n __pyx_t_1 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_SHORT_ARRAY) != 0); if (__pyx_t_1) { - /* "_nbt.pyx":645 + /* "_nbt.pyx":617 * * if tagID == TAG_SHORT_ARRAY: * return load_array(ctx, TAG_Short_Array) # <<<<<<<<<<<<<< * - * + * def hexdump(src, length=8): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Short_Array))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_load_array(__pyx_v_ctx, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Short_Array))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } - /* "_nbt.pyx":609 + /* "_nbt.pyx":581 * return require(ctx, length)[:length] * * cdef load_tag(char tagID, load_ctx ctx): # <<<<<<<<<<<<<< @@ -11816,17 +12227,17 @@ static PyObject *__pyx_f_4_nbt_load_tag(char __pyx_v_tagID, struct __pyx_obj_4_n return __pyx_r; } -/* "_nbt.pyx":648 - * +/* "_nbt.pyx":619 + * return load_array(ctx, TAG_Short_Array) * * def hexdump(src, length=8): # <<<<<<<<<<<<<< - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_4_nbt_7hexdump(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_4_nbt_7hexdump = {__Pyx_NAMESTR("hexdump"), (PyCFunction)__pyx_pw_4_nbt_7hexdump, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyMethodDef __pyx_mdef_4_nbt_7hexdump = {"hexdump", (PyCFunction)__pyx_pw_4_nbt_7hexdump, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4_nbt_7hexdump(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_src = 0; PyObject *__pyx_v_length = 0; @@ -11861,7 +12272,7 @@ static PyObject *__pyx_pw_4_nbt_7hexdump(PyObject *__pyx_self, PyObject *__pyx_a } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hexdump") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hexdump") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11876,7 +12287,7 @@ static PyObject *__pyx_pw_4_nbt_7hexdump(PyObject *__pyx_self, PyObject *__pyx_a } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("hexdump", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("hexdump", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_nbt.hexdump", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11904,59 +12315,61 @@ static PyObject *__pyx_pf_4_nbt_6hexdump(CYTHON_UNUSED PyObject *__pyx_self, PyO Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("hexdump", 0); - __Pyx_TraceCall("hexdump", __pyx_f[0], 648); + __Pyx_TraceCall("hexdump", __pyx_f[0], 619); __Pyx_INCREF(__pyx_v_src); - /* "_nbt.pyx":649 + /* "_nbt.pyx":620 * * def hexdump(src, length=8): - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) # <<<<<<<<<<<<<< - * N=0 - * result='' + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) # <<<<<<<<<<<<<< + * N = 0 + * result = '' */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { - if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -11964,143 +12377,143 @@ static PyObject *__pyx_pf_4_nbt_6hexdump(CYTHON_UNUSED PyObject *__pyx_self, PyO } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_x); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Repr(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Repr(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_t_7 == 3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_8) { - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_v_x); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x); - __Pyx_GIVEREF(__pyx_v_x); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __pyx_t_9; - __pyx_t_9 = 0; + __pyx_t_9 = (__pyx_t_8 == 3); + if (!__pyx_t_9) { + goto __pyx_L6_next_or; } else { - __pyx_t_6 = __pyx_t_2; - __pyx_t_2 = 0; - } - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!__pyx_t_8) { - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_s__9); - __pyx_t_2 = __pyx_kp_s__9; + } + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_x); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_x); + __Pyx_GIVEREF(__pyx_v_x); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_9) { + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_2 = __pyx_t_6; - __pyx_t_6 = 0; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_2 = __pyx_t_7; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L5_bool_binop_done; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L6_next_or:; + __Pyx_INCREF(__pyx_kp_s__9); + __pyx_t_2 = __pyx_kp_s__9; + __pyx_L5_bool_binop_done:; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_FILTER = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":650 + /* "_nbt.pyx":621 * def hexdump(src, length=8): - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 # <<<<<<<<<<<<<< - * result='' + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 # <<<<<<<<<<<<<< + * result = '' * while src: */ __Pyx_INCREF(__pyx_int_0); __pyx_v_N = __pyx_int_0; - /* "_nbt.pyx":651 - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 - * result='' # <<<<<<<<<<<<<< + /* "_nbt.pyx":622 + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 + * result = '' # <<<<<<<<<<<<<< * while src: * s, src = src[:length], src[length:] */ __Pyx_INCREF(__pyx_kp_s_); __pyx_v_result = __pyx_kp_s_; - /* "_nbt.pyx":652 - * N=0 - * result='' + /* "_nbt.pyx":623 + * N = 0 + * result = '' * while src: # <<<<<<<<<<<<<< * s, src = src[:length], src[length:] - * hexa = ' '.join(["%02X"%ord(x) for x in s]) + * hexa = ' '.join(["%02X" % ord(x) for x in s]) */ while (1) { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_src); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!__pyx_t_8) break; + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_src); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_9) break; - /* "_nbt.pyx":653 - * result='' + /* "_nbt.pyx":624 + * result = '' * while src: * s, src = src[:length], src[length:] # <<<<<<<<<<<<<< - * hexa = ' '.join(["%02X"%ord(x) for x in s]) + * hexa = ' '.join(["%02X" % ord(x) for x in s]) * s = s.translate(FILTER) */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_src, 0, 0, NULL, &__pyx_v_length, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_src, 0, 0, NULL, &__pyx_v_length, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_src, 0, 0, &__pyx_v_length, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_src, 0, 0, &__pyx_v_length, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_src, __pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":654 + /* "_nbt.pyx":625 * while src: * s, src = src[:length], src[length:] - * hexa = ' '.join(["%02X"%ord(x) for x in s]) # <<<<<<<<<<<<<< + * hexa = ' '.join(["%02X" % ord(x) for x in s]) # <<<<<<<<<<<<<< * s = s.translate(FILTER) * result += "%04X %-*s %s\n" % (N, length * 3, hexa, s) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyList_CheckExact(__pyx_v_s) || PyTuple_CheckExact(__pyx_v_s)) { + if (likely(PyList_CheckExact(__pyx_v_s)) || PyTuple_CheckExact(__pyx_v_s)) { __pyx_t_3 = __pyx_v_s; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_s); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_s); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { - if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -12108,111 +12521,127 @@ static PyObject *__pyx_pf_4_nbt_6hexdump(CYTHON_UNUSED PyObject *__pyx_self, PyO } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_02X, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_02X, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_hexa, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_nbt.pyx":655 + /* "_nbt.pyx":626 * s, src = src[:length], src[length:] - * hexa = ' '.join(["%02X"%ord(x) for x in s]) + * hexa = ' '.join(["%02X" % ord(x) for x in s]) * s = s.translate(FILTER) # <<<<<<<<<<<<<< * result += "%04X %-*s %s\n" % (N, length * 3, hexa, s) - * N+=length + * N += length */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_translate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_FILTER); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_FILTER); - __Pyx_GIVEREF(__pyx_v_FILTER); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + if (!__pyx_t_2) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_FILTER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_v_FILTER); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_FILTER); + __Pyx_GIVEREF(__pyx_v_FILTER); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3); + __pyx_t_3 = 0; - /* "_nbt.pyx":656 - * hexa = ' '.join(["%02X"%ord(x) for x in s]) + /* "_nbt.pyx":627 + * hexa = ' '.join(["%02X" % ord(x) for x in s]) * s = s.translate(FILTER) * result += "%04X %-*s %s\n" % (N, length * 3, hexa, s) # <<<<<<<<<<<<<< - * N+=length + * N += length * return result */ - __pyx_t_2 = PyNumber_Multiply(__pyx_v_length, __pyx_int_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Multiply(__pyx_v_length, __pyx_int_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_N); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_N); __Pyx_GIVEREF(__pyx_v_N); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_hexa); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_hexa); __Pyx_GIVEREF(__pyx_v_hexa); __Pyx_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_04X_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_04X_s_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":657 + /* "_nbt.pyx":628 * s = s.translate(FILTER) * result += "%04X %-*s %s\n" % (N, length * 3, hexa, s) - * N+=length # <<<<<<<<<<<<<< + * N += length # <<<<<<<<<<<<<< * return result * */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_N, __pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_N, __pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_1); __pyx_t_1 = 0; } - /* "_nbt.pyx":658 + /* "_nbt.pyx":629 * result += "%04X %-*s %s\n" % (N, length * 3, hexa, s) - * N+=length + * N += length * return result # <<<<<<<<<<<<<< * - * + * cdef cwrite(obj, char *buf, size_t len): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_nbt.pyx":648 - * + /* "_nbt.pyx":619 + * return load_array(ctx, TAG_Short_Array) * * def hexdump(src, length=8): # <<<<<<<<<<<<<< - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 */ /* function exit code */ @@ -12221,7 +12650,7 @@ static PyObject *__pyx_pf_4_nbt_6hexdump(CYTHON_UNUSED PyObject *__pyx_self, PyO __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_nbt.hexdump", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -12238,8 +12667,8 @@ static PyObject *__pyx_pf_4_nbt_6hexdump(CYTHON_UNUSED PyObject *__pyx_self, PyO return __pyx_r; } -/* "_nbt.pyx":661 - * +/* "_nbt.pyx":631 + * return result * * cdef cwrite(obj, char *buf, size_t len): # <<<<<<<<<<<<<< * #print "cwrite %s %s %d" % (map(ord, buf[:min(4, len)]), buf[:min(4, len)].decode('ascii', 'replace'), len) @@ -12255,24 +12684,24 @@ static PyObject *__pyx_f_4_nbt_cwrite(PyObject *__pyx_v_obj, char *__pyx_v_buf, int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("cwrite", 0); - __Pyx_TraceCall("cwrite", __pyx_f[0], 661); + __Pyx_TraceCall("cwrite", __pyx_f[0], 631); - /* "_nbt.pyx":663 + /* "_nbt.pyx":633 * cdef cwrite(obj, char *buf, size_t len): * #print "cwrite %s %s %d" % (map(ord, buf[:min(4, len)]), buf[:min(4, len)].decode('ascii', 'replace'), len) * return PycStringIO.cwrite(obj, buf, len) # <<<<<<<<<<<<<< * - * + * cdef save_tag_id(char tagID, object buf): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4_nbt_PycStringIO->cwrite(__pyx_v_obj, __pyx_v_buf, __pyx_v_len)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4_nbt_PycStringIO->cwrite(__pyx_v_obj, __pyx_v_buf, __pyx_v_len)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_nbt.pyx":661 - * + /* "_nbt.pyx":631 + * return result * * cdef cwrite(obj, char *buf, size_t len): # <<<<<<<<<<<<<< * #print "cwrite %s %s %d" % (map(ord, buf[:min(4, len)]), buf[:min(4, len)].decode('ascii', 'replace'), len) @@ -12291,8 +12720,8 @@ static PyObject *__pyx_f_4_nbt_cwrite(PyObject *__pyx_v_obj, char *__pyx_v_buf, return __pyx_r; } -/* "_nbt.pyx":666 - * +/* "_nbt.pyx":635 + * return PycStringIO.cwrite(obj, buf, len) * * cdef save_tag_id(char tagID, object buf): # <<<<<<<<<<<<<< * cwrite(buf, &tagID, 1) @@ -12308,21 +12737,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_id(char __pyx_v_tagID, PyObject *__pyx_v int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_tag_id", 0); - __Pyx_TraceCall("save_tag_id", __pyx_f[0], 666); + __Pyx_TraceCall("save_tag_id", __pyx_f[0], 635); - /* "_nbt.pyx":667 + /* "_nbt.pyx":636 * * cdef save_tag_id(char tagID, object buf): * cwrite(buf, &tagID, 1) # <<<<<<<<<<<<<< * - * + * cdef save_tag_name(TAG_Value tag, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, (&__pyx_v_tagID), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, (&__pyx_v_tagID), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":666 - * + /* "_nbt.pyx":635 + * return PycStringIO.cwrite(obj, buf, len) * * cdef save_tag_id(char tagID, object buf): # <<<<<<<<<<<<<< * cwrite(buf, &tagID, 1) @@ -12343,8 +12772,8 @@ static PyObject *__pyx_f_4_nbt_save_tag_id(char __pyx_v_tagID, PyObject *__pyx_v return __pyx_r; } -/* "_nbt.pyx":670 - * +/* "_nbt.pyx":638 + * cwrite(buf, &tagID, 1) * * cdef save_tag_name(TAG_Value tag, object buf): # <<<<<<<<<<<<<< * IF UNICODE_NAMES: @@ -12361,24 +12790,24 @@ static PyObject *__pyx_f_4_nbt_save_tag_name(struct __pyx_obj_4_nbt_TAG_Value *_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_tag_name", 0); - __Pyx_TraceCall("save_tag_name", __pyx_f[0], 670); + __Pyx_TraceCall("save_tag_name", __pyx_f[0], 638); - /* "_nbt.pyx":675 + /* "_nbt.pyx":643 * save_string(name.encode('utf-8'), buf) * ELSE: * save_string(tag._name, buf) # <<<<<<<<<<<<<< * - * + * cdef save_string(bytes value, object buf): */ __pyx_t_1 = __pyx_v_tag->_name; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4_nbt_save_string(((PyObject*)__pyx_t_1), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4_nbt_save_string(((PyObject*)__pyx_t_1), __pyx_v_buf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":670 - * + /* "_nbt.pyx":638 + * cwrite(buf, &tagID, 1) * * cdef save_tag_name(TAG_Value tag, object buf): # <<<<<<<<<<<<<< * IF UNICODE_NAMES: @@ -12400,12 +12829,12 @@ static PyObject *__pyx_f_4_nbt_save_tag_name(struct __pyx_obj_4_nbt_TAG_Value *_ return __pyx_r; } -/* "_nbt.pyx":678 - * +/* "_nbt.pyx":645 + * save_string(tag._name, buf) * * cdef save_string(bytes value, object buf): # <<<<<<<<<<<<<< - * cdef short length = len(value) - * cdef char * s = value + * cdef short length = len(value) + * cdef char *s = value */ static PyObject *__pyx_f_4_nbt_save_string(PyObject *__pyx_v_value, PyObject *__pyx_v_buf) { @@ -12421,76 +12850,76 @@ static PyObject *__pyx_f_4_nbt_save_string(PyObject *__pyx_v_value, PyObject *__ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_string", 0); - __Pyx_TraceCall("save_string", __pyx_f[0], 678); + __Pyx_TraceCall("save_string", __pyx_f[0], 645); - /* "_nbt.pyx":679 + /* "_nbt.pyx":646 * * cdef save_string(bytes value, object buf): - * cdef short length = len(value) # <<<<<<<<<<<<<< - * cdef char * s = value + * cdef short length = len(value) # <<<<<<<<<<<<<< + * cdef char *s = value * swab(&length, 2) */ if (unlikely(__pyx_v_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_length = ((short)__pyx_t_1); - /* "_nbt.pyx":680 + /* "_nbt.pyx":647 * cdef save_string(bytes value, object buf): - * cdef short length = len(value) - * cdef char * s = value # <<<<<<<<<<<<<< + * cdef short length = len(value) + * cdef char *s = value # <<<<<<<<<<<<<< * swab(&length, 2) * cwrite(buf, &length, 2) */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s = __pyx_t_2; - /* "_nbt.pyx":681 - * cdef short length = len(value) - * cdef char * s = value + /* "_nbt.pyx":648 + * cdef short length = len(value) + * cdef char *s = value * swab(&length, 2) # <<<<<<<<<<<<<< * cwrite(buf, &length, 2) * cwrite(buf, s, len(value)) */ - __pyx_t_3 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_swab((&__pyx_v_length), 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":682 - * cdef char * s = value + /* "_nbt.pyx":649 + * cdef char *s = value * swab(&length, 2) * cwrite(buf, &length, 2) # <<<<<<<<<<<<<< * cwrite(buf, s, len(value)) * */ - __pyx_t_3 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_length)), 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_length)), 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":683 + /* "_nbt.pyx":650 * swab(&length, 2) * cwrite(buf, &length, 2) * cwrite(buf, s, len(value)) # <<<<<<<<<<<<<< * - * + * cdef save_array(object value, object buf, char size): */ if (unlikely(__pyx_v_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, __pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, __pyx_v_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_nbt.pyx":678 - * + /* "_nbt.pyx":645 + * save_string(tag._name, buf) * * cdef save_string(bytes value, object buf): # <<<<<<<<<<<<<< - * cdef short length = len(value) - * cdef char * s = value + * cdef short length = len(value) + * cdef char *s = value */ /* function exit code */ @@ -12507,12 +12936,12 @@ static PyObject *__pyx_f_4_nbt_save_string(PyObject *__pyx_v_value, PyObject *__ return __pyx_r; } -/* "_nbt.pyx":686 - * +/* "_nbt.pyx":652 + * cwrite(buf, s, len(value)) * * cdef save_array(object value, object buf, char size): # <<<<<<<<<<<<<< * value = value.tostring() - * cdef char * s = value + * cdef char *s = value */ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__pyx_v_buf, char __pyx_v_size) { @@ -12522,51 +12951,67 @@ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__p __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - char *__pyx_t_3; - Py_ssize_t __pyx_t_4; - int __pyx_t_5; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_array", 0); - __Pyx_TraceCall("save_array", __pyx_f[0], 686); + __Pyx_TraceCall("save_array", __pyx_f[0], 652); __Pyx_INCREF(__pyx_v_value); - /* "_nbt.pyx":687 + /* "_nbt.pyx":653 * * cdef save_array(object value, object buf, char size): * value = value.tostring() # <<<<<<<<<<<<<< - * cdef char * s = value - * cdef int length = len(value) / size + * cdef char *s = value + * cdef int length = len(value) / size */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_3 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_3) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); + __pyx_t_1 = 0; - /* "_nbt.pyx":688 + /* "_nbt.pyx":654 * cdef save_array(object value, object buf, char size): * value = value.tostring() - * cdef char * s = value # <<<<<<<<<<<<<< - * cdef int length = len(value) / size + * cdef char *s = value # <<<<<<<<<<<<<< + * cdef int length = len(value) / size * swab(&length, 4) */ - __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_s = __pyx_t_3; + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_s = __pyx_t_4; - /* "_nbt.pyx":689 + /* "_nbt.pyx":655 * value = value.tostring() - * cdef char * s = value - * cdef int length = len(value) / size # <<<<<<<<<<<<<< + * cdef char *s = value + * cdef int length = len(value) / size # <<<<<<<<<<<<<< * swab(&length, 4) * cwrite(buf, &length, 4) */ - __pyx_t_4 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = ((int)__pyx_t_4); + __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((int)__pyx_t_5); if (unlikely(__pyx_v_size == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); @@ -12575,9 +13020,9 @@ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__p #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - else if (sizeof(int) == sizeof(long) && (!(((char)-1) > 0)) && unlikely(__pyx_v_size == (char)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_5))) { + else if (sizeof(int) == sizeof(long) && (!(((char)-1) > 0)) && unlikely(__pyx_v_size == (char)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_6))) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif @@ -12585,50 +13030,50 @@ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__p #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_v_length = __Pyx_div_int(__pyx_t_5, __pyx_v_size); + __pyx_v_length = __Pyx_div_int(__pyx_t_6, __pyx_v_size); - /* "_nbt.pyx":690 - * cdef char * s = value - * cdef int length = len(value) / size + /* "_nbt.pyx":656 + * cdef char *s = value + * cdef int length = len(value) / size * swab(&length, 4) # <<<<<<<<<<<<<< * cwrite(buf, &length, 4) * cwrite(buf, s, len(value)) */ - __pyx_t_2 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_length), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":691 - * cdef int length = len(value) / size + /* "_nbt.pyx":657 + * cdef int length = len(value) / size * swab(&length, 4) * cwrite(buf, &length, 4) # <<<<<<<<<<<<<< * cwrite(buf, s, len(value)) * */ - __pyx_t_2 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_length)), 4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_length)), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":692 + /* "_nbt.pyx":658 * swab(&length, 4) * cwrite(buf, &length, 4) * cwrite(buf, s, len(value)) # <<<<<<<<<<<<<< * - * + * cdef save_byte(char value, object buf): */ - __pyx_t_4 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, __pyx_v_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, __pyx_v_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":686 - * + /* "_nbt.pyx":652 + * cwrite(buf, s, len(value)) * * cdef save_array(object value, object buf, char size): # <<<<<<<<<<<<<< * value = value.tostring() - * cdef char * s = value + * cdef char *s = value */ /* function exit code */ @@ -12637,6 +13082,7 @@ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__p __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_nbt.save_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -12647,8 +13093,8 @@ static PyObject *__pyx_f_4_nbt_save_array(PyObject *__pyx_v_value, PyObject *__p return __pyx_r; } -/* "_nbt.pyx":695 - * +/* "_nbt.pyx":660 + * cwrite(buf, s, len(value)) * * cdef save_byte(char value, object buf): # <<<<<<<<<<<<<< * cwrite(buf, &value, 1) @@ -12664,21 +13110,21 @@ static PyObject *__pyx_f_4_nbt_save_byte(char __pyx_v_value, PyObject *__pyx_v_b int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_byte", 0); - __Pyx_TraceCall("save_byte", __pyx_f[0], 695); + __Pyx_TraceCall("save_byte", __pyx_f[0], 660); - /* "_nbt.pyx":696 + /* "_nbt.pyx":661 * * cdef save_byte(char value, object buf): * cwrite(buf, &value, 1) # <<<<<<<<<<<<<< * - * + * cdef save_short(short value, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":695 - * + /* "_nbt.pyx":660 + * cwrite(buf, s, len(value)) * * cdef save_byte(char value, object buf): # <<<<<<<<<<<<<< * cwrite(buf, &value, 1) @@ -12699,8 +13145,8 @@ static PyObject *__pyx_f_4_nbt_save_byte(char __pyx_v_value, PyObject *__pyx_v_b return __pyx_r; } -/* "_nbt.pyx":699 - * +/* "_nbt.pyx":663 + * cwrite(buf, &value, 1) * * cdef save_short(short value, object buf): # <<<<<<<<<<<<<< * swab(&value, 2) @@ -12716,32 +13162,32 @@ static PyObject *__pyx_f_4_nbt_save_short(short __pyx_v_value, PyObject *__pyx_v int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_short", 0); - __Pyx_TraceCall("save_short", __pyx_f[0], 699); + __Pyx_TraceCall("save_short", __pyx_f[0], 663); - /* "_nbt.pyx":700 + /* "_nbt.pyx":664 * * cdef save_short(short value, object buf): * swab(&value, 2) # <<<<<<<<<<<<<< * cwrite(buf, &value, 2) * */ - __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":701 + /* "_nbt.pyx":665 * cdef save_short(short value, object buf): * swab(&value, 2) * cwrite(buf, &value, 2) # <<<<<<<<<<<<<< * - * + * cdef save_int(int value, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":699 - * + /* "_nbt.pyx":663 + * cwrite(buf, &value, 1) * * cdef save_short(short value, object buf): # <<<<<<<<<<<<<< * swab(&value, 2) @@ -12762,8 +13208,8 @@ static PyObject *__pyx_f_4_nbt_save_short(short __pyx_v_value, PyObject *__pyx_v return __pyx_r; } -/* "_nbt.pyx":704 - * +/* "_nbt.pyx":667 + * cwrite(buf, &value, 2) * * cdef save_int(int value, object buf): # <<<<<<<<<<<<<< * swab(&value, 4) @@ -12779,32 +13225,32 @@ static PyObject *__pyx_f_4_nbt_save_int(int __pyx_v_value, PyObject *__pyx_v_buf int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_int", 0); - __Pyx_TraceCall("save_int", __pyx_f[0], 704); + __Pyx_TraceCall("save_int", __pyx_f[0], 667); - /* "_nbt.pyx":705 + /* "_nbt.pyx":668 * * cdef save_int(int value, object buf): * swab(&value, 4) # <<<<<<<<<<<<<< * cwrite(buf, &value, 4) * */ - __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":706 + /* "_nbt.pyx":669 * cdef save_int(int value, object buf): * swab(&value, 4) * cwrite(buf, &value, 4) # <<<<<<<<<<<<<< * - * + * cdef save_long(long long value, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":704 - * + /* "_nbt.pyx":667 + * cwrite(buf, &value, 2) * * cdef save_int(int value, object buf): # <<<<<<<<<<<<<< * swab(&value, 4) @@ -12825,8 +13271,8 @@ static PyObject *__pyx_f_4_nbt_save_int(int __pyx_v_value, PyObject *__pyx_v_buf return __pyx_r; } -/* "_nbt.pyx":709 - * +/* "_nbt.pyx":671 + * cwrite(buf, &value, 4) * * cdef save_long(long long value, object buf): # <<<<<<<<<<<<<< * swab(&value, 8) @@ -12842,32 +13288,32 @@ static PyObject *__pyx_f_4_nbt_save_long(PY_LONG_LONG __pyx_v_value, PyObject *_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_long", 0); - __Pyx_TraceCall("save_long", __pyx_f[0], 709); + __Pyx_TraceCall("save_long", __pyx_f[0], 671); - /* "_nbt.pyx":710 + /* "_nbt.pyx":672 * * cdef save_long(long long value, object buf): * swab(&value, 8) # <<<<<<<<<<<<<< * cwrite(buf, &value, 8) * */ - __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":711 + /* "_nbt.pyx":673 * cdef save_long(long long value, object buf): * swab(&value, 8) * cwrite(buf, &value, 8) # <<<<<<<<<<<<<< * - * + * cdef save_float(float value, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":709 - * + /* "_nbt.pyx":671 + * cwrite(buf, &value, 4) * * cdef save_long(long long value, object buf): # <<<<<<<<<<<<<< * swab(&value, 8) @@ -12888,8 +13334,8 @@ static PyObject *__pyx_f_4_nbt_save_long(PY_LONG_LONG __pyx_v_value, PyObject *_ return __pyx_r; } -/* "_nbt.pyx":714 - * +/* "_nbt.pyx":675 + * cwrite(buf, &value, 8) * * cdef save_float(float value, object buf): # <<<<<<<<<<<<<< * swab(&value, 4) @@ -12905,32 +13351,32 @@ static PyObject *__pyx_f_4_nbt_save_float(float __pyx_v_value, PyObject *__pyx_v int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_float", 0); - __Pyx_TraceCall("save_float", __pyx_f[0], 714); + __Pyx_TraceCall("save_float", __pyx_f[0], 675); - /* "_nbt.pyx":715 + /* "_nbt.pyx":676 * * cdef save_float(float value, object buf): * swab(&value, 4) # <<<<<<<<<<<<<< * cwrite(buf, &value, 4) * */ - __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":716 + /* "_nbt.pyx":677 * cdef save_float(float value, object buf): * swab(&value, 4) * cwrite(buf, &value, 4) # <<<<<<<<<<<<<< * - * + * cdef save_double(double value, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":714 - * + /* "_nbt.pyx":675 + * cwrite(buf, &value, 8) * * cdef save_float(float value, object buf): # <<<<<<<<<<<<<< * swab(&value, 4) @@ -12951,8 +13397,8 @@ static PyObject *__pyx_f_4_nbt_save_float(float __pyx_v_value, PyObject *__pyx_v return __pyx_r; } -/* "_nbt.pyx":719 - * +/* "_nbt.pyx":679 + * cwrite(buf, &value, 4) * * cdef save_double(double value, object buf): # <<<<<<<<<<<<<< * swab(&value, 8) @@ -12968,32 +13414,32 @@ static PyObject *__pyx_f_4_nbt_save_double(double __pyx_v_value, PyObject *__pyx int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_double", 0); - __Pyx_TraceCall("save_double", __pyx_f[0], 719); + __Pyx_TraceCall("save_double", __pyx_f[0], 679); - /* "_nbt.pyx":720 + /* "_nbt.pyx":680 * * cdef save_double(double value, object buf): * swab(&value, 8) # <<<<<<<<<<<<<< * cwrite(buf, &value, 8) * */ - __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_swab((&__pyx_v_value), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":721 + /* "_nbt.pyx":681 * cdef save_double(double value, object buf): * swab(&value, 8) * cwrite(buf, &value, 8) # <<<<<<<<<<<<<< * - * + * cdef save_tag_value(TAG_Value tag, object buf): */ - __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4_nbt_cwrite(__pyx_v_buf, ((char *)(&__pyx_v_value)), 8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":719 - * + /* "_nbt.pyx":679 + * cwrite(buf, &value, 4) * * cdef save_double(double value, object buf): # <<<<<<<<<<<<<< * swab(&value, 8) @@ -13014,8 +13460,8 @@ static PyObject *__pyx_f_4_nbt_save_double(double __pyx_v_value, PyObject *__pyx return __pyx_r; } -/* "_nbt.pyx":724 - * +/* "_nbt.pyx":683 + * cwrite(buf, &value, 8) * * cdef save_tag_value(TAG_Value tag, object buf): # <<<<<<<<<<<<<< * cdef char tagID = tag.tagID @@ -13034,9 +13480,9 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("save_tag_value", 0); - __Pyx_TraceCall("save_tag_value", __pyx_f[0], 724); + __Pyx_TraceCall("save_tag_value", __pyx_f[0], 683); - /* "_nbt.pyx":725 + /* "_nbt.pyx":684 * * cdef save_tag_value(TAG_Value tag, object buf): * cdef char tagID = tag.tagID # <<<<<<<<<<<<<< @@ -13046,7 +13492,7 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_1 = __pyx_v_tag->tagID; __pyx_v_tagID = __pyx_t_1; - /* "_nbt.pyx":726 + /* "_nbt.pyx":685 * cdef save_tag_value(TAG_Value tag, object buf): * cdef char tagID = tag.tagID * if tagID == TAG_BYTE: # <<<<<<<<<<<<<< @@ -13056,21 +13502,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_BYTE) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":727 + /* "_nbt.pyx":686 * cdef char tagID = tag.tagID * if tagID == TAG_BYTE: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_SHORT: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Byte *)((struct __pyx_obj_4_nbt_TAG_Byte *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Byte *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Byte *)((struct __pyx_obj_4_nbt_TAG_Byte *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Byte *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "_nbt.pyx":729 + /* "_nbt.pyx":688 * ( tag).save_value(buf) * * if tagID == TAG_SHORT: # <<<<<<<<<<<<<< @@ -13080,21 +13526,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_SHORT) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":730 + /* "_nbt.pyx":689 * * if tagID == TAG_SHORT: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_INT: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Short *)((struct __pyx_obj_4_nbt_TAG_Short *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Short *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Short *)((struct __pyx_obj_4_nbt_TAG_Short *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Short *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4; } __pyx_L4:; - /* "_nbt.pyx":732 + /* "_nbt.pyx":691 * ( tag).save_value(buf) * * if tagID == TAG_INT: # <<<<<<<<<<<<<< @@ -13104,21 +13550,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_INT) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":733 + /* "_nbt.pyx":692 * * if tagID == TAG_INT: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_LONG: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int *)((struct __pyx_obj_4_nbt_TAG_Int *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int *)((struct __pyx_obj_4_nbt_TAG_Int *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L5; } __pyx_L5:; - /* "_nbt.pyx":735 + /* "_nbt.pyx":694 * ( tag).save_value(buf) * * if tagID == TAG_LONG: # <<<<<<<<<<<<<< @@ -13128,21 +13574,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_LONG) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":736 + /* "_nbt.pyx":695 * * if tagID == TAG_LONG: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_FLOAT: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Long *)((struct __pyx_obj_4_nbt_TAG_Long *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Long *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Long *)((struct __pyx_obj_4_nbt_TAG_Long *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Long *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } __pyx_L6:; - /* "_nbt.pyx":738 + /* "_nbt.pyx":697 * ( tag).save_value(buf) * * if tagID == TAG_FLOAT: # <<<<<<<<<<<<<< @@ -13152,21 +13598,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_FLOAT) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":739 + /* "_nbt.pyx":698 * * if tagID == TAG_FLOAT: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_DOUBLE: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Float *)((struct __pyx_obj_4_nbt_TAG_Float *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Float *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Float *)((struct __pyx_obj_4_nbt_TAG_Float *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Float *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7; } __pyx_L7:; - /* "_nbt.pyx":741 + /* "_nbt.pyx":700 * ( tag).save_value(buf) * * if tagID == TAG_DOUBLE: # <<<<<<<<<<<<<< @@ -13176,21 +13622,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_DOUBLE) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":742 + /* "_nbt.pyx":701 * * if tagID == TAG_DOUBLE: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_BYTE_ARRAY: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Double *)((struct __pyx_obj_4_nbt_TAG_Double *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Double *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Double *)((struct __pyx_obj_4_nbt_TAG_Double *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Double *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8; } __pyx_L8:; - /* "_nbt.pyx":744 + /* "_nbt.pyx":703 * ( tag).save_value(buf) * * if tagID == TAG_BYTE_ARRAY: # <<<<<<<<<<<<<< @@ -13200,21 +13646,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_BYTE_ARRAY) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":745 + /* "_nbt.pyx":704 * * if tagID == TAG_BYTE_ARRAY: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_STRING: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Byte_Array *)((struct __pyx_obj_4_nbt_TAG_Byte_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Byte_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Byte_Array *)((struct __pyx_obj_4_nbt_TAG_Byte_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Byte_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9; } __pyx_L9:; - /* "_nbt.pyx":747 + /* "_nbt.pyx":706 * ( tag).save_value(buf) * * if tagID == TAG_STRING: # <<<<<<<<<<<<<< @@ -13224,21 +13670,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_STRING) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":748 + /* "_nbt.pyx":707 * * if tagID == TAG_STRING: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_LIST: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_String *)((struct __pyx_obj_4_nbt_TAG_String *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_String *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_String *)((struct __pyx_obj_4_nbt_TAG_String *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_String *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L10; } __pyx_L10:; - /* "_nbt.pyx":750 + /* "_nbt.pyx":709 * ( tag).save_value(buf) * * if tagID == TAG_LIST: # <<<<<<<<<<<<<< @@ -13248,21 +13694,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_LIST) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":751 + /* "_nbt.pyx":710 * * if tagID == TAG_LIST: * (<_TAG_List> tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_COMPOUND: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt__TAG_List *)((struct __pyx_obj_4_nbt__TAG_List *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt__TAG_List *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt__TAG_List *)((struct __pyx_obj_4_nbt__TAG_List *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt__TAG_List *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L11; } __pyx_L11:; - /* "_nbt.pyx":753 + /* "_nbt.pyx":712 * (<_TAG_List> tag).save_value(buf) * * if tagID == TAG_COMPOUND: # <<<<<<<<<<<<<< @@ -13272,21 +13718,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_COMPOUND) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":754 + /* "_nbt.pyx":713 * * if tagID == TAG_COMPOUND: * (<_TAG_Compound> tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_INT_ARRAY: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt__TAG_Compound *)((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt__TAG_Compound *)((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt__TAG_Compound *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L12; } __pyx_L12:; - /* "_nbt.pyx":756 + /* "_nbt.pyx":715 * (<_TAG_Compound> tag).save_value(buf) * * if tagID == TAG_INT_ARRAY: # <<<<<<<<<<<<<< @@ -13296,21 +13742,21 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_INT_ARRAY) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":757 + /* "_nbt.pyx":716 * * if tagID == TAG_INT_ARRAY: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * * if tagID == TAG_SHORT_ARRAY: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int_Array *)((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int_Array *)((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L13; } __pyx_L13:; - /* "_nbt.pyx":759 + /* "_nbt.pyx":718 * ( tag).save_value(buf) * * if tagID == TAG_SHORT_ARRAY: # <<<<<<<<<<<<<< @@ -13320,22 +13766,22 @@ static PyObject *__pyx_f_4_nbt_save_tag_value(struct __pyx_obj_4_nbt_TAG_Value * __pyx_t_2 = ((__pyx_v_tagID == __pyx_v_4_nbt_TAG_SHORT_ARRAY) != 0); if (__pyx_t_2) { - /* "_nbt.pyx":760 + /* "_nbt.pyx":719 * * if tagID == TAG_SHORT_ARRAY: * ( tag).save_value(buf) # <<<<<<<<<<<<<< * - * + * tag_classes = {TAG().tagID: TAG for TAG in (TAG_Byte, TAG_Short, TAG_Int, TAG_Long, TAG_Float, TAG_Double, TAG_String, */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int_Array *)((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4_nbt_TAG_Int_Array *)((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag)->__pyx_vtab)->save_value(((struct __pyx_obj_4_nbt_TAG_Int_Array *)__pyx_v_tag), __pyx_v_buf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L14; } __pyx_L14:; - /* "_nbt.pyx":724 - * + /* "_nbt.pyx":683 + * cwrite(buf, &value, 8) * * cdef save_tag_value(TAG_Value tag, object buf): # <<<<<<<<<<<<<< * cdef char tagID = tag.tagID @@ -13410,7 +13856,7 @@ static int __pyx_setprop_4_nbt_9TAG_Value_tagID(PyObject *o, PyObject *v, CYTHON } static PyMethodDef __pyx_methods_4_nbt_TAG_Value[] = { - {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_4_nbt_9TAG_Value_5__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {"__reduce__", (PyCFunction)__pyx_pw_4_nbt_9TAG_Value_5__reduce__, METH_NOARGS, 0}, {0, 0, 0, 0} }; @@ -13422,7 +13868,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Value[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Value = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Value"), /*tp_name*/ + "_nbt.TAG_Value", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Value), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13471,9 +13917,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Value = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -13514,7 +13958,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Byte[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Byte = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Byte"), /*tp_name*/ + "_nbt.TAG_Byte", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Byte), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13571,9 +14015,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Byte = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -13614,7 +14056,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Short[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Short = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Short"), /*tp_name*/ + "_nbt.TAG_Short", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Short), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13671,9 +14113,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Short = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -13714,7 +14154,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Int[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Int = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Int"), /*tp_name*/ + "_nbt.TAG_Int", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Int), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13771,9 +14211,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Int = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -13814,7 +14252,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Long[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Long = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Long"), /*tp_name*/ + "_nbt.TAG_Long", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Long), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13871,9 +14309,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Long = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -13914,7 +14350,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Float[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Float = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Float"), /*tp_name*/ + "_nbt.TAG_Float", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Float), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -13971,9 +14407,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Float = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14014,7 +14448,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Double[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Double = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Double"), /*tp_name*/ + "_nbt.TAG_Double", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Double), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Value, /*tp_dealloc*/ @@ -14071,9 +14505,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Double = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14150,7 +14582,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Byte_Array[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Byte_Array = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Byte_Array"), /*tp_name*/ + "_nbt.TAG_Byte_Array", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Byte_Array), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Byte_Array, /*tp_dealloc*/ @@ -14203,9 +14635,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Byte_Array = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14282,7 +14712,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Int_Array[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Int_Array = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Int_Array"), /*tp_name*/ + "_nbt.TAG_Int_Array", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Int_Array), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Int_Array, /*tp_dealloc*/ @@ -14339,9 +14769,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Int_Array = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14418,7 +14846,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_Short_Array[] = { static PyTypeObject __pyx_type_4_nbt_TAG_Short_Array = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_Short_Array"), /*tp_name*/ + "_nbt.TAG_Short_Array", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_Short_Array), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_Short_Array, /*tp_dealloc*/ @@ -14475,9 +14903,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_Short_Array = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14530,7 +14956,7 @@ static struct PyGetSetDef __pyx_getsets_4_nbt_TAG_String[] = { static PyTypeObject __pyx_type_4_nbt_TAG_String = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.TAG_String"), /*tp_name*/ + "_nbt.TAG_String", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_TAG_String), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_TAG_String, /*tp_dealloc*/ @@ -14587,9 +15013,7 @@ static PyTypeObject __pyx_type_4_nbt_TAG_String = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14686,8 +15110,8 @@ static int __pyx_setprop_4_nbt_9_TAG_List_list_type(PyObject *o, PyObject *v, CY } static PyMethodDef __pyx_methods_4_nbt__TAG_List[] = { - {__Pyx_NAMESTR("check_tag"), (PyCFunction)__pyx_pw_4_nbt_9_TAG_List_5check_tag, METH_O, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4_nbt_9_TAG_List_15insert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, + {"check_tag", (PyCFunction)__pyx_pw_4_nbt_9_TAG_List_5check_tag, METH_O, 0}, + {"insert", (PyCFunction)__pyx_pw_4_nbt_9_TAG_List_15insert, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -14718,7 +15142,7 @@ static PyMappingMethods __pyx_tp_as_mapping__TAG_List = { static PyTypeObject __pyx_type_4_nbt__TAG_List = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt._TAG_List"), /*tp_name*/ + "_nbt._TAG_List", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt__TAG_List), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt__TAG_List, /*tp_dealloc*/ @@ -14771,9 +15195,7 @@ static PyTypeObject __pyx_type_4_nbt__TAG_List = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14856,9 +15278,9 @@ static int __pyx_setprop_4_nbt_13_TAG_Compound_value(PyObject *o, PyObject *v, C } static PyMethodDef __pyx_methods_4_nbt__TAG_Compound[] = { - {__Pyx_NAMESTR("add"), (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_18add, METH_O, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("get_all"), (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_20get_all, METH_O, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("save"), (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_22save, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4_nbt_13_TAG_Compound_21save)}, + {"add", (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_18add, METH_O, 0}, + {"get_all", (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_20get_all, METH_O, 0}, + {"save", (PyCFunction)__pyx_pw_4_nbt_13_TAG_Compound_22save, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4_nbt_13_TAG_Compound_21save}, {0, 0, 0, 0} }; @@ -14888,7 +15310,7 @@ static PyMappingMethods __pyx_tp_as_mapping__TAG_Compound = { static PyTypeObject __pyx_type_4_nbt__TAG_Compound = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt._TAG_Compound"), /*tp_name*/ + "_nbt._TAG_Compound", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt__TAG_Compound), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt__TAG_Compound, /*tp_dealloc*/ @@ -14941,9 +15363,7 @@ static PyTypeObject __pyx_type_4_nbt__TAG_Compound = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -14971,7 +15391,7 @@ static void __pyx_tp_dealloc_4_nbt_load_ctx(PyObject *o) { static PyTypeObject __pyx_type_4_nbt_load_ctx = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.load_ctx"), /*tp_name*/ + "_nbt.load_ctx", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt_load_ctx), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt_load_ctx, /*tp_dealloc*/ @@ -15020,9 +15440,7 @@ static PyTypeObject __pyx_type_4_nbt_load_ctx = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -15033,7 +15451,7 @@ static int __pyx_freecount_4_nbt___pyx_scope_struct____iter__ = 0; static PyObject *__pyx_tp_new_4_nbt___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4_nbt___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__)))) { + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4_nbt___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__)))) { o = (PyObject*)__pyx_freelist_4_nbt___pyx_scope_struct____iter__[--__pyx_freecount_4_nbt___pyx_scope_struct____iter__]; memset(o, 0, sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__)); (void) PyObject_INIT(o, t); @@ -15051,7 +15469,7 @@ static void __pyx_tp_dealloc_4_nbt___pyx_scope_struct____iter__(PyObject *o) { Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_v); Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4_nbt___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__))) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4_nbt___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__)))) { __pyx_freelist_4_nbt___pyx_scope_struct____iter__[__pyx_freecount_4_nbt___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4_nbt___pyx_scope_struct____iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); @@ -15090,7 +15508,7 @@ static int __pyx_tp_clear_4_nbt___pyx_scope_struct____iter__(PyObject *o) { static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.__pyx_scope_struct____iter__"), /*tp_name*/ + "_nbt.__pyx_scope_struct____iter__", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt___pyx_scope_struct____iter__, /*tp_dealloc*/ @@ -15139,9 +15557,7 @@ static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct____iter__ = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -15152,7 +15568,7 @@ static int __pyx_freecount_4_nbt___pyx_scope_struct_1___contains__ = 0; static PyObject *__pyx_tp_new_4_nbt___pyx_scope_struct_1___contains__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__)))) { + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__)))) { o = (PyObject*)__pyx_freelist_4_nbt___pyx_scope_struct_1___contains__[--__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__]; memset(o, 0, sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__)); (void) PyObject_INIT(o, t); @@ -15169,7 +15585,7 @@ static void __pyx_tp_dealloc_4_nbt___pyx_scope_struct_1___contains__(PyObject *o PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_k); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__))) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__)))) { __pyx_freelist_4_nbt___pyx_scope_struct_1___contains__[__pyx_freecount_4_nbt___pyx_scope_struct_1___contains__++] = ((struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); @@ -15202,7 +15618,7 @@ static int __pyx_tp_clear_4_nbt___pyx_scope_struct_1___contains__(PyObject *o) { static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct_1___contains__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.__pyx_scope_struct_1___contains__"), /*tp_name*/ + "_nbt.__pyx_scope_struct_1___contains__", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_1___contains__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt___pyx_scope_struct_1___contains__, /*tp_dealloc*/ @@ -15251,9 +15667,7 @@ static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct_1___contains__ = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -15264,7 +15678,7 @@ static int __pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_tp_new_4_nbt___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr)))) { + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr)))) { o = (PyObject*)__pyx_freelist_4_nbt___pyx_scope_struct_2_genexpr[--__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr)); (void) PyObject_INIT(o, t); @@ -15282,7 +15696,7 @@ static void __pyx_tp_dealloc_4_nbt___pyx_scope_struct_2_genexpr(PyObject *o) { Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_tag); Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr))) { + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr)))) { __pyx_freelist_4_nbt___pyx_scope_struct_2_genexpr[__pyx_freecount_4_nbt___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); @@ -15321,7 +15735,7 @@ static int __pyx_tp_clear_4_nbt___pyx_scope_struct_2_genexpr(PyObject *o) { static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_nbt.__pyx_scope_struct_2_genexpr"), /*tp_name*/ + "_nbt.__pyx_scope_struct_2_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_4_nbt___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_4_nbt___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ @@ -15370,9 +15784,7 @@ static PyTypeObject __pyx_type_4_nbt___pyx_scope_struct_2_genexpr = { 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ - #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ - #endif #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif @@ -15389,8 +15801,8 @@ static struct PyModuleDef __pyx_moduledef = { #else PyModuleDef_HEAD_INIT, #endif - __Pyx_NAMESTR("_nbt"), - __Pyx_DOCSTR(__pyx_k_Cython_implementation_Named_Bin), /* m_doc */ + "_nbt", + __pyx_k_Cython_implementation_Named_Bin, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ @@ -15405,7 +15817,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_02X, __pyx_k_02X, sizeof(__pyx_k_02X), 0, 0, 1, 0}, {&__pyx_kp_s_04X_s_s, __pyx_k_04X_s_s, sizeof(__pyx_k_04X_s_s), 0, 0, 1, 0}, {&__pyx_kp_s_Asked_to_save_TAG_List_with_diff, __pyx_k_Asked_to_save_TAG_List_with_diff, sizeof(__pyx_k_Asked_to_save_TAG_List_with_diff), 0, 0, 1, 0}, - {&__pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde, __pyx_k_C_Users_Kris_Desktop_Tal_s_Folde, sizeof(__pyx_k_C_Users_Kris_Desktop_Tal_s_Folde), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_add_unnamed_tag_to_TAG_Co, __pyx_k_Cannot_add_unnamed_tag_to_TAG_Co, sizeof(__pyx_k_Cannot_add_unnamed_tag_to_TAG_Co), 0, 0, 1, 0}, {&__pyx_n_s_FILTER, __pyx_k_FILTER, sizeof(__pyx_k_FILTER), 0, 0, 1, 1}, {&__pyx_n_s_GzipFile, __pyx_k_GzipFile, sizeof(__pyx_k_GzipFile), 0, 0, 1, 1}, @@ -15423,6 +15834,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Not_an_NBT_file_with_a_root_TAG, __pyx_k_Not_an_NBT_file_with_a_root_TAG, sizeof(__pyx_k_Not_an_NBT_file_with_a_root_TAG), 0, 0, 1, 0}, {&__pyx_n_s_StringIO, __pyx_k_StringIO, sizeof(__pyx_k_StringIO), 0, 0, 1, 1}, {&__pyx_n_s_TAG_Compound, __pyx_k_TAG_Compound, sizeof(__pyx_k_TAG_Compound), 0, 0, 1, 1}, + {&__pyx_n_s_TAG_Compound___iter, __pyx_k_TAG_Compound___iter, sizeof(__pyx_k_TAG_Compound___iter), 0, 0, 1, 1}, {&__pyx_n_s_TAG_List, __pyx_k_TAG_List, sizeof(__pyx_k_TAG_List), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, @@ -15440,6 +15852,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_n_s_compressed, __pyx_k_compressed, sizeof(__pyx_k_compressed), 0, 0, 1, 1}, + {&__pyx_n_s_contains___locals_genexpr, __pyx_k_contains___locals_genexpr, sizeof(__pyx_k_contains___locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, @@ -15451,14 +15864,17 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1}, {&__pyx_n_s_frombuffer, __pyx_k_frombuffer, sizeof(__pyx_k_frombuffer), 0, 0, 1, 1}, {&__pyx_n_s_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 0, 1, 1}, + {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_getvalue, __pyx_k_getvalue, sizeof(__pyx_k_getvalue), 0, 0, 1, 1}, {&__pyx_n_s_gunzip, __pyx_k_gunzip, sizeof(__pyx_k_gunzip), 0, 0, 1, 1}, {&__pyx_n_s_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 0, 1, 1}, {&__pyx_n_s_hexa, __pyx_k_hexa, sizeof(__pyx_k_hexa), 0, 0, 1, 1}, {&__pyx_n_s_hexdump, __pyx_k_hexdump, sizeof(__pyx_k_hexdump), 0, 0, 1, 1}, + {&__pyx_kp_s_home_dens_Projets_Python27_MCEd, __pyx_k_home_dens_Projets_Python27_MCEd, sizeof(__pyx_k_home_dens_Projets_Python27_MCEd), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 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_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, @@ -15511,15 +15927,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_file = __Pyx_GetBuiltinName(__pyx_n_s_file); if (!__pyx_builtin_file) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_file = __Pyx_GetBuiltinName(__pyx_n_s_file); if (!__pyx_builtin_file) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -15529,152 +15945,152 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "_nbt.pyx":184 + /* "_nbt.pyx":179 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "_nbt.pyx":203 + /* "_nbt.pyx":197 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "_nbt.pyx":219 + /* "_nbt.pyx":212 * def __init__(self, value=None, name=""): * if value is None: * value = zeros((0,), self.dtype) # <<<<<<<<<<<<<< * * self.value = value */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "_nbt.pyx":371 + /* "_nbt.pyx":361 * def add(self, TAG_Value tag): * if not tag._name: * raise ValueError("Cannot add unnamed tag to TAG_Compound") # <<<<<<<<<<<<<< * * self[tag._name] = tag */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Cannot_add_unnamed_tag_to_TAG_Co); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Cannot_add_unnamed_tag_to_TAG_Co); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "_nbt.pyx":474 + /* "_nbt.pyx":459 * ctx.size = len(buf) * if len(buf) < 1: * raise NBTFormatError("NBT Stream too short!") # <<<<<<<<<<<<<< * - * cdef unsigned int * magic_no = ctx.buffer + * cdef unsigned int *magic_no = ctx.buffer */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_NBT_Stream_too_short); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_NBT_Stream_too_short); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "_nbt.pyx":649 + /* "_nbt.pyx":620 * * def hexdump(src, length=8): - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) # <<<<<<<<<<<<<< - * N=0 - * result='' + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) # <<<<<<<<<<<<<< + * N = 0 + * result = '' */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_int_256); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_int_256); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "_nbt.pyx":180 + /* "_nbt.pyx":175 * cdef class TAG_Byte_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('u1') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_u1); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "_nbt.pyx":199 + /* "_nbt.pyx":193 * cdef class TAG_Int_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('>u4') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_u4); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "_nbt.pyx":215 + /* "_nbt.pyx":208 * cdef class TAG_Short_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('>u2') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_u2); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_u2); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "_nbt.pyx":431 - * + /* "_nbt.pyx":421 + * #for i in range(nbytes): print buf[i], * * def gunzip(data): # <<<<<<<<<<<<<< * return gzip.GzipFile(fileobj=StringIO(data)).read() * */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde, __pyx_n_s_gunzip, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dens_Projets_Python27_MCEd, __pyx_n_s_gunzip, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":435 - * + /* "_nbt.pyx":424 + * return gzip.GzipFile(fileobj=StringIO(data)).read() * * def try_gunzip(data): # <<<<<<<<<<<<<< * try: * data = gunzip(data) */ - __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde, __pyx_n_s_try_gunzip, 435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dens_Projets_Python27_MCEd, __pyx_n_s_try_gunzip, 424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":443 - * + /* "_nbt.pyx":431 + * return data * * def load(filename="", buf=None): # <<<<<<<<<<<<<< * if filename: * buf = file(filename, "rb") */ - __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde, __pyx_n_s_load, 443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dens_Projets_Python27_MCEd, __pyx_n_s_load, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_nbt.pyx":648 - * + /* "_nbt.pyx":619 + * return load_array(ctx, TAG_Short_Array) * * def hexdump(src, length=8): # <<<<<<<<<<<<<< - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 */ - __pyx_tuple__20 = PyTuple_Pack(8, __pyx_n_s_src, __pyx_n_s_length, __pyx_n_s_FILTER, __pyx_n_s_N, __pyx_n_s_result, __pyx_n_s_s, __pyx_n_s_hexa, __pyx_n_s_x); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__20 = PyTuple_Pack(8, __pyx_n_s_src, __pyx_n_s_length, __pyx_n_s_FILTER, __pyx_n_s_N, __pyx_n_s_result, __pyx_n_s_s, __pyx_n_s_hexa, __pyx_n_s_x); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_C_Users_Kris_Desktop_Tal_s_Folde, __pyx_n_s_hexdump, 648, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dens_Projets_Python27_MCEd, __pyx_n_s_hexdump, 619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -15707,6 +16123,7 @@ PyMODINIT_FUNC PyInit__nbt(void) PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -15742,25 +16159,25 @@ PyMODINIT_FUNC PyInit__nbt(void) #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_nbt"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_Cython_implementation_Named_Bin), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + __pyx_m = Py_InitModule4("_nbt", __pyx_methods, __pyx_k_Cython_implementation_Named_Bin, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif - if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main__nbt) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } #if PY_MAJOR_VERSION >= 3 { @@ -15778,17 +16195,17 @@ PyMODINIT_FUNC PyInit__nbt(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Value.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "TAG_Value", (PyObject *)&__pyx_type_4_nbt_TAG_Value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Value", (PyObject *)&__pyx_type_4_nbt_TAG_Value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Value = &__pyx_type_4_nbt_TAG_Value; __pyx_vtabptr_4_nbt_TAG_Byte = &__pyx_vtable_4_nbt_TAG_Byte; __pyx_vtable_4_nbt_TAG_Byte.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Byte *, PyObject *))__pyx_f_4_nbt_8TAG_Byte_save_value; __pyx_type_4_nbt_TAG_Byte.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Byte.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Byte.tp_dict, __pyx_vtabptr_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Byte", (PyObject *)&__pyx_type_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Byte.tp_dict, __pyx_vtabptr_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Byte", (PyObject *)&__pyx_type_4_nbt_TAG_Byte) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Byte = &__pyx_type_4_nbt_TAG_Byte; __pyx_vtabptr_4_nbt_TAG_Short = &__pyx_vtable_4_nbt_TAG_Short; __pyx_vtable_4_nbt_TAG_Short.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Short *, PyObject *))__pyx_f_4_nbt_9TAG_Short_save_value; @@ -15796,99 +16213,99 @@ PyMODINIT_FUNC PyInit__nbt(void) if (PyType_Ready(&__pyx_type_4_nbt_TAG_Short) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Short.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Short.tp_dict, __pyx_vtabptr_4_nbt_TAG_Short) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Short", (PyObject *)&__pyx_type_4_nbt_TAG_Short) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Short", (PyObject *)&__pyx_type_4_nbt_TAG_Short) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Short = &__pyx_type_4_nbt_TAG_Short; __pyx_vtabptr_4_nbt_TAG_Int = &__pyx_vtable_4_nbt_TAG_Int; __pyx_vtable_4_nbt_TAG_Int.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Int *, PyObject *))__pyx_f_4_nbt_7TAG_Int_save_value; __pyx_type_4_nbt_TAG_Int.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Int.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Int.tp_dict, __pyx_vtabptr_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Int", (PyObject *)&__pyx_type_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Int.tp_dict, __pyx_vtabptr_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Int", (PyObject *)&__pyx_type_4_nbt_TAG_Int) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Int = &__pyx_type_4_nbt_TAG_Int; __pyx_vtabptr_4_nbt_TAG_Long = &__pyx_vtable_4_nbt_TAG_Long; __pyx_vtable_4_nbt_TAG_Long.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Long *, PyObject *))__pyx_f_4_nbt_8TAG_Long_save_value; __pyx_type_4_nbt_TAG_Long.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Long.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Long.tp_dict, __pyx_vtabptr_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Long", (PyObject *)&__pyx_type_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Long.tp_dict, __pyx_vtabptr_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Long", (PyObject *)&__pyx_type_4_nbt_TAG_Long) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Long = &__pyx_type_4_nbt_TAG_Long; __pyx_vtabptr_4_nbt_TAG_Float = &__pyx_vtable_4_nbt_TAG_Float; __pyx_vtable_4_nbt_TAG_Float.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Float *, PyObject *))__pyx_f_4_nbt_9TAG_Float_save_value; __pyx_type_4_nbt_TAG_Float.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Float.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Float.tp_dict, __pyx_vtabptr_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Float", (PyObject *)&__pyx_type_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Float.tp_dict, __pyx_vtabptr_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Float", (PyObject *)&__pyx_type_4_nbt_TAG_Float) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Float = &__pyx_type_4_nbt_TAG_Float; __pyx_vtabptr_4_nbt_TAG_Double = &__pyx_vtable_4_nbt_TAG_Double; __pyx_vtable_4_nbt_TAG_Double.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Double *, PyObject *))__pyx_f_4_nbt_10TAG_Double_save_value; __pyx_type_4_nbt_TAG_Double.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Double.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Double.tp_dict, __pyx_vtabptr_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Double", (PyObject *)&__pyx_type_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Double.tp_dict, __pyx_vtabptr_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Double", (PyObject *)&__pyx_type_4_nbt_TAG_Double) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Double = &__pyx_type_4_nbt_TAG_Double; __pyx_vtabptr_4_nbt_TAG_Byte_Array = &__pyx_vtable_4_nbt_TAG_Byte_Array; __pyx_vtable_4_nbt_TAG_Byte_Array.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Byte_Array *, PyObject *))__pyx_f_4_nbt_14TAG_Byte_Array_save_value; __pyx_type_4_nbt_TAG_Byte_Array.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Byte_Array.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Byte_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Byte_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Byte_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Byte_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Byte_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Byte_Array = &__pyx_type_4_nbt_TAG_Byte_Array; __pyx_vtabptr_4_nbt_TAG_Int_Array = &__pyx_vtable_4_nbt_TAG_Int_Array; __pyx_vtable_4_nbt_TAG_Int_Array.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Int_Array *, PyObject *))__pyx_f_4_nbt_13TAG_Int_Array_save_value; __pyx_type_4_nbt_TAG_Int_Array.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Int_Array.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Int_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Int_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Int_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Int_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Int_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Int_Array = &__pyx_type_4_nbt_TAG_Int_Array; __pyx_vtabptr_4_nbt_TAG_Short_Array = &__pyx_vtable_4_nbt_TAG_Short_Array; __pyx_vtable_4_nbt_TAG_Short_Array.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_Short_Array *, PyObject *))__pyx_f_4_nbt_15TAG_Short_Array_save_value; __pyx_type_4_nbt_TAG_Short_Array.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_Short_Array.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Short_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_Short_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_Short_Array.tp_dict, __pyx_vtabptr_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_Short_Array", (PyObject *)&__pyx_type_4_nbt_TAG_Short_Array) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_Short_Array = &__pyx_type_4_nbt_TAG_Short_Array; __pyx_vtabptr_4_nbt_TAG_String = &__pyx_vtable_4_nbt_TAG_String; __pyx_vtable_4_nbt_TAG_String.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt_TAG_String *, PyObject *))__pyx_f_4_nbt_10TAG_String_save_value; __pyx_type_4_nbt_TAG_String.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_TAG_String.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_String.tp_dict, __pyx_vtabptr_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "TAG_String", (PyObject *)&__pyx_type_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt_TAG_String.tp_dict, __pyx_vtabptr_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TAG_String", (PyObject *)&__pyx_type_4_nbt_TAG_String) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_TAG_String = &__pyx_type_4_nbt_TAG_String; __pyx_vtabptr_4_nbt__TAG_List = &__pyx_vtable_4_nbt__TAG_List; __pyx_vtable_4_nbt__TAG_List.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt__TAG_List *, PyObject *))__pyx_f_4_nbt_9_TAG_List_save_value; __pyx_type_4_nbt__TAG_List.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt__TAG_List.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt__TAG_List.tp_dict, __pyx_vtabptr_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "_TAG_List", (PyObject *)&__pyx_type_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt__TAG_List.tp_dict, __pyx_vtabptr_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "_TAG_List", (PyObject *)&__pyx_type_4_nbt__TAG_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt__TAG_List = &__pyx_type_4_nbt__TAG_List; __pyx_vtabptr_4_nbt__TAG_Compound = &__pyx_vtable_4_nbt__TAG_Compound; __pyx_vtable_4_nbt__TAG_Compound.save_value = (PyObject *(*)(struct __pyx_obj_4_nbt__TAG_Compound *, PyObject *))__pyx_f_4_nbt_13_TAG_Compound_save_value; __pyx_type_4_nbt__TAG_Compound.tp_base = __pyx_ptype_4_nbt_TAG_Value; - if (PyType_Ready(&__pyx_type_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt__TAG_Compound.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4_nbt__TAG_Compound.tp_dict, __pyx_vtabptr_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "_TAG_Compound", (PyObject *)&__pyx_type_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4_nbt__TAG_Compound.tp_dict, __pyx_vtabptr_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "_TAG_Compound", (PyObject *)&__pyx_type_4_nbt__TAG_Compound) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt__TAG_Compound = &__pyx_type_4_nbt__TAG_Compound; - if (PyType_Ready(&__pyx_type_4_nbt_load_ctx) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt_load_ctx) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt_load_ctx.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "load_ctx", (PyObject *)&__pyx_type_4_nbt_load_ctx) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "load_ctx", (PyObject *)&__pyx_type_4_nbt_load_ctx) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4_nbt_load_ctx = &__pyx_type_4_nbt_load_ctx; - if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt___pyx_scope_struct____iter__.tp_print = 0; __pyx_ptype_4_nbt___pyx_scope_struct____iter__ = &__pyx_type_4_nbt___pyx_scope_struct____iter__; - if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct_1___contains__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct_1___contains__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt___pyx_scope_struct_1___contains__.tp_print = 0; __pyx_ptype_4_nbt___pyx_scope_struct_1___contains__ = &__pyx_type_4_nbt___pyx_scope_struct_1___contains__; - if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4_nbt___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4_nbt___pyx_scope_struct_2_genexpr.tp_print = 0; __pyx_ptype_4_nbt___pyx_scope_struct_2_genexpr = &__pyx_type_4_nbt___pyx_scope_struct_2_genexpr; /*--- Type import code ---*/ @@ -15945,8 +16362,8 @@ PyMODINIT_FUNC PyInit__nbt(void) * import zlib * * from cStringIO import StringIO # <<<<<<<<<<<<<< + * * from cpython cimport PyTypeObject, PyObject_TypeCheck, PyUnicode_DecodeUTF8, PyList_Append - * import numpy */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -15962,45 +16379,45 @@ PyMODINIT_FUNC PyInit__nbt(void) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":43 - * from cStringIO import StringIO + /* "_nbt.pyx":44 + * * from cpython cimport PyTypeObject, PyObject_TypeCheck, PyUnicode_DecodeUTF8, PyList_Append * import numpy # <<<<<<<<<<<<<< * * cdef extern from "cStringIO.h": */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_nbt.pyx":52 - * void * PyCObject_Import(char * module_name, char * cobject_name) + /* "_nbt.pyx":53 + * void *PyCObject_Import(char *module_name, char *cobject_name) * * cdef PycStringIO_CAPI *PycStringIO = PyCObject_Import("cStringIO", "cStringIO_CAPI") # <<<<<<<<<<<<<< - * cdef PyTypeObject * StringO = PycStringIO.OutputType + * cdef PyTypeObject *StringO = PycStringIO.OutputType * */ __pyx_v_4_nbt_PycStringIO = ((struct PycStringIO_CAPI *)PyCObject_Import(__pyx_k_cStringIO, __pyx_k_cStringIO_CAPI)); - /* "_nbt.pyx":53 + /* "_nbt.pyx":54 * * cdef PycStringIO_CAPI *PycStringIO = PyCObject_Import("cStringIO", "cStringIO_CAPI") - * cdef PyTypeObject * StringO = PycStringIO.OutputType # <<<<<<<<<<<<<< + * cdef PyTypeObject *StringO = PycStringIO.OutputType # <<<<<<<<<<<<<< * * from numpy import array, zeros, uint8, fromstring, ndarray, frombuffer */ __pyx_t_3 = __pyx_v_4_nbt_PycStringIO->OutputType; __pyx_v_4_nbt_StringO = __pyx_t_3; - /* "_nbt.pyx":55 - * cdef PyTypeObject * StringO = PycStringIO.OutputType + /* "_nbt.pyx":56 + * cdef PyTypeObject *StringO = PycStringIO.OutputType * * from numpy import array, zeros, uint8, fromstring, ndarray, frombuffer # <<<<<<<<<<<<<< * * cdef char TAG_END = 0 */ - __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_array); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_array); @@ -16020,36 +16437,36 @@ PyMODINIT_FUNC PyInit__nbt(void) __Pyx_INCREF(__pyx_n_s_frombuffer); PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_frombuffer); __Pyx_GIVEREF(__pyx_n_s_frombuffer); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_zeros, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_zeros, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_uint8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_uint8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ndarray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ndarray, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_frombuffer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_frombuffer, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":57 + /* "_nbt.pyx":58 * from numpy import array, zeros, uint8, fromstring, ndarray, frombuffer * * cdef char TAG_END = 0 # <<<<<<<<<<<<<< @@ -16058,7 +16475,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_END = 0; - /* "_nbt.pyx":58 + /* "_nbt.pyx":59 * * cdef char TAG_END = 0 * cdef char TAG_BYTE = 1 # <<<<<<<<<<<<<< @@ -16067,7 +16484,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_BYTE = 1; - /* "_nbt.pyx":59 + /* "_nbt.pyx":60 * cdef char TAG_END = 0 * cdef char TAG_BYTE = 1 * cdef char TAG_SHORT = 2 # <<<<<<<<<<<<<< @@ -16076,7 +16493,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_SHORT = 2; - /* "_nbt.pyx":60 + /* "_nbt.pyx":61 * cdef char TAG_BYTE = 1 * cdef char TAG_SHORT = 2 * cdef char TAG_INT = 3 # <<<<<<<<<<<<<< @@ -16085,7 +16502,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_INT = 3; - /* "_nbt.pyx":61 + /* "_nbt.pyx":62 * cdef char TAG_SHORT = 2 * cdef char TAG_INT = 3 * cdef char TAG_LONG = 4 # <<<<<<<<<<<<<< @@ -16094,7 +16511,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_LONG = 4; - /* "_nbt.pyx":62 + /* "_nbt.pyx":63 * cdef char TAG_INT = 3 * cdef char TAG_LONG = 4 * cdef char TAG_FLOAT = 5 # <<<<<<<<<<<<<< @@ -16103,7 +16520,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_FLOAT = 5; - /* "_nbt.pyx":63 + /* "_nbt.pyx":64 * cdef char TAG_LONG = 4 * cdef char TAG_FLOAT = 5 * cdef char TAG_DOUBLE = 6 # <<<<<<<<<<<<<< @@ -16112,7 +16529,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_DOUBLE = 6; - /* "_nbt.pyx":64 + /* "_nbt.pyx":65 * cdef char TAG_FLOAT = 5 * cdef char TAG_DOUBLE = 6 * cdef char TAG_BYTE_ARRAY = 7 # <<<<<<<<<<<<<< @@ -16121,7 +16538,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_BYTE_ARRAY = 7; - /* "_nbt.pyx":65 + /* "_nbt.pyx":66 * cdef char TAG_DOUBLE = 6 * cdef char TAG_BYTE_ARRAY = 7 * cdef char TAG_STRING = 8 # <<<<<<<<<<<<<< @@ -16130,7 +16547,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_STRING = 8; - /* "_nbt.pyx":66 + /* "_nbt.pyx":67 * cdef char TAG_BYTE_ARRAY = 7 * cdef char TAG_STRING = 8 * cdef char TAG_LIST = 9 # <<<<<<<<<<<<<< @@ -16139,7 +16556,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_LIST = 9; - /* "_nbt.pyx":67 + /* "_nbt.pyx":68 * cdef char TAG_STRING = 8 * cdef char TAG_LIST = 9 * cdef char TAG_COMPOUND = 10 # <<<<<<<<<<<<<< @@ -16148,7 +16565,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_COMPOUND = 10; - /* "_nbt.pyx":68 + /* "_nbt.pyx":69 * cdef char TAG_LIST = 9 * cdef char TAG_COMPOUND = 10 * cdef char TAG_INT_ARRAY = 11 # <<<<<<<<<<<<<< @@ -16157,7 +16574,7 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_INT_ARRAY = 11; - /* "_nbt.pyx":69 + /* "_nbt.pyx":70 * cdef char TAG_COMPOUND = 10 * cdef char TAG_INT_ARRAY = 11 * cdef char TAG_SHORT_ARRAY = 12 # <<<<<<<<<<<<<< @@ -16166,125 +16583,125 @@ PyMODINIT_FUNC PyInit__nbt(void) */ __pyx_v_4_nbt_TAG_SHORT_ARRAY = 12; - /* "_nbt.pyx":72 + /* "_nbt.pyx":73 * * - * class NBTFormatError (ValueError): # <<<<<<<<<<<<<< + * class NBTFormatError(ValueError): # <<<<<<<<<<<<<< * pass * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_builtin_ValueError); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NBTFormatError, __pyx_n_s_NBTFormatError, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NBTFormatError, __pyx_n_s_NBTFormatError, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NBTFormatError, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NBTFormatError, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NBTFormatError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NBTFormatError, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":75 + /* "_nbt.pyx":76 * pass * * import nbt_util # <<<<<<<<<<<<<< + * * cdef class TAG_Value: - * IF UNICODE_NAMES: */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_nbt_util, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_nbt_util, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbt_util, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbt_util, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":180 + /* "_nbt.pyx":175 * cdef class TAG_Byte_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('u1') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Byte_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Byte_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4_nbt_TAG_Byte_Array); - /* "_nbt.pyx":199 + /* "_nbt.pyx":193 * cdef class TAG_Int_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('>u4') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Int_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Int_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4_nbt_TAG_Int_Array); - /* "_nbt.pyx":215 + /* "_nbt.pyx":208 * cdef class TAG_Short_Array(TAG_Value): * cdef public object value * dtype = numpy.dtype('>u2') # <<<<<<<<<<<<<< * * def __init__(self, value=None, name=""): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Short_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_4_nbt_TAG_Short_Array->tp_dict, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4_nbt_TAG_Short_Array); - /* "_nbt.pyx":254 + /* "_nbt.pyx":245 * cdef public char list_type * * def __init__(self, value=None, name="", list_type=TAG_BYTE): # <<<<<<<<<<<<<< * self.value = [] * self.name = name */ - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_4_nbt_TAG_BYTE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_4_nbt_TAG_BYTE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_k__5 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":319 + /* "_nbt.pyx":309 * * * class TAG_List(_TAG_List, collections.MutableSequence): # <<<<<<<<<<<<<< * pass * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MutableSequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MutableSequence); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4_nbt__TAG_List))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt__TAG_List))); @@ -16292,31 +16709,31 @@ PyMODINIT_FUNC PyInit__nbt(void) PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TAG_List, __pyx_n_s_TAG_List, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TAG_List, __pyx_n_s_TAG_List, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TAG_List, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TAG_List, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TAG_List, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TAG_List, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":413 + /* "_nbt.pyx":403 * * * class TAG_Compound(_TAG_Compound, collections.MutableMapping): # <<<<<<<<<<<<<< * pass - * # def __init__(self, value = None, name=""): + * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MutableMapping); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4_nbt__TAG_Compound))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt__TAG_Compound))); @@ -16324,68 +16741,68 @@ PyMODINIT_FUNC PyInit__nbt(void) PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TAG_Compound, __pyx_n_s_TAG_Compound, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_TAG_Compound, __pyx_n_s_TAG_Compound, (PyObject *) NULL, __pyx_n_s_nbt, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TAG_Compound, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TAG_Compound, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TAG_Compound, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TAG_Compound, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":431 - * + /* "_nbt.pyx":421 + * #for i in range(nbytes): print buf[i], * * def gunzip(data): # <<<<<<<<<<<<<< * return gzip.GzipFile(fileobj=StringIO(data)).read() * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_1gunzip, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_1gunzip, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gunzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gunzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":435 - * + /* "_nbt.pyx":424 + * return gzip.GzipFile(fileobj=StringIO(data)).read() * * def try_gunzip(data): # <<<<<<<<<<<<<< * try: * data = gunzip(data) */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_3try_gunzip, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_3try_gunzip, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_gunzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_try_gunzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":443 - * + /* "_nbt.pyx":431 + * return data * * def load(filename="", buf=None): # <<<<<<<<<<<<<< * if filename: * buf = file(filename, "rb") */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_5load, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_5load, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_load, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_load, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":648 - * + /* "_nbt.pyx":619 + * return load_array(ctx, TAG_Short_Array) * * def hexdump(src, length=8): # <<<<<<<<<<<<<< - * FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) - * N=0 + * FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)]) + * N = 0 */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_7hexdump, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4_nbt_7hexdump, NULL, __pyx_n_s_nbt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_hexdump, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_hexdump, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_nbt.pyx":763 - * + /* "_nbt.pyx":721 + * ( tag).save_value(buf) * * tag_classes = {TAG().tagID: TAG for TAG in (TAG_Byte, TAG_Short, TAG_Int, TAG_Long, TAG_Float, TAG_Double, TAG_String, # <<<<<<<<<<<<<< * TAG_Byte_Array, TAG_List, TAG_Compound, TAG_Int_Array, TAG_Short_Array)} @@ -16393,29 +16810,29 @@ PyMODINIT_FUNC PyInit__nbt(void) */ { /* enter inner scope */ PyObject *__pyx_7genexpr__pyx_v_4_nbt_TAG = NULL; - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); - /* "_nbt.pyx":764 + /* "_nbt.pyx":722 * * tag_classes = {TAG().tagID: TAG for TAG in (TAG_Byte, TAG_Short, TAG_Int, TAG_Long, TAG_Float, TAG_Double, TAG_String, * TAG_Byte_Array, TAG_List, TAG_Compound, TAG_Int_Array, TAG_Short_Array)} # <<<<<<<<<<<<<< * * #if __name__ == "__main__": */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_List); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_List); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_Compound); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TAG_Compound); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_4); - /* "_nbt.pyx":763 - * + /* "_nbt.pyx":721 + * ( tag).save_value(buf) * * tag_classes = {TAG().tagID: TAG for TAG in (TAG_Byte, TAG_Short, TAG_Int, TAG_Long, TAG_Float, TAG_Double, TAG_String, # <<<<<<<<<<<<<< * TAG_Byte_Array, TAG_List, TAG_Compound, TAG_Int_Array, TAG_Short_Array)} * */ - __pyx_t_5 = PyTuple_New(12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_5 = PyTuple_New(12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)__pyx_ptype_4_nbt_TAG_Byte))); @@ -16458,18 +16875,35 @@ PyMODINIT_FUNC PyInit__nbt(void) for (;;) { if (__pyx_t_6 >= 12) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} #endif __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_4_nbt_TAG, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_7genexpr__pyx_v_4_nbt_TAG, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_INCREF(__pyx_7genexpr__pyx_v_4_nbt_TAG); + __pyx_t_2 = __pyx_7genexpr__pyx_v_4_nbt_TAG; __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + if (__pyx_t_7) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + } __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tagID); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tagID); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_7genexpr__pyx_v_4_nbt_TAG))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_7genexpr__pyx_v_4_nbt_TAG))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -16480,7 +16914,7 @@ PyMODINIT_FUNC PyInit__nbt(void) goto __pyx_L1_error; __pyx_L7_exit_scope:; } /* exit inner scope */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tag_classes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tag_classes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_nbt.pyx":1 @@ -16492,14 +16926,20 @@ PyMODINIT_FUNC PyInit__nbt(void) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /*--- Wrapped vars code ---*/ + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { - __Pyx_AddTraceback("init _nbt", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__pyx_d) { + __Pyx_AddTraceback("init _nbt", __pyx_clineno, __pyx_lineno, __pyx_filename); + } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init _nbt"); @@ -16528,7 +16968,7 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } -#endif /* CYTHON_REFNANNY */ +#endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); @@ -16599,13 +17039,13 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha #endif if (!py_funcname | !py_srcfile) goto bad; py_code = PyCode_New( - 0, /*int argcount,*/ + 0, #if PY_MAJOR_VERSION >= 3 - 0, /*int kwonlyargcount,*/ + 0, #endif - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ + 0, + 0, + 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ @@ -16614,7 +17054,7 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ - firstlineno, /*int firstlineno,*/ + firstlineno, __pyx_empty_bytes /*PyObject *lnotab*/ ); bad: @@ -16622,13 +17062,13 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha Py_XDECREF(py_funcname); return py_code; } -#endif /* CYTHON_PROFILE */ +#endif static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); - if (result) { + if (likely(result)) { Py_INCREF(result); } else { #else @@ -16647,14 +17087,29 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); -#if PY_VERSION_HEX >= 0x02060000 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; -#endif result = (*call)(func, arg, kw); -#if PY_VERSION_HEX >= 0x02060000 Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} #endif + +#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, @@ -16664,6 +17119,36 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif +#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) { +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#else + if (likely(PyCFunction_Check(func))) { +#endif + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject* args = PyTuple_Pack(1, arg); + return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL; +} +#endif + static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) @@ -16930,11 +17415,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, goto raise_error; } } - #if PY_VERSION_HEX < 0x02050000 - if (PyClass_Check(type)) { - #else if (PyType_Check(type)) { - #endif #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); @@ -16949,17 +17430,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, goto raise_error; } value = type; - #if PY_VERSION_HEX < 0x02050000 - if (PyInstance_Check(type)) { - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); - } else { - type = 0; - PyErr_SetString(PyExc_TypeError, - "raise: exception must be an old-style class or instance"); - goto raise_error; - } - #else type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { @@ -16967,7 +17437,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, "raise: exception class must be a subclass of BaseException"); goto raise_error; } - #endif } __Pyx_ErrRestore(type, value, tb); return; @@ -16977,7 +17446,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, Py_XDECREF(tb); return; } -#else /* Python 3+ */ +#else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { @@ -17063,6 +17532,13 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject } 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 = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { @@ -17070,6 +17546,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } +#endif } bad: Py_XDECREF(owned_instance); @@ -17126,6 +17603,37 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq #endif } +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method, *result = NULL; + method = __Pyx_PyObject_GetAttrStr(obj, method_name); + if (unlikely(!method)) goto bad; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyMethod_Check(method))) { + PyObject *self = PyMethod_GET_SELF(method); + if (likely(self)) { + PyObject *args; + PyObject *function = PyMethod_GET_FUNCTION(method); + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + Py_INCREF(function); + Py_DECREF(method); method = NULL; + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); + return result; + } + } +#endif + result = __Pyx_PyObject_CallOneArg(method, arg); +bad: + Py_XDECREF(method); + return result; +} + 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; @@ -17142,6 +17650,21 @@ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#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 + static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", @@ -17265,7 +17788,7 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #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) + return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif @@ -17395,7 +17918,7 @@ static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { } static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) +#if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); @@ -17528,6 +18051,165 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj return result; } +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) / 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); +} + +#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; + 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( + PyThreadState_GET(), /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + py_frame->f_lineno = py_line; + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { const char neg_one = (char) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; @@ -17554,17 +18236,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { } } -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \ { \ - func_type value = func(x); \ + func_type value = func_value; \ if (sizeof(target_type) < sizeof(func_type)) { \ if (unlikely(value != (func_type) (target_type) value)) { \ func_type zero = 0; \ - PyErr_SetString(PyExc_OverflowError, \ - (is_unsigned && unlikely(value < zero)) ? \ - "can't convert negative value to " #target_type : \ - "value too large to convert to " #target_type); \ - return (target_type) -1; \ + if (is_unsigned && unlikely(value < zero)) \ + goto raise_neg_overflow; \ + else \ + goto raise_overflow; \ } \ } \ return (target_type) value; \ @@ -17575,19 +18256,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { #include "longintrepr.h" #endif #endif + static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { const char neg_one = (char) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(char) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG) + __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to char"); - return (char) -1; + goto raise_neg_overflow; } return (char) val; } @@ -17597,40 +18277,34 @@ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(char)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (char) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to char"); - return (char) -1; + goto raise_neg_overflow; } if (sizeof(char) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(char, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(char) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(char, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(char, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(char)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(char) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(char) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(char) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(char, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(char, long, PyLong_AsLong(x)) } else if (sizeof(char) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(char, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(char, long long, PyLong_AsLongLong(x)) } } { @@ -17668,6 +18342,14 @@ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { Py_DECREF(tmp); return val; } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { @@ -17696,24 +18378,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { } } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { const short neg_one = (short) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(short) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG) + __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to short"); - return (short) -1; + goto raise_neg_overflow; } return (short) val; } @@ -17723,40 +18398,34 @@ static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(short)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (short) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(short, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to short"); - return (short) -1; + goto raise_neg_overflow; } if (sizeof(short) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(short, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(short, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(short) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(short, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(short, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(short)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(short) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(short) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(short, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(short, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(short) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(short, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(short, long, PyLong_AsLong(x)) } else if (sizeof(short) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(short, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(short, long long, PyLong_AsLongLong(x)) } } { @@ -17794,6 +18463,14 @@ static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { Py_DECREF(tmp); return val; } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to short"); + return (short) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to short"); + return (short) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { @@ -17822,24 +18499,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { } } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = 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) + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; + goto raise_neg_overflow; } return (int) val; } @@ -17849,40 +18519,34 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(int)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; + goto raise_neg_overflow; } if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(int)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x)) } } { @@ -17920,6 +18584,14 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { 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; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) { @@ -17948,24 +18620,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) } } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(PY_LONG_LONG) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG) -1; + goto raise_neg_overflow; } return (PY_LONG_LONG) val; } @@ -17975,40 +18640,34 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG) -1; + goto raise_neg_overflow; } if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(PY_LONG_LONG) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyLong_AsLong(x)) } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long long, PyLong_AsLongLong(x)) } } { @@ -18046,6 +18705,14 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { Py_DECREF(tmp); return val; } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG) -1; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { @@ -18074,7 +18741,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { empty_dict = PyDict_New(); if (!empty_dict) goto bad; - #if PY_VERSION_HEX >= 0x02050000 { #if PY_MAJOR_VERSION >= 3 if (level == -1) { @@ -18096,7 +18762,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyErr_Clear(); } } - level = 0; /* try absolute import on failure */ + level = 0; } #endif if (!module) { @@ -18113,14 +18779,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { #endif } } - #else - if (level>0) { - PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); - goto bad; - } - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, NULL); - #endif bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); @@ -18182,24 +18840,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) } } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) -1, const_zero = 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) + __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to size_t"); - return (size_t) -1; + goto raise_neg_overflow; } return (size_t) val; } @@ -18209,40 +18860,34 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(size_t)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (size_t) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to size_t"); - return (size_t) -1; + goto raise_neg_overflow; } if (sizeof(size_t) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(size_t)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(size_t) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(size_t) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong(x)) } else if (sizeof(size_t) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong(x)) } } { @@ -18280,26 +18925,27 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { 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; } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = 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) + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; + goto raise_neg_overflow; } return (long) val; } @@ -18309,40 +18955,34 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; + goto raise_neg_overflow; } if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) + __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) + __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; - } + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +(((PyLongObject*)x)->ob_digit[0])); + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]); } #endif #endif if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) + __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) + __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x)) } } { @@ -18380,6 +19020,14 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { 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; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { @@ -18545,8 +19193,6 @@ PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { if (value) { #if CYTHON_COMPILING_IN_PYPY #else - /* Generators always return to their most recent caller, not - * necessarily their creator. */ if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; @@ -18569,9 +19215,6 @@ PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else - /* Don't keep the reference to f_back any longer than necessary. It - * may keep a chain of frames alive or it could create a reference - * cycle. */ if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; @@ -18675,11 +19318,7 @@ static PyObject *__Pyx_Generator_Close(PyObject *self) { Py_DECREF(yf); } if (err == 0) -#if PY_VERSION_HEX < 0x02050000 - PyErr_SetNone(PyExc_StopIteration); -#else PyErr_SetNone(PyExc_GeneratorExit); -#endif retval = __Pyx_Generator_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); @@ -18690,13 +19329,11 @@ static PyObject *__Pyx_Generator_Close(PyObject *self) { raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration -#if PY_VERSION_HEX >= 0x02050000 || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) -#endif || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { - if (raised_exception) PyErr_Clear(); /* ignore these errors */ + if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } @@ -18715,7 +19352,6 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { if (yf) { PyObject *ret; Py_INCREF(yf); -#if PY_VERSION_HEX >= 0x02050000 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Generator_CloseIter(gen, yf); Py_DECREF(yf); @@ -18724,7 +19360,6 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { return __Pyx_Generator_SendEx(gen, NULL); goto throw_here; } -#endif gen->is_running = 1; if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); @@ -18773,6 +19408,8 @@ static int __Pyx_Generator_clear(PyObject *self) { Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); return 0; } static void __Pyx_Generator_dealloc(PyObject *self) { @@ -18788,7 +19425,9 @@ static void __Pyx_Generator_dealloc(PyObject *self) { Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif - return; /* resurrected. :( */ + { + return; + } PyObject_GC_UnTrack(self); } __Pyx_Generator_clear(self); @@ -18812,15 +19451,10 @@ static void __Pyx_Generator_del(PyObject *self) { Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 - /* Undo the temporary resurrection; can't use DECREF here, it would - * cause a recursive call. - */ assert(self->ob_refcnt > 0); - if (--self->ob_refcnt == 0) - return; /* this is the normal path out */ - /* close() resurrected it! Make it look like the original Py_DECREF - * never happened. - */ + if (--self->ob_refcnt == 0) { + return; + } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); @@ -18829,104 +19463,143 @@ static void __Pyx_Generator_del(PyObject *self) { #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); - /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so - * we need to undo that. */ _Py_DEC_REFTOTAL; #endif - /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object - * chain, so no more to do there. - * If COUNT_ALLOCS, the original decref bumped tp_frees, and - * _Py_NewReference bumped tp_allocs: both of those need to be - * undone. - */ #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } -static PyMemberDef __pyx_Generator_memberlist[] = { - {(char *) "gi_running", -#if PY_VERSION_HEX >= 0x02060000 - T_BOOL, +static PyObject * +__Pyx_Generator_get_name(__pyx_GeneratorObject *self) +{ + Py_INCREF(self->gi_name); + return self->gi_name; +} +static int +__Pyx_Generator_set_name(__pyx_GeneratorObject *self, PyObject *value) +{ + 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_Generator_get_qualname(__pyx_GeneratorObject *self) +{ + Py_INCREF(self->gi_qualname); + return self->gi_qualname; +} +static int +__Pyx_Generator_set_qualname(__pyx_GeneratorObject *self, PyObject *value) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else - T_BYTE, + if (unlikely(value == NULL || !PyString_Check(value))) { #endif - offsetof(__pyx_GeneratorObject, is_running), - READONLY, - NULL}, + 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 PyGetSetDef __pyx_Generator_getsets[] = { + {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name, + (char*) PyDoc_STR("name of the generator"), 0}, + {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname, + (char*) PyDoc_STR("qualified name of the generator"), 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL}, {0, 0, 0, 0, 0} }; static PyMethodDef __pyx_Generator_methods[] = { - {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, - {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, - {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, + {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, + {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, + {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("generator"), /*tp_name*/ - sizeof(__pyx_GeneratorObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ + "generator", + sizeof(__pyx_GeneratorObject), + 0, + (destructor) __Pyx_Generator_dealloc, + 0, + 0, + 0, #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, #else - 0, /*reserved*/ + 0, #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */ - 0, /*tp_iter*/ - (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ - __pyx_Generator_methods, /*tp_methods*/ - __pyx_Generator_memberlist, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, + 0, + (traverseproc) __Pyx_Generator_traverse, + 0, + 0, + offsetof(__pyx_GeneratorObject, 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 PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_del*/ + 0, #else - __Pyx_Generator_del, /*tp_del*/ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /*tp_version_tag*/ + __Pyx_Generator_del, #endif + 0, #if PY_VERSION_HEX >= 0x030400a1 - __Pyx_Generator_del, /*tp_finalize*/ + __Pyx_Generator_del, #endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, - PyObject *closure) { + PyObject *closure, PyObject *name, PyObject *qualname) { __pyx_GeneratorObject *gen = PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); if (gen == NULL) @@ -18942,6 +19615,10 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; PyObject_GC_Track(gen); return gen; } @@ -18965,11 +19642,7 @@ static int __Pyx_check_binary_version(void) { "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); - #if PY_VERSION_HEX < 0x02050000 - return PyErr_Warn(NULL, message); - #else return PyErr_WarnEx(NULL, message, 1); - #endif } return 0; } @@ -19039,11 +19712,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); - #if PY_VERSION_HEX < 0x02050000 - if (PyErr_Warn(NULL, warning) < 0) goto bad; - #else if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - #endif } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, @@ -19059,168 +19728,6 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } #endif -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) / 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, 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); -} - -#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, /*int argcount,*/ - 0, /*int kwonlyargcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - __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, /*int firstlineno,*/ - __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; - PyObject *py_globals = 0; - PyFrameObject *py_frame = 0; - 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_globals = PyModule_GetDict(__pyx_m); - if (!py_globals) goto bad; - py_frame = PyFrame_New( - PyThreadState_GET(), /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - py_globals, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - py_frame->f_lineno = py_line; - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 @@ -19231,7 +19738,7 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } - #else /* Python 3+ has unicode identifiers */ + #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); @@ -19251,8 +19758,8 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) { - return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); +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 char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; @@ -19281,32 +19788,30 @@ static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_ } } } -#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ +#endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; -#else /* PY_VERSION_HEX < 0x03030000 */ - if (PyUnicode_READY(o) == -1) return NULL; +#else + if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { - *length = PyUnicode_GET_DATA_SIZE(o); + *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } -#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ +#else return PyUnicode_AsUTF8AndSize(o, length); -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ -#endif /* PY_VERSION_HEX < 0x03030000 */ +#endif +#endif } else -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ +#endif #if !CYTHON_COMPILING_IN_PYPY -#if PY_VERSION_HEX >= 0x02060000 if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else -#endif #endif { char* result; @@ -19368,11 +19873,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } return res; } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; @@ -19390,11 +19890,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { } #endif #endif - #if PY_VERSION_HEX < 0x02060000 - return PyInt_AsSsize_t(b); - #else return PyLong_AsSsize_t(b); - #endif } x = PyNumber_Index(b); if (!x) return -1; @@ -19403,17 +19899,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { -#if PY_VERSION_HEX < 0x02050000 - if (ival <= LONG_MAX) - return PyInt_FromLong((long)ival); - else { - unsigned char *bytes = (unsigned char *) &ival; - int one = 1; int little = (int)*(unsigned char*)&one; - return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); - } -#else - return PyInt_FromSize_t(ival); -#endif + return PyInt_FromSize_t(ival); } diff --git a/utilities/gl_display_context.py b/utilities/gl_display_context.py index f640c1677..3019841ca 100644 --- a/utilities/gl_display_context.py +++ b/utilities/gl_display_context.py @@ -69,14 +69,11 @@ def reset(self): for windowID in windowIDs: window = dis.create_resource_object('window', windowID) name = window.get_wm_name() # Title + if "MCEdit ~ Unified" in name: + win = window pid = window.get_full_property(dis.intern_atom('_NET_WM_PID'), mcplatform.Xlib.X.AnyPropertyType) # PID - - dis = mcplatform.Xlib.display.Display() - dRoot = dis.screen().root - win = dRoot.get_full_property(dis.intern_atom('_NET_ACTIVE_WINDOW'), mcplatform.Xlib.X.AnyPropertyType).value[0] - win = dis.create_resource_object('window', win) win.configure(x=config.settings.windowX.get(), y=config.settings.windowY.get()) -# self.win = win + self.win = win dis.sync() try: