From 8cf25e6df3c3b7bee07de4d9cfb620615194bc4d Mon Sep 17 00:00:00 2001 From: andrey-khropov <5002794+andrey-khropov@users.noreply.github.com> Date: Sun, 10 May 2026 23:31:17 +0200 Subject: [PATCH 1/7] Fix misspelling --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 356cc83..2fec869 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The pyreadstat package as a whole is distributed under Apache License -Vesrion 2 (see below). +Version 2 (see below). The pyreadstat package also includes the following open source software components: From 434e9fd18a34bd597af3086ad16034d669d1b3a2 Mon Sep 17 00:00:00 2001 From: Otto Fajardo Date: Wed, 13 May 2026 09:35:11 +0200 Subject: [PATCH 2/7] updated Readstat sources, version bumped --- CITATION.cff | 2 +- change_log.md | 4 + docs/conf.py | 2 +- pyreadstat/__init__.py | 4 +- pyreadstat/_readstat_parser.c | 5676 +++++++++++------------- pyreadstat/_readstat_writer.c | 5026 ++++++++++----------- setup.py | 2 +- src/sas/readstat_sas.h | 16 + src/sas/readstat_sas7bdat_read.c | 98 +- src/spss/readstat_sav_parse_mr_name.c | 76 +- src/spss/readstat_sav_parse_mr_name.rl | 2 +- 11 files changed, 5097 insertions(+), 5811 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index ef8b5e1..d4476e5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -5,7 +5,7 @@ authors: given-names: "Otto" orcid: "https://orcid.org/0000-0002-3363-9287" title: "Pyreadstat" -version: 1.3.4 +version: 1.3.5 doi: 10.5281/zenodo.6612282 date-released: 2018-09-24 url: "https://github.com/Roche/pyreadstat" diff --git a/change_log.md b/change_log.md index c24bf32..35be2ba 100644 --- a/change_log.md +++ b/change_log.md @@ -1,3 +1,7 @@ +# 1.3.5 (github, pypi and conda 2026.05.xx) +* Readstat sources updated to commit 3add3a5eaac6df24d938beffb9148792e362d9ef + + # 1.3.4 (github, pypi and conda 2026.05.15) * Refactored pyreadstat.pyx to pyreadstat.py solves #299 * Added env variable PYREADSTAT_LINK_ICONV to link iconv at compiling time diff --git a/docs/conf.py b/docs/conf.py index 0295c93..6aae15a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # The short X.Y version version = '' # The full version, including alpha/beta/rc tags -release = '1.3.4' +release = '1.3.5' # -- General configuration --------------------------------------------------- diff --git a/pyreadstat/__init__.py b/pyreadstat/__init__.py index 89474f9..a3ecd0e 100644 --- a/pyreadstat/__init__.py +++ b/pyreadstat/__init__.py @@ -22,7 +22,7 @@ from ._readstat_parser import ReadstatError, PyreadstatError from .pyfunctions import set_value_labels, set_catalog_to_sas -__version__ = "1.3.4" +__version__ = "1.3.5" __all__ = ( "read_sav", @@ -42,4 +42,4 @@ "PyreadstatError", "set_value_labels", "set_catalog_to_sas", -) \ No newline at end of file +) diff --git a/pyreadstat/_readstat_parser.c b/pyreadstat/_readstat_parser.c index 7bfcc02..d9a0063 100644 --- a/pyreadstat/_readstat_parser.c +++ b/pyreadstat/_readstat_parser.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.1.2 */ +/* Generated by Cython 3.2.4 */ /* BEGIN: Cython Metadata { @@ -80,8 +80,16 @@ END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ /* InitLimitedAPI */ -#if defined(Py_LIMITED_API) && !defined(CYTHON_LIMITED_API) +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif #endif #include "Python.h" @@ -90,8 +98,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_1_2" -#define CYTHON_HEX_VERSION 0x030102F0 +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 #define CYTHON_FUTURE_DIVISION 0 /* CModulePreamble */ #include @@ -116,9 +124,6 @@ END: Cython Metadata */ #define DL_EXPORT(t) t #endif #define __PYX_COMMA , -#ifndef HAVE_LONG_LONG - #define HAVE_LONG_LONG -#endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -151,7 +156,7 @@ END: Cython Metadata */ #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS - #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE @@ -188,6 +193,8 @@ END: Cython Metadata */ #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 @@ -255,6 +262,8 @@ END: Cython Metadata */ #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX @@ -265,8 +274,6 @@ END: Cython Metadata */ #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 - #undef CYTHON_CLINE_IN_TRACEBACK - #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS @@ -326,8 +333,11 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif - #undef CYTHON_USE_FREELISTS - #define CYTHON_USE_FREELISTS 0 + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 @@ -434,6 +444,15 @@ END: Cython Metadata */ #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 #endif #ifndef CYTHON_FAST_PYCCALL #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL @@ -442,10 +461,9 @@ END: Cython Metadata */ #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #else -#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) #endif #endif -#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #undef SHIFT #undef BASE @@ -521,35 +539,8 @@ END: Cython Metadata */ #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) -#ifdef _MSC_VER - #ifndef _MSC_STDINT_H_ - #if _MSC_VER < 1300 - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; - #else - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - #endif - #endif - #if _MSC_VER < 1300 - #ifdef _WIN64 - typedef unsigned long long __pyx_uintptr_t; - #else - typedef unsigned int __pyx_uintptr_t; - #endif - #else - #ifdef _WIN64 - typedef unsigned __int64 __pyx_uintptr_t; - #else - typedef unsigned __int32 __pyx_uintptr_t; - #endif - #endif -#else - #include - typedef uintptr_t __pyx_uintptr_t; -#endif +#include +typedef uintptr_t __pyx_uintptr_t; #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 @@ -592,9 +583,9 @@ END: Cython Metadata */ #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) #else - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) @@ -698,6 +689,12 @@ static int __Pyx_init_co_variables(void); #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif @@ -730,11 +727,6 @@ static int __Pyx_init_co_variables(void); #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) -#elif CYTHON_BACKPORT_VECTORCALL - typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, - size_t nargsf, PyObject *kwnames); - #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) - #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) @@ -764,7 +756,7 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(vo #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) -#if __PYX_LIMITED_VERSION_HEX < 0x03090000 +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else @@ -781,6 +773,9 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(vo #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) #elif CYTHON_COMPILING_IN_GRAAL #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) @@ -871,7 +866,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #endif #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) -#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#if CYTHON_USE_TYPE_SPECS #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ @@ -935,7 +930,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #endif #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) -#if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else @@ -951,6 +949,22 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) @@ -968,6 +982,12 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) #endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS @@ -1027,15 +1047,6 @@ static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) #endif -#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 - #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) -#else - static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { - PyObject *module = PyImport_AddModule(name); - Py_XINCREF(module); - return module; - } -#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif @@ -1142,15 +1153,6 @@ static int __Pyx_init_co_variables(void) { #endif #endif #include -#ifdef NAN -#define __PYX_NAN() ((float) NAN) -#else -static CYTHON_INLINE float __PYX_NAN() { - float value; - memset(&value, 0xFF, sizeof(value)); - return value; -} -#endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else @@ -1235,6 +1237,15 @@ static CYTHON_INLINE float __PYX_NAN() { #define CYTHON_WITHOUT_ASSERTIONS #endif +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 1 #define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString @@ -1434,12 +1445,12 @@ static const char *__pyx_filename; static const char* const __pyx_f[] = { "pyreadstat/_readstat_parser.pyx", - "", "cpython/datetime.pxd", + "", "cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ -/* Atomics.proto */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 @@ -1475,6 +1486,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) @@ -1499,6 +1511,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) @@ -1508,6 +1521,7 @@ static const char* const __pyx_f[] = { (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) @@ -1523,6 +1537,12 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif @@ -1533,6 +1553,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_ptr_type void* #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) @@ -1549,6 +1570,12 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif @@ -1559,36 +1586,27 @@ static const char* const __pyx_f[] = { #warning "Not using atomics" #endif #endif -#if CYTHON_ATOMICS - #define __pyx_add_acquisition_count(memview)\ - __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) - #define __pyx_sub_acquisition_count(memview)\ - __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) -#else - #define __pyx_add_acquisition_count(memview)\ - __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview)\ - __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) -#endif - -/* IncludeStructmemberH.proto */ -#include -/* CriticalSections.proto */ +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection void* #define __Pyx_PyCriticalSection2 void* -#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs -#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs -#define __Pyx_PyCriticalSection_End1(cs) -#define __Pyx_PyCriticalSection_End2(cs) +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) #else #define __Pyx_PyCriticalSection PyCriticalSection #define __Pyx_PyCriticalSection2 PyCriticalSection2 -#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin -#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin -#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End -#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin #endif #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_BEGIN_CRITICAL_SECTION(o) { @@ -1598,6 +1616,9 @@ static const char* const __pyx_f[] = { #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION #endif +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ @@ -1858,7 +1879,7 @@ struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container { #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -/* PyErrExceptionMatches.proto */ +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); @@ -1866,7 +1887,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif -/* PyThreadStateGet.proto */ +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; @@ -1884,7 +1905,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif -/* PyErrFetchRestore.proto */ +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) @@ -1909,14 +1930,14 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif -/* PyObjectGetAttrStr.proto */ +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif -/* PyObjectGetAttrStrNoError.proto */ +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ @@ -1925,7 +1946,7 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -/* TupleAndListFromArray.proto */ +/* TupleAndListFromArray.proto (used by fastcall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); #endif @@ -1933,13 +1954,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_s static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif -/* IncludeStringH.proto */ +/* IncludeStringH.proto (used by BytesEquals) */ #include -/* BytesEquals.proto */ +/* BytesEquals.proto (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); -/* UnicodeEquals.proto */ +/* UnicodeEquals.proto (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ @@ -1982,25 +2003,10 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int 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); -/* RejectKeywords.proto */ -static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); - -/* RaiseException.proto */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - -/* RaiseDoubleKeywords.proto */ -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); - -/* ParseKeywords.proto */ -static CYTHON_INLINE int __Pyx_ParseKeywords( - PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], - PyObject *kwds2, PyObject *values[], - Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, - const char* function_name, - int ignore_unknown_kwargs -); +/* py_dict_items.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); -/* CallCFunction.proto */ +/* CallCFunction.proto (used by CallUnboundCMethod0) */ #define __Pyx_CallCFunction(cfunc, self, args)\ ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ @@ -2010,52 +2016,26 @@ static CYTHON_INLINE int __Pyx_ParseKeywords( #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) -/* PyFunctionFastCall.proto */ -#if CYTHON_FAST_PYCALL -#if !CYTHON_VECTORCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs)\ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); -#endif -#define __Pyx_BUILD_ASSERT_EXPR(cond)\ - (sizeof(char [1 - 2*!(cond)]) - 1) -#ifndef Py_MEMBER_SIZE -#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) -#endif -#if !CYTHON_VECTORCALL -#if PY_VERSION_HEX >= 0x03080000 - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets() - #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) -#else - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ - ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -#endif -#endif -#endif - -/* PyObjectCall.proto */ +/* PyObjectCall.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif -/* PyObjectCallMethO.proto */ +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif -/* PyObjectFastCall.proto */ +/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); -/* UnpackUnboundCMethod.proto */ +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ typedef struct { PyObject *type; PyObject **method_name; @@ -2088,6 +2068,68 @@ static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_Ca #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) #endif +/* CallUnboundCMethod0.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RejectKeywords.export */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyTypeError_Check.proto */ +#define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) + +/* RaiseException.export */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + /* CallUnboundCMethod2.proto */ CYTHON_UNUSED static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); @@ -2097,6 +2139,15 @@ static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction * #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); @@ -2114,28 +2165,28 @@ static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const * #endif /* GetItemInt.proto */ -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) -#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); + int wraparound, int boundscheck, int unsafe_shared); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); + int is_list, int wraparound, int boundscheck, int unsafe_shared); -/* PyDictVersioning.proto */ +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) @@ -2146,7 +2197,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ @@ -2192,7 +2243,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); -/* JoinPyUnicode.proto */ +/* JoinPyUnicode.export */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); @@ -2224,20 +2275,37 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { /* UnicodeConcatInPlace.proto */ # if CYTHON_COMPILING_IN_CPYTHON #if CYTHON_REFNANNY - #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) + #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny) #else - #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) + #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared) #endif - static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right + #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique) + #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference) + #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique) + #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference) + static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared #if CYTHON_REFNANNY , void* __pyx_refnanny #endif ); #else -#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat -#endif -#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ - PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat +#endif +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\ + ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right)) +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\ + ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right)) +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\ + ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right)) +#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\ + ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right)) /* PyUnicodeContains.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { @@ -2257,14 +2325,14 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #endif /* SetItemInt.proto */ -#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck, unsafe_shared) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, - int is_list, int wraparound, int boundscheck); + int is_list, int wraparound, int boundscheck, int unsafe_shared); /* PyObjectVectorCallKwBuilder.proto */ CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); @@ -2302,7 +2370,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice( /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); -/* PyObjectCall2Args.proto */ +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* CallUnboundCMethod1.proto */ @@ -2317,19 +2385,18 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* /* RaiseUnexpectedTypeError.proto */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); -/* PyObjectCallOneArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); - -/* PyObjectGetMethod.proto */ +/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); +#endif -/* PyObjectCallMethod1.proto */ +/* PyObjectCallMethod1.proto (used by append) */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); -/* GetTopmostException.proto */ +/* GetTopmostException.proto (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif @@ -2354,15 +2421,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( /* py_dict_keys.proto */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); -/* CallUnboundCMethod0.proto */ -CYTHON_UNUSED -static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); -#else -#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) -#endif - /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { @@ -2384,7 +2442,7 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif -/* PyObjectDelAttr.proto */ +/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) #else @@ -2412,6 +2470,11 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); +/* PyRange_Check.proto */ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) + #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) +#endif + /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); @@ -2419,9 +2482,6 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *k #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif -/* py_dict_items.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); - /* HasAttr.proto */ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) @@ -2429,6 +2489,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); #endif +/* PyUnicodeError_Check.proto */ +#define __Pyx_PyExc_UnicodeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_UnicodeError) + /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) @@ -2437,24 +2500,20 @@ static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif -/* PyObjectCallNoArg.proto */ +/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); -/* pyfrozenset_new.proto */ +/* pyfrozenset_new.proto (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); /* PySetContains.proto */ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); - -/* ImportDottedModule.proto */ -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); -/* ImportDottedModuleRelFirst.proto */ -static PyObject *__Pyx_ImportDottedModuleRelFirst(PyObject *name, PyObject *parts_tuple); +/* Import.proto */ +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); /* ListExtend.proto */ static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { @@ -2471,11 +2530,16 @@ static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { #endif } +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* AllocateExtensionType.proto */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); /* CallTypeTraverse.proto */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) @@ -2484,22 +2548,31 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); #endif -/* LimitedApiGetTypeDict.proto */ +/* VoidPtrExport.proto */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); + +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); #endif -/* SetItemOnTypeDict.proto */ +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) /* FixUpExtensionType.proto */ static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); -/* PyObjectCallMethod0.proto */ +/* PyObjectCallMethod0.proto (used by PyType_Ready) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); -/* ValidateBasesTuple.proto */ +/* ValidateBasesTuple.proto (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif @@ -2507,7 +2580,7 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); -/* DelItemOnTypeDict.proto */ +/* DelItemOnTypeDict.proto (used by SetupReduce) */ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); #define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) @@ -2515,52 +2588,60 @@ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); static int __Pyx_setup_reduce(PyObject* type_obj); /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_2 -#define __PYX_HAVE_RT_ImportType_proto_3_1_2 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_1_2 { - __Pyx_ImportType_CheckSize_Error_3_1_2 = 0, - __Pyx_ImportType_CheckSize_Warn_3_1_2 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_1_2 = 2 +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size); +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); #endif +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + /* ListPack.proto */ static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); -/* FetchSharedCythonModule.proto */ -static PyObject *__Pyx_FetchSharedCythonABIModule(void); +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif -/* dict_setdefault.proto */ -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); -/* FetchCommonType.proto */ +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); -/* CommonTypesMetaclass.proto */ +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ static int __pyx_CommonTypesMetaclass_init(PyObject *module); #define __Pyx_CommonTypesMetaclass_USED -/* PyMethodNew.proto */ +/* PyMethodNew.proto (used by CythonFunctionShared) */ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); -/* PyVectorcallFastCallDict.proto */ -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif -/* CythonFunctionShared.proto */ +/* CythonFunctionShared.proto (used by CythonFunction) */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 @@ -2590,14 +2671,15 @@ typedef struct { #else PyCMethodObject func; #endif -#if CYTHON_BACKPORT_VECTORCALL ||\ - (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL __pyx_vectorcallfunc func_vectorcall; #endif #if CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_dict; +#endif PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; @@ -2642,7 +2724,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *c static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) @@ -2662,7 +2744,7 @@ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); -/* PyObjectLookupSpecial.proto */ +/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) @@ -2678,14 +2760,14 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); -/* CLineInTraceback.proto */ +/* CLineInTraceback.proto (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #else #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #endif -/* CodeObjectCache.proto */ +/* CodeObjectCache.proto (used by AddTraceback) */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject __Pyx_CachedCodeObjectType; #else @@ -2791,16 +2873,19 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif static unsigned long __Pyx_get_runtime_version(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); -/* VoidPtrExport.proto */ -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig); - -/* FunctionExport.proto */ -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); /* MultiPhaseInitModuleState.proto */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE @@ -2951,343 +3036,10 @@ int __pyx_module_is_main_pyreadstat___readstat_parser = 0; /* Implementation of "pyreadstat._readstat_parser" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_object; -static PyObject *__pyx_builtin_TypeError; -static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_all; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_zip; -static PyObject *__pyx_builtin_UnicodeError; /* #### Code section: string_decls ### */ -static const char __pyx_k_[] = ""; -static const char __pyx_k_Q[] = "\200\001\330\004\n\210+\220Q"; -static const char __pyx_k_d[] = "d"; -static const char __pyx_k_s[] = "s"; -static const char __pyx_k__2[] = "'"; -static const char __pyx_k__3[] = "."; -static const char __pyx_k__4[] = "?"; -static const char __pyx_k_gc[] = "gc"; -static const char __pyx_k_hi[] = "hi"; -static const char __pyx_k_lo[] = "lo"; -static const char __pyx_k_np[] = "np"; -static const char __pyx_k_nt[] = "nt"; -static const char __pyx_k_nw[] = "nw"; -static const char __pyx_k_os[] = "os"; -static const char __pyx_k_tC[] = "%tC"; -static const char __pyx_k_tc[] = "%tc"; -static const char __pyx_k_td[] = "%td"; -static const char __pyx_k_v2[] = "v2"; -static const char __pyx_k_TOD[] = "TOD"; -static const char __pyx_k_all[] = "all"; -static const char __pyx_k_col[] = "col"; -static const char __pyx_k_d_2[] = "%d"; -static const char __pyx_k_doc[] = "__doc__"; -static const char __pyx_k_dta[] = "dta"; -static const char __pyx_k_get[] = "get"; -static const char __pyx_k_loc[] = "loc"; -static const char __pyx_k_nan[] = "nan"; -static const char __pyx_k_pop[] = "pop"; -static const char __pyx_k_por[] = "por"; -static const char __pyx_k_sys[] = "sys"; -static const char __pyx_k_zip[] = "zip"; -static const char __pyx_k_DATE[] = "DATE"; -static const char __pyx_k_HHMM[] = "HHMM"; -static const char __pyx_k_None[] = "None"; -static const char __pyx_k_TIME[] = "TIME"; -static const char __pyx_k_copy[] = "copy"; -static const char __pyx_k_date[] = "date"; -static const char __pyx_k_dict[] = "dict"; -static const char __pyx_k_fill[] = "fill"; -static const char __pyx_k_func[] = "__func__"; -static const char __pyx_k_int8[] = "int8"; -static const char __pyx_k_keys[] = "keys"; -static const char __pyx_k_left[] = "left"; -static const char __pyx_k_main[] = "__main__"; -static const char __pyx_k_name[] = "name"; -static const char __pyx_k_path[] = "path"; -static const char __pyx_k_read[] = "read"; -static const char __pyx_k_seek[] = "seek"; -static const char __pyx_k_self[] = "self"; -static const char __pyx_k_spec[] = "__spec__"; -static const char __pyx_k_tell[] = "tell"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_time[] = "time"; -static const char __pyx_k_type[] = "type"; -static const char __pyx_k_warn[] = "warn"; -static const char __pyx_k_ADATE[] = "ADATE"; -static const char __pyx_k_DATE8[] = "DATE8"; -static const char __pyx_k_DATE9[] = "DATE9"; -static const char __pyx_k_DTIME[] = "DTIME"; -static const char __pyx_k_EDATE[] = "EDATE"; -static const char __pyx_k_JDATE[] = "JDATE"; -static const char __pyx_k_M8_ns[] = "__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_CLEAR(clear_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); - #endif #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif @@ -3746,13 +3474,19 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); Py_CLEAR(clear_module_state->__pyx_type_10pyreadstat_16_readstat_parser_data_container); for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } - for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<329; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } - Py_CLEAR(clear_module_state->__pyx_int_0); - Py_CLEAR(clear_module_state->__pyx_int_1); - Py_CLEAR(clear_module_state->__pyx_int_100000); - return 0; + for (int i=0; i<324; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; } #endif /* #### Code section: module_state_traverse ### */ @@ -3766,12 +3500,6 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_VISIT(traverse_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); - #endif Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time); @@ -3781,13 +3509,19 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void Py_VISIT(traverse_module_state->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); Py_VISIT(traverse_module_state->__pyx_type_10pyreadstat_16_readstat_parser_data_container); for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } - for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<329; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_100000); - return 0; + for (int i=0; i<324; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; } #endif /* #### Code section: module_code ### */ @@ -4577,7 +4311,7 @@ static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __ * # Create time object using DateTime CAPI factory function */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 261, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyDateTime_Date *)__pyx_t_1); __pyx_t_1 = 0; @@ -4633,9 +4367,9 @@ static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int __ * # Create datetime object using DateTime CAPI factory function. */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(2, 266, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(1, 266, __pyx_L1_error) __pyx_r = ((PyDateTime_Time *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; @@ -4690,7 +4424,7 @@ static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_ne * # Create timedelta object using DateTime CAPI factory function. */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1); __pyx_t_1 = 0; @@ -4740,7 +4474,7 @@ static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new( * # Create timedelta object using DateTime CAPI factory function. */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 276, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyDateTime_Delta *)__pyx_t_1); __pyx_t_1 = 0; @@ -4804,7 +4538,7 @@ static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject } else { __pyx_t_1 = NULL; } - __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 280, __pyx_L1_error) + __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -4872,22 +4606,22 @@ static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_fr */ __pyx_t_2 = (__pyx_v_tz != Py_None); if (__pyx_t_2) { - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 285, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_timestamp); __Pyx_GIVEREF(__pyx_v_timestamp); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 285, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); __Pyx_INCREF(__pyx_v_tz); __Pyx_GIVEREF(__pyx_v_tz); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(2, 285, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 285, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_timestamp); __Pyx_GIVEREF(__pyx_v_timestamp); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 285, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 285, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } @@ -4899,7 +4633,7 @@ static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_fr * PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL) * */ - __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 284, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3); @@ -4952,12 +4686,12 @@ static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_times * # More recognizable getters for date/time/datetime/timedelta. */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_timestamp); __Pyx_GIVEREF(__pyx_v_timestamp); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 289, __pyx_L1_error); - __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 289, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(1, 289, __pyx_L1_error); + __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyDateTime_Date *)__pyx_t_2); @@ -5656,7 +5390,7 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__py * * # Get days of timedelta * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).days + * return PyDateTime_DELTA_GET_DAYS(o) * */ @@ -5666,18 +5400,18 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__p /* "cpython/datetime.pxd":376 * # Get days of timedelta * cdef inline int timedelta_days(object o) noexcept: - * return (o).days # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_DAYS(o) # <<<<<<<<<<<<<< * * # Get seconds of timedelta */ - __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->days; + __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o); goto __pyx_L0; /* "cpython/datetime.pxd":375 * * # Get days of timedelta * cdef inline int timedelta_days(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).days + * return PyDateTime_DELTA_GET_DAYS(o) * */ @@ -5690,7 +5424,7 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__p * * # Get seconds of timedelta * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).seconds + * return PyDateTime_DELTA_GET_SECONDS(o) * */ @@ -5700,18 +5434,18 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject * /* "cpython/datetime.pxd":380 * # Get seconds of timedelta * cdef inline int timedelta_seconds(object o) noexcept: - * return (o).seconds # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_SECONDS(o) # <<<<<<<<<<<<<< * * # Get microseconds of timedelta */ - __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->seconds; + __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o); goto __pyx_L0; /* "cpython/datetime.pxd":379 * * # Get seconds of timedelta * cdef inline int timedelta_seconds(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).seconds + * return PyDateTime_DELTA_GET_SECONDS(o) * */ @@ -5724,7 +5458,7 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject * * * # Get microseconds of timedelta * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).microseconds + * return PyDateTime_DELTA_GET_MICROSECONDS(o) * */ @@ -5734,18 +5468,18 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObj /* "cpython/datetime.pxd":384 * # Get microseconds of timedelta * cdef inline int timedelta_microseconds(object o) noexcept: - * return (o).microseconds # <<<<<<<<<<<<<< + * return PyDateTime_DELTA_GET_MICROSECONDS(o) # <<<<<<<<<<<<<< * * cdef inline double total_seconds(timedelta obj) noexcept: */ - __pyx_r = ((PyDateTime_Delta *)__pyx_v_o)->microseconds; + __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o); goto __pyx_L0; /* "cpython/datetime.pxd":383 * * # Get microseconds of timedelta * cdef inline int timedelta_microseconds(object o) noexcept: # <<<<<<<<<<<<<< - * return (o).microseconds + * return PyDateTime_DELTA_GET_MICROSECONDS(o) * */ @@ -5755,7 +5489,7 @@ static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObj } /* "cpython/datetime.pxd":386 - * return (o).microseconds + * return PyDateTime_DELTA_GET_MICROSECONDS(o) * * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< * # Mirrors the "timedelta.total_seconds()" method. @@ -5803,7 +5537,7 @@ static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_ goto __pyx_L0; /* "cpython/datetime.pxd":386 - * return (o).microseconds + * return PyDateTime_DELTA_GET_MICROSECONDS(o) * * cdef inline double total_seconds(timedelta obj) noexcept: # <<<<<<<<<<<<<< * # Mirrors the "timedelta.total_seconds()" method. @@ -6440,8 +6174,8 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_14data_container_2__re * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -6504,32 +6238,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < 0) __PYX_ERR(1, 3, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) } __pyx_v___pyx_state = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6563,8 +6297,8 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_14data_container_4__se * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -7250,7 +6984,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -7599,7 +7333,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -7703,7 +7437,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 300, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7720,7 +7454,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 301, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8076,7 +7810,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Unkown_data_type}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error) @@ -8154,7 +7888,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); @@ -8183,7 +7917,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8376,7 +8110,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Failed_convert_C_to_python_value}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 363, __pyx_L1_error) @@ -8568,7 +8302,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_read_number_of_variabl}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) @@ -8762,7 +8496,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyUnicode_FromOrdinal((__pyx_v_mr_sets_orig[__pyx_v_i]).type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":417 @@ -8772,13 +8506,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, * 'label': mr_sets_orig[i].label, */ - __pyx_t_1 = __Pyx_PyLong_From_int((__pyx_v_mr_sets_orig[__pyx_v_i]).is_dichotomy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 417, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!((__pyx_v_mr_sets_orig[__pyx_v_i]).is_dichotomy != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_dichotomy, __pyx_t_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_dichotomy, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":418 @@ -8798,7 +8528,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_counted_value, __pyx_t_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_counted_value, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":419 @@ -8810,7 +8540,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_t_1 = __Pyx_PyUnicode_FromString((__pyx_v_mr_sets_orig[__pyx_v_i]).label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_label, __pyx_t_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_label, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":420 @@ -8820,7 +8550,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta * } * i += 1 */ - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variable_list, __pyx_v_variable_list) < 0) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variable_list, __pyx_v_variable_list) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":415 * for j in range(mr_sets_orig[i].num_subvars): @@ -9459,7 +9189,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9520,7 +9250,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_col_name, __pyx_v_newcolname}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -9555,7 +9285,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) @@ -9640,8 +9370,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * dc.label_to_var_name[col_name] = label_name * */ - __pyx_t_2 = (__pyx_v_label_name != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_label_name) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 518, __pyx_L1_error) + if (__pyx_v_label_name == Py_None) __pyx_t_2 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_label_name); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_2 = (__pyx_temp != 0); + } + if (__pyx_t_2) { /* "pyreadstat/_readstat_parser.pyx":519 @@ -9961,7 +9697,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 551, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_v_curnptype, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 551, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_v_curnptype, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 551, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":552 * # book keeping numpy types @@ -10042,7 +9778,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 556, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 556, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":557 @@ -10058,7 +9794,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 557, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 557, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":558 @@ -10119,8 +9855,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_mstate_global->__pyx_int_1}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 562, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10217,8 +9953,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_5}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_12, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 568, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -10262,7 +9998,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) @@ -10429,8 +10165,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lo, __pyx_v_pyloval) < 0) __PYX_ERR(0, 585, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_hi, __pyx_v_pyhival) < 0) __PYX_ERR(0, 585, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lo, __pyx_v_pyloval) < (0)) __PYX_ERR(0, 585, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_hi, __pyx_v_pyhival) < (0)) __PYX_ERR(0, 585, __pyx_L1_error) __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_missing_ranges, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -10892,7 +10628,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 658, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10909,7 +10645,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 659, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10963,7 +10699,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 663, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data_len, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data_len, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11000,7 +10736,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 666, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_curnptype = __pyx_t_1; __pyx_t_1 = 0; @@ -11034,8 +10770,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_100000}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 667, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -11078,7 +10814,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) @@ -11112,7 +10848,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 670, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS @@ -11128,7 +10864,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_buf_list}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11139,7 +10875,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 670, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 670, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":665 @@ -11183,14 +10919,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 673, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_buf_list}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) @@ -11222,7 +10958,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 675, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data_len, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 675, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data_len, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":664 @@ -11313,7 +11049,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 688, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 688, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 688, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":689 * else: @@ -11326,7 +11062,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 689, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 689, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 689, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":690 * dc.col_numpy_dtypes[index] = object @@ -11348,7 +11084,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 691, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); @@ -11357,8 +11093,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_builtin_object}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 691, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11369,7 +11105,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 691, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 691, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_parser.pyx":692 @@ -11388,9 +11124,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 692, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_5, __pyx_v_obs_index, 0, NULL, NULL, NULL, 1, 0, 1) < 0) __PYX_ERR(0, 692, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_5, __pyx_v_obs_index, 0, NULL, NULL, NULL, 1, 0, 1) < (0)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -11448,9 +11184,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 697, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely((__Pyx_SetItemInt(__pyx_t_5, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 697, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_5, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyreadstat/_readstat_parser.pyx":694 @@ -11484,7 +11220,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 699, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11532,9 +11268,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 706, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((__Pyx_SetItemInt(__pyx_t_1, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 706, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_1, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -11560,7 +11296,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 708, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 708, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 708, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":709 * else: @@ -11573,7 +11309,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 709, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 709, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 709, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":710 * dc.col_numpy_dtypes[index] = object @@ -11586,7 +11322,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 710, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_mstate_global->__pyx_int_0, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 710, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_mstate_global->__pyx_int_0, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 710, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":711 * dc.col_dtypes_isobject[index] = 1 @@ -11608,7 +11344,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 712, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); @@ -11617,8 +11353,8 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_builtin_object}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 712, __pyx_L1_error) - __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -11629,7 +11365,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 712, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 712, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "pyreadstat/_readstat_parser.pyx":713 @@ -11645,9 +11381,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 713, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 713, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -11677,9 +11413,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 715, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 715, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -11812,9 +11548,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 723, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 723, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L10:; @@ -11970,7 +11706,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_var_label}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -12331,7 +12067,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Unkown_data_type}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) @@ -12380,7 +12116,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py * elif pyformat == VAR_FORMAT_FLOAT: * cur_dict[py_float_value] = value_label_name */ - if (unlikely((__Pyx_SetItemInt(__pyx_v_cur_dict, __pyx_v_py_long_value, __pyx_v_value_label_name, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1) < 0))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_cur_dict, __pyx_v_py_long_value, __pyx_v_value_label_name, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 801, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":800 * if pyformat == VAR_FORMAT_STRING: @@ -12448,7 +12184,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Failed_convert_C_to_python_value}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) @@ -12641,7 +12377,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_isfile, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isfile, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -12697,7 +12433,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx */ __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_u8_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyUnicode_AsWideCharString(__pyx_t_4, (&__pyx_v_length)); if (unlikely(__pyx_t_8 == ((wchar_t *)0))) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_8 = PyUnicode_AsWideCharString(__pyx_t_4, (&__pyx_v_length)); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_u16_path = __pyx_t_8; @@ -12909,7 +12645,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L3_error) @@ -13184,7 +12920,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __pyx_t_8 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_seek, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_seek, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -13205,7 +12941,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); @@ -13366,7 +13102,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_err_message}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error) @@ -13737,8 +13473,14 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ * encoding_bytes = data.user_encoding.encode("utf-8") * readstat_set_file_character_encoding(parser, encoding_bytes) */ - __pyx_t_1 = (__pyx_v_data->user_encoding != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_data->user_encoding) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_1 < 0))) __PYX_ERR(0, 971, __pyx_L1_error) + if (__pyx_v_data->user_encoding == Py_None) __pyx_t_1 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_data->user_encoding); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } + if (__pyx_t_1) { /* "pyreadstat/_readstat_parser.pyx":972 @@ -14080,7 +13822,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) @@ -14170,7 +13912,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1025, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_cur_name_str, ((PyObject*)__pyx_t_1)); @@ -14187,7 +13929,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1026, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_data, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_data, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_cur_data, __pyx_t_1); __pyx_t_1 = 0; @@ -14355,11 +14097,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - size_t __pyx_t_15; - int __pyx_t_16; - __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_t_17; - int __pyx_t_18; + size_t __pyx_t_14; + int __pyx_t_15; + __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_t_16; + int __pyx_t_17; + PyObject *__pyx_t_18 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -14467,7 +14209,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1058, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_indx, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_indx, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_col_name, ((PyObject*)__pyx_t_2)); @@ -14524,7 +14266,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif if (__pyx_t_9 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_8, __pyx_t_9); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; } else { { @@ -14572,8 +14314,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * schema[col_name] = None * continue */ - __pyx_t_1 = (__Pyx_PyList_GET_SIZE(__pyx_v_sertypes) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_1 < 0))) __PYX_ERR(0, 1062, __pyx_L1_error) + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_sertypes); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } + __pyx_t_3 = (!__pyx_t_1); if (__pyx_t_3) { @@ -14612,40 +14358,37 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if allsame: */ __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_builtin_all); - __pyx_t_2 = __pyx_builtin_all; - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1065, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __pyx_v_sertypes; __Pyx_INCREF(__pyx_t_12); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __pyx_v_sertypes; __Pyx_INCREF(__pyx_t_11); __pyx_t_9 = 0; for (;;) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1065, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } - __pyx_t_13 = __Pyx_PyList_GetItemRef(__pyx_t_12, __pyx_t_9); + __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1065, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13); - __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_GetItemInt_List(__pyx_v_sertypes, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1065, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = PyObject_RichCompare(__pyx_v_x, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_12); + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sertypes, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PyObject_RichCompare(__pyx_v_x, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_14))) __PYX_ERR(0, 1065, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_15 = 1; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_14 = 1; { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2}; + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_all, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -14741,33 +14484,33 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = data_frame.to_native() */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1075, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_15 = 1; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); + if (unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_7); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); - __pyx_t_15 = 0; + __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); + __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, __pyx_v_dict_data}; - __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1075, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_11, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_11, __pyx_callargs+2, 1) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) - __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_8, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1075, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } @@ -14781,28 +14524,28 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = data_frame.to_native() * */ - __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1076, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_native_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_t_11 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1076, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_get_native_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_15 = 1; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - assert(__pyx_t_8); + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); - __pyx_t_15 = 0; + __pyx_t_14 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_data_frame}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_data_frame}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14819,10 +14562,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ __pyx_t_7 = __pyx_v_data_frame; __Pyx_INCREF(__pyx_t_7); - __pyx_t_15 = 0; + __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14864,16 +14607,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * # check that datetime columns are datetime type * # this is needed in case all date values are nan */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1081, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __pyx_t_8; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = __pyx_t_11; __Pyx_INCREF(__pyx_t_7); - __pyx_t_15 = 0; + __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_tolist, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tolist, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } @@ -14888,49 +14631,49 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * var_format = dc.col_formats[index] * if dtypes[index] != '__pyx_n_u_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); + __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1084, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1084, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_10)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { + if (likely(PyList_CheckExact(__pyx_t_11))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1084, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_8, __pyx_t_4); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1084, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4)); + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4)); #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_4); + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_4); #endif ++__pyx_t_4; } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error) } else { - __pyx_t_2 = __pyx_t_10(__pyx_t_8); + __pyx_t_2 = __pyx_t_10(__pyx_t_11); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -14944,8 +14687,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_column, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_v_index = __pyx_t_16; - __pyx_t_16 = (__pyx_t_16 + 1); + __pyx_v_index = __pyx_t_15; + __pyx_t_15 = (__pyx_t_15 + 1); /* "pyreadstat/_readstat_parser.pyx":1085 * # this is needed in case all date values are nan @@ -14958,11 +14701,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1085, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_17 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_var_format = __pyx_t_17; + __pyx_v_var_format = __pyx_t_16; /* "pyreadstat/_readstat_parser.pyx":1086 * for index, column in enumerate(data_frame.columns): @@ -14975,7 +14718,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1086, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_M8_ns, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -15006,19 +14749,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ __pyx_t_7 = __pyx_v_pd; __Pyx_INCREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_frame, __pyx_v_column); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1087, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = 0; + __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_frame, __pyx_v_column); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_11}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_to_datetime, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_datetime, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_loc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1087, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); @@ -15027,8 +14770,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_INCREF(__pyx_v_column); __Pyx_GIVEREF(__pyx_v_column); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_column) != (0)) __PYX_ERR(0, 1087, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_2) < 0))) __PYX_ERR(0, 1087, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_7, __pyx_t_2) < 0))) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -15049,7 +14792,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if dtypes[index] != '__pyx_n_u_columns); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { - __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); + __pyx_t_15 = 0; + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { + __pyx_t_2 = __pyx_t_11; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1094, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_2))) { @@ -15142,7 +14885,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif if (__pyx_t_4 >= __pyx_temp) break; } - __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_4); + __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; } else { { @@ -15153,16 +14896,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4)); + __pyx_t_11 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4)); #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); + __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L1_error) } else { - __pyx_t_8 = __pyx_t_10(__pyx_t_2); - if (unlikely(!__pyx_t_8)) { + __pyx_t_11 = __pyx_t_10(__pyx_t_2); + if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1094, __pyx_L1_error) @@ -15171,12 +14914,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj break; } } - __Pyx_GOTREF(__pyx_t_8); - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 1094, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_column, ((PyObject*)__pyx_t_8)); - __pyx_t_8 = 0; - __pyx_v_index = __pyx_t_16; - __pyx_t_16 = (__pyx_t_16 + 1); + __Pyx_GOTREF(__pyx_t_11); + if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_11))) __PYX_ERR(0, 1094, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_column, ((PyObject*)__pyx_t_11)); + __pyx_t_11 = 0; + __pyx_v_index = __pyx_t_15; + __pyx_t_15 = (__pyx_t_15 + 1); /* "pyreadstat/_readstat_parser.pyx":1095 * date_cols = list() @@ -15189,11 +14932,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 1095, __pyx_L1_error) } - __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_17 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_var_format = __pyx_t_17; + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_var_format = __pyx_t_16; /* "pyreadstat/_readstat_parser.pyx":1096 * for index, column in enumerate(data_frame.columns): @@ -15212,7 +14955,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if var_format == DATE_FORMAT_DATE: * date_cols.append(column) */ - __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_datetime_cols, __pyx_v_column); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_datetime_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1096 * for index, column in enumerate(data_frame.columns): @@ -15240,7 +14983,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if datetime_cols: * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) */ - __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_date_cols, __pyx_v_column); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1099, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_date_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1099, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1098 * if var_format == DATE_FORMAT_DATETIME: @@ -15268,8 +15011,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) * if date_cols: */ - __pyx_t_3 = (__Pyx_PyList_GET_SIZE(__pyx_v_datetime_cols) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_3 < 0))) __PYX_ERR(0, 1100, __pyx_L1_error) + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_datetime_cols); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_3 = (__pyx_temp != 0); + } + if (__pyx_t_3) { /* "pyreadstat/_readstat_parser.pyx":1101 @@ -15279,36 +15026,36 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if date_cols: * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) */ - __pyx_t_8 = __pyx_v_data_frame; - __Pyx_INCREF(__pyx_t_8); - __pyx_t_11 = __pyx_v_pl; + __pyx_t_11 = __pyx_v_data_frame; __Pyx_INCREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = PySequence_Tuple(__pyx_v_datetime_cols); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_8 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = PySequence_Tuple(__pyx_v_datetime_cols); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_15 = 0; + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_t_13}; - __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_s, __pyx_t_14, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_18}; + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_s, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_15 = 0; + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -15332,8 +15079,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) * */ - __pyx_t_3 = (__Pyx_PyList_GET_SIZE(__pyx_v_date_cols) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_3 < 0))) __PYX_ERR(0, 1102, __pyx_L1_error) + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_date_cols); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1102, __pyx_L1_error) + __pyx_t_3 = (__pyx_temp != 0); + } + if (__pyx_t_3) { /* "pyreadstat/_readstat_parser.pyx":1103 @@ -15345,35 +15096,35 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ __pyx_t_7 = __pyx_v_data_frame; __Pyx_INCREF(__pyx_t_7); - __pyx_t_14 = __pyx_v_pl; - __Pyx_INCREF(__pyx_t_14); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_12 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_8 = PySequence_Tuple(__pyx_v_date_cols); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = PySequence_Tuple(__pyx_v_date_cols); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, __pyx_t_12}; - __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_d, __pyx_t_11, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) - __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_t_13}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_d, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); } - __pyx_t_15 = 0; + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_11}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } @@ -15416,43 +15167,43 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * return data_frame */ /*else*/ { - __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_15 = 1; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_14); - assert(__pyx_t_11); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_11); + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_8); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); - __pyx_t_15 = 0; + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_14 = 0; } #endif { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_v_dict_data}; - __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_12, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) - __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_14, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_v_dict_data}; + __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_8 = __pyx_t_7; - __Pyx_INCREF(__pyx_t_8); - __pyx_t_15 = 0; + __pyx_t_11 = __pyx_t_7; + __Pyx_INCREF(__pyx_t_11); + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -15490,7 +15241,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); - __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("pyreadstat._readstat_parser.dict_to_dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -15602,7 +15353,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) @@ -15620,7 +15371,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_2 = __pyx_v_data->mr_sets; __Pyx_INCREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_mr_sets, __pyx_t_2) < 0) __PYX_ERR(0, 1133, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_mr_sets, __pyx_t_2) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1136 @@ -15632,7 +15383,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns, __pyx_t_2) < 0) __PYX_ERR(0, 1136, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns, __pyx_t_2) < (0)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1137 @@ -15663,7 +15414,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->max_n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < 0) __PYX_ERR(0, 1139, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1138 @@ -15695,7 +15446,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ /*else*/ { __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < 0) __PYX_ERR(0, 1141, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; @@ -15758,7 +15509,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -15783,7 +15534,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif if (__pyx_t_6 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_6); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { @@ -15828,10 +15579,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_8); } else { - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } @@ -15852,7 +15603,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1149, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -15882,7 +15633,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_var_label}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -15969,59 +15720,23 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * cur_type = data.col_formats_original[indx] */ __pyx_t_2 = NULL; - __Pyx_INCREF(__pyx_builtin_range); - __pyx_t_8 = __pyx_builtin_range; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); - __pyx_t_6 = 0; - __pyx_t_7 = NULL; - } else { - __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L1_error) - } + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1156, __pyx_L1_error) - #endif - if (__pyx_t_6 >= __pyx_temp) break; - } - __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_8, __pyx_t_6); - ++__pyx_t_6; - } else { - { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1156, __pyx_L1_error) - #endif - if (__pyx_t_6 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6)); - #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); - #endif - ++__pyx_t_6; - } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error) - } else { + { __pyx_t_4 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); @@ -16226,26 +15941,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * * for indx, curset in data.missing_user_values.items(): */ - __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - assert(__pyx_t_3); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unkown_data_type}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unkown_data_type}; + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } @@ -16298,7 +16013,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif if (__pyx_t_6 >= __pyx_temp) break; } - __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_6); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { @@ -16338,23 +16053,23 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); - __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); } else { - __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) - __Pyx_XGOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { @@ -16363,11 +16078,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); - index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed; + index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1176, __pyx_L1_error) + index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1176, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L18_unpacking_done; @@ -16378,10 +16093,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __PYX_ERR(0, 1176, __pyx_L1_error) __pyx_L18_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_curset, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_curset, __pyx_t_2); + __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1177 * @@ -16408,15 +16123,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_8 = PySequence_List(__pyx_v_curset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely((PyList_Sort(__pyx_t_3) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely((PyList_Sort(__pyx_t_2) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_user_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_v_cur_col, __pyx_t_3) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_v_cur_col, __pyx_t_2) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1176 * raise PyreadstatError("Unkown data type") @@ -16437,7 +16152,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->notes; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_notes, __pyx_t_4) < 0) __PYX_ERR(0, 1180, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_notes, __pyx_t_4) < (0)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1181 @@ -16449,7 +16164,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->col_names; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_4) < 0) __PYX_ERR(0, 1181, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_4) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1182 @@ -16461,7 +16176,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->col_labels; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_labels, __pyx_t_4) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1183 @@ -16475,58 +16190,55 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; - __Pyx_INCREF(__pyx_builtin_zip); - __pyx_t_2 = __pyx_builtin_zip; __pyx_t_5 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_data->col_names, __pyx_v_data->col_labels}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_2); } - if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L22_error) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_8))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1183, __pyx_L22_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } - __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_6); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1183, __pyx_L22_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6)); + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6)); #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L22_error) } else { - __pyx_t_3 = __pyx_t_7(__pyx_t_2); - if (unlikely(!__pyx_t_3)) { + __pyx_t_2 = __pyx_t_7(__pyx_t_8); + if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1183, __pyx_L22_error) @@ -16535,9 +16247,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; } } - __Pyx_GOTREF(__pyx_t_3); - if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { - PyObject* sequence = __pyx_t_3; + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); @@ -16546,36 +16258,36 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); - __Pyx_INCREF(__pyx_t_8); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_9); } else { - __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L22_error) - __Pyx_XGOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1183, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1183, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); #endif - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1183, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); - index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_12); if (unlikely(!__pyx_t_8)) goto __pyx_L25_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); + index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_12); if (unlikely(!__pyx_t_3)) goto __pyx_L25_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_12), 2) < 0) __PYX_ERR(0, 1183, __pyx_L22_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 1183, __pyx_L22_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L26_unpacking_done; @@ -16586,13 +16298,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __PYX_ERR(0, 1183, __pyx_L22_error) __pyx_L26_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_8); - __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_3); + __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 1183, __pyx_L22_error) } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; goto __pyx_L28_exit_scope; @@ -16602,7 +16314,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ goto __pyx_L1_error; __pyx_L28_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names_to_labels, __pyx_t_4) < 0) __PYX_ERR(0, 1183, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names_to_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1184 @@ -16614,7 +16326,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->file_encoding; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_encoding, __pyx_t_4) < 0) __PYX_ERR(0, 1184, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_encoding, __pyx_t_4) < (0)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1185 @@ -16626,7 +16338,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->file_label; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_label, __pyx_t_4) < 0) __PYX_ERR(0, 1185, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_label, __pyx_t_4) < (0)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1186 @@ -16636,7 +16348,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.value_labels = labels_raw * metadata.variable_to_label = label_to_var_name */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_value_labels, __pyx_v_variable_value_labels) < 0) __PYX_ERR(0, 1186, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_value_labels, __pyx_v_variable_value_labels) < (0)) __PYX_ERR(0, 1186, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1187 * metadata.file_label = data.file_label @@ -16645,7 +16357,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.variable_to_label = label_to_var_name * metadata.original_variable_types = original_types */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_value_labels, __pyx_v_labels_raw) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_value_labels, __pyx_v_labels_raw) < (0)) __PYX_ERR(0, 1187, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1188 * metadata.variable_value_labels = variable_value_labels @@ -16654,7 +16366,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.original_variable_types = original_types * metadata.readstat_variable_types = readstat_types */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_to_label, __pyx_v_label_to_var_name) < 0) __PYX_ERR(0, 1188, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_to_label, __pyx_v_label_to_var_name) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1189 * metadata.value_labels = labels_raw @@ -16663,7 +16375,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.readstat_variable_types = readstat_types * metadata.table_name = data.table_name */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_original_variable_types, __pyx_v_original_types) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_original_variable_types, __pyx_v_original_types) < (0)) __PYX_ERR(0, 1189, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1190 * metadata.variable_to_label = label_to_var_name @@ -16672,7 +16384,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.table_name = data.table_name * metadata.missing_ranges = data.missing_ranges */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_readstat_variable_types, __pyx_v_readstat_types) < 0) __PYX_ERR(0, 1190, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_readstat_variable_types, __pyx_v_readstat_types) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1191 * metadata.original_variable_types = original_types @@ -16683,7 +16395,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->table_name; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_table_name, __pyx_t_4) < 0) __PYX_ERR(0, 1191, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_table_name, __pyx_t_4) < (0)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1192 @@ -16695,7 +16407,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->missing_ranges; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_ranges, __pyx_t_4) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_ranges, __pyx_t_4) < (0)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1193 @@ -16707,7 +16419,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_storage_width; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_storage_width, __pyx_t_4) < 0) __PYX_ERR(0, 1193, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_storage_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1194 @@ -16719,7 +16431,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_display_width; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_display_width, __pyx_t_4) < 0) __PYX_ERR(0, 1194, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_display_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1195 @@ -16731,7 +16443,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_alignment; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_alignment, __pyx_t_4) < 0) __PYX_ERR(0, 1195, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_alignment, __pyx_t_4) < (0)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1196 @@ -16743,7 +16455,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_measure; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_measure, __pyx_t_4) < 0) __PYX_ERR(0, 1196, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_measure, __pyx_t_4) < (0)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1197 @@ -16753,26 +16465,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.modification_time = datetime.datetime.fromtimestamp(data.mtime) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __pyx_t_9; - __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_data->ctime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __pyx_t_9; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->ctime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_creation_time, __pyx_t_4) < 0) __PYX_ERR(0, 1197, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_creation_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1198 @@ -16782,26 +16494,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * * return metadata */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __pyx_t_2; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_data->mtime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->mtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_modification_time, __pyx_t_4) < 0) __PYX_ERR(0, 1198, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_modification_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":1200 @@ -16896,10 +16608,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; - int __pyx_t_18; - char *__pyx_t_19; - double __pyx_t_20; - struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser __pyx_t_21; + PyObject *__pyx_t_18 = NULL; + int __pyx_t_19; + char *__pyx_t_20; + double __pyx_t_21; + struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -17020,7 +16733,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_filename_path}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L6_error) @@ -17055,7 +16768,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") */ - __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeError); + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_UnicodeError)))); if (__pyx_t_11) { __Pyx_AddTraceback("pyreadstat._readstat_parser.run_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 1231, __pyx_L8_except_error) @@ -17096,7 +16809,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL}; - __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L8_except_error) @@ -17119,7 +16832,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_17}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -17155,7 +16868,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_filename_path}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1233, __pyx_L8_except_error) @@ -17233,7 +16946,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -17312,7 +17025,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_path_must_be_either_str_or_bytes}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1240, __pyx_L1_error) @@ -17382,7 +17095,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_path_must_be_str_bytes_or_unicod}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1242, __pyx_L1_error) @@ -17413,7 +17126,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -17451,7 +17164,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_filename_bytes}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_expanduser, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_expanduser, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L1_error) @@ -17478,7 +17191,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_filename_bytes}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_isfile, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isfile, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1248, __pyx_L1_error) @@ -17504,7 +17217,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_filename_path}; - __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -17523,7 +17236,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -17590,9 +17303,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pandas) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_polars) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pandas) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_polars) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) __pyx_v_allowed_formats = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; @@ -17623,9 +17336,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, NULL}; __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_allowed_formats, __pyx_v_allowed_formats, __pyx_t_14, __pyx_callargs+1, 0) < 0) __PYX_ERR(0, 1255, __pyx_L1_error) - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_format, __pyx_v_output_format, __pyx_t_14, __pyx_callargs+1, 1) < 0) __PYX_ERR(0, 1255, __pyx_L1_error) - __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_allowed_formats, __pyx_v_allowed_formats, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_format, __pyx_v_output_format, __pyx_t_14, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) @@ -17645,7 +17358,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_3}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -17698,7 +17411,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * except: * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") */ - __pyx_t_7 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_pandas, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1258, __pyx_L24_error) + __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pandas, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1258, __pyx_L24_error) + __pyx_t_7 = __pyx_t_18; __Pyx_GOTREF(__pyx_t_7); __pyx_v_pandas = __pyx_t_7; __pyx_t_7 = 0; @@ -17765,7 +17479,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_You_requested_pandas_as_output_f}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L26_except_error) @@ -17834,7 +17548,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * except: * raise PyreadstatError("You requested polars as output_format but cannot import polars") */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_polars, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L33_error) + __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_polars, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_polars, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1263, __pyx_L33_error) + __pyx_t_3 = __pyx_t_18; __Pyx_GOTREF(__pyx_t_3); __pyx_v_polars = __pyx_t_3; __pyx_t_3 = 0; @@ -17901,7 +17616,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_You_requested_polars_as_output_f}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1265, __pyx_L35_except_error) @@ -17968,7 +17683,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1270, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1270, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1269 * @@ -17991,7 +17706,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1272, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1272, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1271 * if file_format == FILE_FORMAT_SAS: @@ -18014,7 +17729,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1274, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1274, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1273 * elif file_format == FILE_FORMAT_SPSS: @@ -18050,7 +17765,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Unknown_file_format}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L1_error) @@ -18102,7 +17817,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1279, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1279, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1278 * raise PyreadstatError("Unknown file format") @@ -18125,7 +17840,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1281, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1280 * if file_format == FILE_FORMAT_SAS: @@ -18148,7 +17863,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1283, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1283, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1282 * elif file_format == FILE_FORMAT_SPSS: @@ -18184,7 +17899,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unknown_file_format}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1285, __pyx_L1_error) @@ -18236,7 +17951,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1288, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1287 * raise PyreadstatError("Unknown file format") @@ -18259,7 +17974,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1290, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1290, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1289 * if file_format == FILE_FORMAT_SAS: @@ -18282,7 +17997,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 1292, __pyx_L1_error) } - __pyx_t_18 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1292, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1291 * elif file_format == FILE_FORMAT_SPSS: @@ -18318,7 +18033,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Unknown_file_format}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) @@ -18401,8 +18116,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(0, 1300, __pyx_L1_error) } - __pyx_t_19 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename_bytes); if (unlikely((!__pyx_t_19) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error) - __pyx_v_filename = ((char *)__pyx_t_19); + __pyx_t_20 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename_bytes); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_v_filename = ((char *)__pyx_t_20); /* "pyreadstat/_readstat_parser.pyx":1302 * filename = filename_bytes @@ -18412,14 +18127,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * */ __pyx_t_7 = NULL; - __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); - __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); __pyx_t_10 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); } @@ -18482,8 +18194,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * data.user_encoding = encoding * */ - __pyx_t_1 = (__pyx_v_encoding != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_encoding) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_1 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) + if (__pyx_v_encoding == Py_None) __pyx_t_1 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_encoding); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } + if (__pyx_t_1) { /* "pyreadstat/_readstat_parser.pyx":1311 @@ -18615,26 +18333,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * * data.origin = origin */ - __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1323, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - assert(__pyx_t_9); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_7); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_10 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Unknown_file_format}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Unknown_file_format}; + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } @@ -18664,8 +18382,8 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * * if usecols is not None: */ - __pyx_t_20 = __Pyx_PyFloat_AsDouble(__pyx_v_unix_to_origin_secs); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) - __pyx_v_data->unix_to_origin_secs = __pyx_t_20; + __pyx_t_21 = __Pyx_PyFloat_AsDouble(__pyx_v_unix_to_origin_secs); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_v_data->unix_to_origin_secs = __pyx_t_21; /* "pyreadstat/_readstat_parser.pyx":1328 * data.unix_to_origin_secs = unix_to_origin_secs @@ -18733,9 +18451,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * data_dict = data_container_to_dict(data) * if output_format == 'dict': */ - __pyx_t_21.__pyx_n = 1; - __pyx_t_21.file_obj = __pyx_v_file_obj; - __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(__pyx_v_filename, __pyx_v_data, __pyx_v_file_extension, __pyx_v_row_limit, __pyx_v_row_offset, &__pyx_t_21); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_22.__pyx_n = 1; + __pyx_t_22.file_obj = __pyx_v_file_obj; + __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(__pyx_v_filename, __pyx_v_data, __pyx_v_file_extension, __pyx_v_row_limit, __pyx_v_row_offset, &__pyx_t_22); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1336, __pyx_L1_error) /* "pyreadstat/_readstat_parser.pyx":1337 * # go! @@ -18999,7 +18717,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parser_entry_point", 0) < 0) __PYX_ERR(0, 1346, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parser_entry_point", 0) < (0)) __PYX_ERR(0, 1346, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); /* "pyreadstat/_readstat_parser.pyx":1347 @@ -19510,7 +19228,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_wrong_parser_format}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) @@ -19694,10 +19412,10 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); } else { - __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } @@ -19718,7 +19436,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 1393, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_unpacking_done; @@ -19781,17 +19499,8 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT static PyObject *__pyx_tp_new_10pyreadstat_16_readstat_parser_data_container(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *p; PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); - } + o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; - #endif p = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)o); p->col_data = ((PyObject*)Py_None); Py_INCREF(Py_None); p->col_data_len = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -19830,7 +19539,7 @@ static PyObject *__pyx_tp_new_10pyreadstat_16_readstat_parser_data_container(PyT static void __pyx_tp_dealloc_10pyreadstat_16_readstat_parser_data_container(PyObject *o) { struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *p = (struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)o; #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10pyreadstat_16_readstat_parser_data_container) { if (PyObject_CallFinalizerFromDealloc(o)) return; } @@ -19864,14 +19573,18 @@ static void __pyx_tp_dealloc_10pyreadstat_16_readstat_parser_data_container(PyOb Py_CLEAR(p->variable_measure); Py_CLEAR(p->mr_sets); Py_CLEAR(p->output_format); + PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS - (*Py_TYPE(o)->tp_free)(o); + (*tp->tp_free)(o); #else { - freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif + #if CYTHON_USE_TYPE_SPECS + Py_DECREF(tp); + #endif } static int __pyx_tp_traverse_10pyreadstat_16_readstat_parser_data_container(PyObject *o, visitproc v, void *a) { @@ -20052,12 +19765,7 @@ static PyTypeObject __pyx_type_10pyreadstat_16_readstat_parser_data_container = sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_10pyreadstat_16_readstat_parser_data_container, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ - #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ @@ -20106,7 +19814,7 @@ static PyTypeObject __pyx_type_10pyreadstat_16_readstat_parser_data_container = #else NULL, /*tp_finalize*/ #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 @@ -20175,30 +19883,36 @@ static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_readstat_to_numpy_types, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_sas_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_sas_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_sas_time_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_sas_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_sas_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_spss_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_spss_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_spss_time_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_spss_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_spss_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_stata_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_stata_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_stata_time_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_stata_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportVoidPtr(__pyx_mstate_global->__pyx_n_u_stata_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_readstat_to_numpy_types); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 26; + void *const __pyx_export_pointers[] = {(void *)&__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_origin, (void *)&__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, (void *) NULL}; + void *const *__pyx_export_pointer = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -20206,27 +19920,36 @@ static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ - if (__Pyx_ExportFunction("transform_variable_format", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_transform_variable_format, "__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format (PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("transform_datetime", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime, "PyObject *(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, double, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, PyObject *, int, PyObject *, double)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("handle_metadata", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_handle_metadata, "int (readstat_metadata_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("handle_variable", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_handle_variable, "int (int, readstat_variable_t *, char *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("handle_value", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_handle_value, "int (int, readstat_variable_t *, readstat_value_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("handle_value_label", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_handle_value_label, "int (char *, readstat_value_t, char *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("handle_note", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_handle_note, "int (int, char *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("check_exit_status", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_check_exit_status, "void (readstat_error_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("run_readstat_parser", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser, "void (char *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, long, long, struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("data_container_to_dict", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict, "PyObject *(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("dict_to_dataframe", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe, "PyObject *(PyObject *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("data_container_extract_metadata", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_metadata, "PyObject *(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("run_conversion", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_parser_run_conversion, "PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, PyObject *, int, int, PyObject *, int, int, long, long, PyObject *, PyObject *, PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject___pyx_t_10pyre); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 1200; + void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_run_conversion, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_metadata, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_transform_variable_format, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_handle_value_label, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_handle_note, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_handle_variable, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_handle_value, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_handle_metadata, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_parser_check_exit_status, (void (*)(void)) NULL}; + void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -20241,22 +19964,25 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container)) __PYX_ERR(0, 83, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = &__pyx_type_10pyreadstat_16_readstat_parser_data_container; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container->tp_dictoffset && __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container->tp_getattro = PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_data_container, (PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < 0) __PYX_ERR(0, 83, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_data_container, (PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -20275,63 +20001,63 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_2(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API 0, 0, #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 43, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_1_2(__pyx_t_1, "datetime", "date", + __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "date", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Date), + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Date), + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), #else - sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Date), + sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Date), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(2, 43, __pyx_L1_error) - __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_1_2(__pyx_t_1, "datetime", "time", + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(1, 43, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "time", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Time), + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Time), + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), #else - sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Time), + sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Time), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(2, 56, __pyx_L1_error) - __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_1_2(__pyx_t_1, "datetime", "datetime", + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(1, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "datetime", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_DateTime), + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_DateTime), + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), #else - sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_DateTime), + sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_DateTime), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(2, 82, __pyx_L1_error) - __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_1_2(__pyx_t_1, "datetime", "timedelta", + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "timedelta", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Delta), + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Delta), + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), #else - sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_Delta), + sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_Delta), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(2, 120, __pyx_L1_error) - __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_1_2(__pyx_t_1, "datetime", "tzinfo", + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(1, 120, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_4(__pyx_t_1, "datetime", "tzinfo", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_TZInfo), + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_TZInfo), + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), #else - sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(PyDateTime_TZInfo), + sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyDateTime_TZInfo), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(2, 133, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(1, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -20366,7 +20092,7 @@ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec__readstat_parser}, #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING - {Py_mod_gil, Py_MOD_GIL_USED}, + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, #endif #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, @@ -20428,7 +20154,8 @@ __Pyx_PyMODINIT_FUNC PyInit__readstat_parser(void) return PyModuleDef_Init(&__pyx_moduledef); } /* ModuleCreationPEP489 */ -#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { { PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think @@ -20458,12 +20185,15 @@ static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { #if !CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { static PY_INT64_T main_interpreter_id = -1; -#if CYTHON_COMPILING_IN_GRAAL +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); -#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 - PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); -#elif CYTHON_COMPILING_IN_LIMITED_API +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); #else PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); #endif @@ -20535,9 +20265,11 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_parser(PyObject *__pyx_p __pyx_mstatetype *__pyx_mstate = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_3; 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; @@ -20580,48 +20312,28 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_parser(PyObject *__pyx_p if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /* ImportRefnannyAPI */ #if CYTHON_REFNANNY -__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); -if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); -} -#endif - -__Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); - if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pxy_PyFrame_Initialize_Offsets - __Pxy_PyFrame_Initialize_Offsets(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } #endif + +__Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; - if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) - if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_FusedFunction_USED - if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Generator_USED - if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - /*--- Library function declarations ---*/ + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__pyx_module_is_main_pyreadstat___readstat_parser) { - if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) } { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -20630,10 +20342,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); } } /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_CreateCodeObjects(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(__pyx_mstate); if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) @@ -20651,16 +20363,22 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import datetime * import os */ - __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OrderedDict}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyreadstat_collections, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OrderedDict, __pyx_t_2) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OrderedDict}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyreadstat/_readstat_parser.pyx":28 * @@ -20669,10 +20387,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import os * import warnings */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_datetime, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_datetime, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":29 * from collections import OrderedDict @@ -20681,10 +20400,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import warnings * import sys */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_os, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_os, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":30 * import datetime @@ -20693,10 +20413,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import sys * */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_warnings, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_3) < 0) __PYX_ERR(0, 30, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_warnings, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":31 * import os @@ -20705,10 +20426,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * * import narwhals.stable.v2 as nw */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_sys, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_sys, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":33 * import sys @@ -20717,10 +20439,19 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import numpy as np * */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, __pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_3) < 0) __PYX_ERR(0, 33, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_narwhals_stable_v2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_stable); + Py_DECREF(__pyx_t_1); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_v2); + Py_DECREF(__pyx_t_1); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __pyx_t_5; + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":34 * @@ -20729,10 +20460,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * * from readstat_api cimport * */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_numpy, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_3) < 0) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_numpy, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":38 * from readstat_api cimport * @@ -20741,15 +20473,21 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * * # necessary to work with the datetime C API */ - __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_metadata_container); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyclasses, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metadata_container}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyclasses, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pyclasses, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_metadata_container); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_metadata_container, __pyx_t_3) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metadata_container}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":41 @@ -20841,13 +20579,13 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_sas_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 61, __pyx_L1_error) - __pyx_t_3 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":63 * cdef object sas_secs_from_unix = total_seconds(unix_origin - sas_origin) @@ -20856,12 +20594,12 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * cdef list spss_date_formats = ["DATE",'DATE8','DATE11', 'DATE12', "ADATE","ADATE8", "ADATE10", "EDATE", 'EDATE8','EDATE10', "JDATE", "JDATE5", "JDATE7", "SDATE", "SDATE8", "SDATE10",] * cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] */ - __pyx_t_3 = __Pyx_PyList_Pack(9, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_DATETIME8, __pyx_mstate_global->__pyx_n_u_DATETIME17, __pyx_mstate_global->__pyx_n_u_DATETIME20, __pyx_mstate_global->__pyx_kp_u_DATETIME23_2, __pyx_mstate_global->__pyx_n_u_YMDHMS16, __pyx_mstate_global->__pyx_n_u_YMDHMS19, __pyx_mstate_global->__pyx_kp_u_YMDHMS19_2, __pyx_mstate_global->__pyx_n_u_YMDHMS20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_Pack(9, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_DATETIME8, __pyx_mstate_global->__pyx_n_u_DATETIME17, __pyx_mstate_global->__pyx_n_u_DATETIME20, __pyx_mstate_global->__pyx_kp_u_DATETIME23_2, __pyx_mstate_global->__pyx_n_u_YMDHMS16, __pyx_mstate_global->__pyx_n_u_YMDHMS19, __pyx_mstate_global->__pyx_kp_u_YMDHMS19_2, __pyx_mstate_global->__pyx_n_u_YMDHMS20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, ((PyObject*)__pyx_t_3)); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, ((PyObject*)__pyx_t_4)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":64 * @@ -20870,12 +20608,12 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats */ - __pyx_t_3 = __Pyx_PyList_Pack(16, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_DATE8, __pyx_mstate_global->__pyx_n_u_DATE11, __pyx_mstate_global->__pyx_n_u_DATE12, __pyx_mstate_global->__pyx_n_u_ADATE, __pyx_mstate_global->__pyx_n_u_ADATE8, __pyx_mstate_global->__pyx_n_u_ADATE10, __pyx_mstate_global->__pyx_n_u_EDATE, __pyx_mstate_global->__pyx_n_u_EDATE8, __pyx_mstate_global->__pyx_n_u_EDATE10, __pyx_mstate_global->__pyx_n_u_JDATE, __pyx_mstate_global->__pyx_n_u_JDATE5, __pyx_mstate_global->__pyx_n_u_JDATE7, __pyx_mstate_global->__pyx_n_u_SDATE, __pyx_mstate_global->__pyx_n_u_SDATE8, __pyx_mstate_global->__pyx_n_u_SDATE10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_Pack(16, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_DATE8, __pyx_mstate_global->__pyx_n_u_DATE11, __pyx_mstate_global->__pyx_n_u_DATE12, __pyx_mstate_global->__pyx_n_u_ADATE, __pyx_mstate_global->__pyx_n_u_ADATE8, __pyx_mstate_global->__pyx_n_u_ADATE10, __pyx_mstate_global->__pyx_n_u_EDATE, __pyx_mstate_global->__pyx_n_u_EDATE8, __pyx_mstate_global->__pyx_n_u_EDATE10, __pyx_mstate_global->__pyx_n_u_JDATE, __pyx_mstate_global->__pyx_n_u_JDATE5, __pyx_mstate_global->__pyx_n_u_JDATE7, __pyx_mstate_global->__pyx_n_u_SDATE, __pyx_mstate_global->__pyx_n_u_SDATE8, __pyx_mstate_global->__pyx_n_u_SDATE10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, ((PyObject*)__pyx_t_3)); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, ((PyObject*)__pyx_t_4)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":65 * cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] @@ -20884,12 +20622,12 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats * cdef list spss_all_formats */ - __pyx_t_3 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_DTIME, __pyx_mstate_global->__pyx_n_u_TIME8, __pyx_mstate_global->__pyx_n_u_TIME5, __pyx_mstate_global->__pyx_kp_u_TIME11_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_DTIME, __pyx_mstate_global->__pyx_n_u_TIME8, __pyx_mstate_global->__pyx_n_u_TIME5, __pyx_mstate_global->__pyx_kp_u_TIME11_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, ((PyObject*)__pyx_t_3)); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, ((PyObject*)__pyx_t_4)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":68 * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats @@ -20898,12 +20636,12 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * cdef object spss_secs_from_unix = total_seconds(unix_origin - spss_origin) * */ - __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x62E, 10, 14, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x62E, 10, 14, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":69 * cdef list spss_all_formats @@ -20912,12 +20650,12 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * * cdef list stata_datetime_formats = ["%tC", "%tc"] */ - __pyx_t_3 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_spss_origin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 69, __pyx_L1_error) - __pyx_t_2 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_4 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_spss_origin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_4))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -20989,13 +20727,13 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_stata_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 77, __pyx_L1_error) - __pyx_t_3 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":79 * cdef object stata_secs_from_unix = total_seconds(unix_origin - stata_origin) @@ -21004,15 +20742,15 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * READSTAT_TYPE_INT8: np.int64, READSTAT_TYPE_INT16: np.int64, READSTAT_TYPE_INT32:np.int64, * READSTAT_TYPE_FLOAT: np.float64, READSTAT_TYPE_DOUBLE: np.float64} */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, __pyx_builtin_object) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, __pyx_builtin_object) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":80 @@ -21024,33 +20762,33 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); */ __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, __pyx_t_5) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_t_2) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_t_6, __pyx_t_2) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":81 @@ -21062,38 +20800,41 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); */ __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, __pyx_t_5) < 0) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, ((PyObject*)__pyx_t_3)); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, ((PyObject*)__pyx_t_4)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -21101,10 +20842,13 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pyreadstat/_readstat_parser.pyx":131 * @@ -21113,25 +20857,28 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * """ * Just defining a custom exception to raise when readstat gives an error return code. */ - __pyx_t_3 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_mstate_global->__pyx_n_u_ReadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_mstate_global->__pyx_n_u_ReadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_4 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 131, __pyx_L1_error) + if (__pyx_t_6 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 131, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_3) < 0) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_6, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_4) < (0)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "pyreadstat/_readstat_parser.pyx":138 * @@ -21140,25 +20887,28 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * """ * Just defining a custom exception to raise when pyreadstat raises an exception. */ - __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_mstate_global->__pyx_n_u_PyreadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_5 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 138, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_5, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_mstate_global->__pyx_n_u_PyreadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_4) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + if (__pyx_t_7 != __pyx_t_6) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 138, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + #endif + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_6) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pyreadstat/_readstat_parser.pyx":846 * @@ -21179,8 +20929,8 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * list extra_date_formats=None, list extra_time_formats=None): * */ - __pyx_t_5 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1349, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -21191,15 +20941,18 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, */ - __pyx_t_3 = PyTuple_Pack(15, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_True), ((PyObject*)Py_False), Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), __pyx_t_5, __pyx_t_2, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = PyTuple_Pack(15, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_True), ((PyObject*)Py_False), Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), __pyx_t_7, __pyx_t_2, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_1parser_entry_point, 0, __pyx_mstate_global->__pyx_n_u_parser_entry_point, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parser_entry_point, __pyx_t_2) < 0) __PYX_ERR(0, 1346, __pyx_L1_error) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parser_entry_point, __pyx_t_2) < (0)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1 @@ -21209,7 +20962,7 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ @@ -21217,9 +20970,9 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); - __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); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pyreadstat._readstat_parser", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -21247,377 +21000,26 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); #endif } /* #### Code section: pystring_table ### */ - -typedef struct { - const char *s; -#if 179 <= 65535 - const unsigned short n; -#elif 179 / 2 < INT_MAX - const unsigned int n; -#elif 179 / 2 < LONG_MAX - const unsigned long n; -#else - const Py_ssize_t n; -#endif -#if 1 <= 31 - const unsigned int encoding : 5; -#elif 1 <= 255 - const unsigned char encoding; -#elif 1 <= 65535 - const unsigned short encoding; -#else - const Py_ssize_t encoding; -#endif - const unsigned int is_unicode : 1; - const unsigned int intern : 1; -} __Pyx_StringTabEntry; -static const char * const __pyx_string_tab_encodings[] = { 0 }; -static const __Pyx_StringTabEntry __pyx_string_tab[] = { - {__pyx_k_, sizeof(__pyx_k_), 0, 0, 0}, /* PyObject cname: __pyx_kp_b_ */ - {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ - {__pyx_k_ADATE, sizeof(__pyx_k_ADATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ADATE */ - {__pyx_k_ADATE10, sizeof(__pyx_k_ADATE10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ADATE10 */ - {__pyx_k_ADATE8, sizeof(__pyx_k_ADATE8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ADATE8 */ - {__pyx_k_B8601DA, sizeof(__pyx_k_B8601DA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_B8601DA */ - {__pyx_k_B8601DN, sizeof(__pyx_k_B8601DN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_B8601DN */ - {__pyx_k_B8601DT, sizeof(__pyx_k_B8601DT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_B8601DT */ - {__pyx_k_B8601TM, sizeof(__pyx_k_B8601TM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_B8601TM */ - {__pyx_k_DATE, sizeof(__pyx_k_DATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATE */ - {__pyx_k_DATE11, sizeof(__pyx_k_DATE11), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATE11 */ - {__pyx_k_DATE12, sizeof(__pyx_k_DATE12), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATE12 */ - {__pyx_k_DATE8, sizeof(__pyx_k_DATE8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATE8 */ - {__pyx_k_DATE9, sizeof(__pyx_k_DATE9), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATE9 */ - {__pyx_k_DATEAMPM, sizeof(__pyx_k_DATEAMPM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATEAMPM */ - {__pyx_k_DATETIME, sizeof(__pyx_k_DATETIME), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME */ - {__pyx_k_DATETIME17, sizeof(__pyx_k_DATETIME17), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME17 */ - {__pyx_k_DATETIME18, sizeof(__pyx_k_DATETIME18), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME18 */ - {__pyx_k_DATETIME19, sizeof(__pyx_k_DATETIME19), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME19 */ - {__pyx_k_DATETIME20, sizeof(__pyx_k_DATETIME20), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME20 */ - {__pyx_k_DATETIME21, sizeof(__pyx_k_DATETIME21), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME21 */ - {__pyx_k_DATETIME22, sizeof(__pyx_k_DATETIME22), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME22 */ - {__pyx_k_DATETIME23_2, sizeof(__pyx_k_DATETIME23_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_DATETIME23_2 */ - {__pyx_k_DATETIME8, sizeof(__pyx_k_DATETIME8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DATETIME8 */ - {__pyx_k_DDMMYY, sizeof(__pyx_k_DDMMYY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYY */ - {__pyx_k_DDMMYYB, sizeof(__pyx_k_DDMMYYB), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYB */ - {__pyx_k_DDMMYYB10, sizeof(__pyx_k_DDMMYYB10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYB10 */ - {__pyx_k_DDMMYYC, sizeof(__pyx_k_DDMMYYC), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYC */ - {__pyx_k_DDMMYYC10, sizeof(__pyx_k_DDMMYYC10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYC10 */ - {__pyx_k_DDMMYYD, sizeof(__pyx_k_DDMMYYD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYD */ - {__pyx_k_DDMMYYD10, sizeof(__pyx_k_DDMMYYD10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYD10 */ - {__pyx_k_DDMMYYN6, sizeof(__pyx_k_DDMMYYN6), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYN6 */ - {__pyx_k_DDMMYYN8, sizeof(__pyx_k_DDMMYYN8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYN8 */ - {__pyx_k_DDMMYYP, sizeof(__pyx_k_DDMMYYP), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYP */ - {__pyx_k_DDMMYYP10, sizeof(__pyx_k_DDMMYYP10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYP10 */ - {__pyx_k_DDMMYYS, sizeof(__pyx_k_DDMMYYS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYS */ - {__pyx_k_DDMMYYS10, sizeof(__pyx_k_DDMMYYS10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DDMMYYS10 */ - {__pyx_k_DTDATE, sizeof(__pyx_k_DTDATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DTDATE */ - {__pyx_k_DTIME, sizeof(__pyx_k_DTIME), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DTIME */ - {__pyx_k_E8601DA, sizeof(__pyx_k_E8601DA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_E8601DA */ - {__pyx_k_E8601DT, sizeof(__pyx_k_E8601DT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_E8601DT */ - {__pyx_k_E8601TM, sizeof(__pyx_k_E8601TM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_E8601TM */ - {__pyx_k_EDATE, sizeof(__pyx_k_EDATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EDATE */ - {__pyx_k_EDATE10, sizeof(__pyx_k_EDATE10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EDATE10 */ - {__pyx_k_EDATE8, sizeof(__pyx_k_EDATE8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EDATE8 */ - {__pyx_k_Failed_convert_C_to_python_value, sizeof(__pyx_k_Failed_convert_C_to_python_value), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_convert_C_to_python_value */ - {__pyx_k_Failed_to_read_number_of_variabl, sizeof(__pyx_k_Failed_to_read_number_of_variabl), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_read_number_of_variabl */ - {__pyx_k_File_0_does_not_exist, sizeof(__pyx_k_File_0_does_not_exist), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_File_0_does_not_exist */ - {__pyx_k_HHMM, sizeof(__pyx_k_HHMM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HHMM */ - {__pyx_k_IS8601DA, sizeof(__pyx_k_IS8601DA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IS8601DA */ - {__pyx_k_IS8601DT, sizeof(__pyx_k_IS8601DT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IS8601DT */ - {__pyx_k_IS8601TM, sizeof(__pyx_k_IS8601TM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IS8601TM */ - {__pyx_k_JDATE, sizeof(__pyx_k_JDATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_JDATE */ - {__pyx_k_JDATE5, sizeof(__pyx_k_JDATE5), 0, 1, 1}, /* PyObject cname: __pyx_n_u_JDATE5 */ - {__pyx_k_JDATE7, sizeof(__pyx_k_JDATE7), 0, 1, 1}, /* PyObject cname: __pyx_n_u_JDATE7 */ - {__pyx_k_Just_defining_a_custom_exceptio, sizeof(__pyx_k_Just_defining_a_custom_exceptio), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Just_defining_a_custom_exceptio */ - {__pyx_k_Just_defining_a_custom_exceptio_2, sizeof(__pyx_k_Just_defining_a_custom_exceptio_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Just_defining_a_custom_exceptio_2 */ - {__pyx_k_M8_ns, sizeof(__pyx_k_M8_ns), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_M8_ns */ - {__pyx_k_MDYAMPM, sizeof(__pyx_k_MDYAMPM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MDYAMPM */ - {__pyx_k_MMDDYY, sizeof(__pyx_k_MMDDYY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYY */ - {__pyx_k_MMDDYYB, sizeof(__pyx_k_MMDDYYB), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYB */ - {__pyx_k_MMDDYYB10, sizeof(__pyx_k_MMDDYYB10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYB10 */ - {__pyx_k_MMDDYYC, sizeof(__pyx_k_MMDDYYC), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYC */ - {__pyx_k_MMDDYYC10, sizeof(__pyx_k_MMDDYYC10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYC10 */ - {__pyx_k_MMDDYYD, sizeof(__pyx_k_MMDDYYD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYD */ - {__pyx_k_MMDDYYD10, sizeof(__pyx_k_MMDDYYD10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYD10 */ - {__pyx_k_MMDDYYN6, sizeof(__pyx_k_MMDDYYN6), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYN6 */ - {__pyx_k_MMDDYYN8, sizeof(__pyx_k_MMDDYYN8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYN8 */ - {__pyx_k_MMDDYYP, sizeof(__pyx_k_MMDDYYP), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYP */ - {__pyx_k_MMDDYYP10, sizeof(__pyx_k_MMDDYYP10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYP10 */ - {__pyx_k_MMDDYYS, sizeof(__pyx_k_MMDDYYS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYS */ - {__pyx_k_MMDDYYS10, sizeof(__pyx_k_MMDDYYS10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MMDDYYS10 */ - {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_None */ - {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ - {__pyx_k_Object, sizeof(__pyx_k_Object), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Object */ - {__pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_OrderedDict */ - {__pyx_k_PyreadstatError, sizeof(__pyx_k_PyreadstatError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PyreadstatError */ - {__pyx_k_ReadstatError, sizeof(__pyx_k_ReadstatError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ReadstatError */ - {__pyx_k_SDATE, sizeof(__pyx_k_SDATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SDATE */ - {__pyx_k_SDATE10, sizeof(__pyx_k_SDATE10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SDATE10 */ - {__pyx_k_SDATE8, sizeof(__pyx_k_SDATE8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SDATE8 */ - {__pyx_k_STRING_type_with_value, sizeof(__pyx_k_STRING_type_with_value), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_STRING_type_with_value */ - {__pyx_k_TIME, sizeof(__pyx_k_TIME), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIME */ - {__pyx_k_TIME11_2, sizeof(__pyx_k_TIME11_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_TIME11_2 */ - {__pyx_k_TIME20, sizeof(__pyx_k_TIME20), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIME20 */ - {__pyx_k_TIME20_3, sizeof(__pyx_k_TIME20_3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_TIME20_3 */ - {__pyx_k_TIME5, sizeof(__pyx_k_TIME5), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIME5 */ - {__pyx_k_TIME8, sizeof(__pyx_k_TIME8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIME8 */ - {__pyx_k_TIMEAMPM, sizeof(__pyx_k_TIMEAMPM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIMEAMPM */ - {__pyx_k_TOD, sizeof(__pyx_k_TOD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TOD */ - {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */ - {__pyx_k_UnicodeError, sizeof(__pyx_k_UnicodeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UnicodeError */ - {__pyx_k_Unknown_file_format, sizeof(__pyx_k_Unknown_file_format), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unknown_file_format */ - {__pyx_k_Unkown_data_type, sizeof(__pyx_k_Unkown_data_type), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unkown_data_type */ - {__pyx_k_WEEKDATE, sizeof(__pyx_k_WEEKDATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_WEEKDATE */ - {__pyx_k_WEEKDATX, sizeof(__pyx_k_WEEKDATX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_WEEKDATX */ - {__pyx_k_YMDHMS16, sizeof(__pyx_k_YMDHMS16), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YMDHMS16 */ - {__pyx_k_YMDHMS19, sizeof(__pyx_k_YMDHMS19), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YMDHMS19 */ - {__pyx_k_YMDHMS19_2, sizeof(__pyx_k_YMDHMS19_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_YMDHMS19_2 */ - {__pyx_k_YMDHMS20, sizeof(__pyx_k_YMDHMS20), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YMDHMS20 */ - {__pyx_k_YYMMDD, sizeof(__pyx_k_YYMMDD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDD */ - {__pyx_k_YYMMDD10, sizeof(__pyx_k_YYMMDD10), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDD10 */ - {__pyx_k_YYMMDDB, sizeof(__pyx_k_YYMMDDB), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDDB */ - {__pyx_k_YYMMDDD, sizeof(__pyx_k_YYMMDDD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDDD */ - {__pyx_k_YYMMDDN, sizeof(__pyx_k_YYMMDDN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDDN */ - {__pyx_k_YYMMDDP, sizeof(__pyx_k_YYMMDDP), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDDP */ - {__pyx_k_YYMMDDS, sizeof(__pyx_k_YYMMDDS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_YYMMDDS */ - {__pyx_k_You_requested_pandas_as_output_f, sizeof(__pyx_k_You_requested_pandas_as_output_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_You_requested_pandas_as_output_f */ - {__pyx_k_You_requested_polars_as_output_f, sizeof(__pyx_k_You_requested_polars_as_output_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_You_requested_polars_as_output_f */ - {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ - {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ - {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ - {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ - {__pyx_k_all, sizeof(__pyx_k_all), 0, 1, 1}, /* PyObject cname: __pyx_n_u_all */ - {__pyx_k_allowed_formats, sizeof(__pyx_k_allowed_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_allowed_formats */ - {__pyx_k_append, sizeof(__pyx_k_append), 0, 1, 1}, /* PyObject cname: __pyx_n_u_append */ - {__pyx_k_astype, sizeof(__pyx_k_astype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_astype */ - {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ - {__pyx_k_backend, sizeof(__pyx_k_backend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_backend */ - {__pyx_k_center, sizeof(__pyx_k_center), 0, 1, 1}, /* PyObject cname: __pyx_n_u_center */ - {__pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 1, 1}, /* PyObject cname: __pyx_n_u_class_getitem */ - {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ - {__pyx_k_col, sizeof(__pyx_k_col), 0, 1, 1}, /* PyObject cname: __pyx_n_u_col */ - {__pyx_k_collections, sizeof(__pyx_k_collections), 0, 1, 1}, /* PyObject cname: __pyx_n_u_collections */ - {__pyx_k_column_0_is_duplicated_renamed_t, sizeof(__pyx_k_column_0_is_duplicated_renamed_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_column_0_is_duplicated_renamed_t */ - {__pyx_k_column_labels, sizeof(__pyx_k_column_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_column_labels */ - {__pyx_k_column_names, sizeof(__pyx_k_column_names), 0, 1, 1}, /* PyObject cname: __pyx_n_u_column_names */ - {__pyx_k_column_names_to_labels, sizeof(__pyx_k_column_names_to_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_column_names_to_labels */ - {__pyx_k_columns, sizeof(__pyx_k_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_columns */ - {__pyx_k_copy, sizeof(__pyx_k_copy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_copy */ - {__pyx_k_counted_value, sizeof(__pyx_k_counted_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_counted_value */ - {__pyx_k_creation_time, sizeof(__pyx_k_creation_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_creation_time */ - {__pyx_k_d, sizeof(__pyx_k_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d */ - {__pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_d_2 */ - {__pyx_k_data_container, sizeof(__pyx_k_data_container), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_container */ - {__pyx_k_data_container___reduce_cython, sizeof(__pyx_k_data_container___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_container___reduce_cython */ - {__pyx_k_data_container___setstate_cython, sizeof(__pyx_k_data_container___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_container___setstate_cython */ - {__pyx_k_data_frame, sizeof(__pyx_k_data_frame), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_frame */ - {__pyx_k_date, sizeof(__pyx_k_date), 0, 1, 1}, /* PyObject cname: __pyx_n_u_date */ - {__pyx_k_dates_as_pandas, sizeof(__pyx_k_dates_as_pandas), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dates_as_pandas */ - {__pyx_k_dates_as_pandas_datetime, sizeof(__pyx_k_dates_as_pandas_datetime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dates_as_pandas_datetime */ - {__pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_datetime */ - {__pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict */ - {__pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_disable */ - {__pyx_k_disable_datetime_conversion, sizeof(__pyx_k_disable_datetime_conversion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_disable_datetime_conversion */ - {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ - {__pyx_k_double, sizeof(__pyx_k_double), 0, 1, 1}, /* PyObject cname: __pyx_n_u_double */ - {__pyx_k_dta, sizeof(__pyx_k_dta), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dta */ - {__pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dtype */ - {__pyx_k_dtypes, sizeof(__pyx_k_dtypes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dtypes */ - {__pyx_k_duplicated, sizeof(__pyx_k_duplicated), 0, 1, 1}, /* PyObject cname: __pyx_n_u_duplicated */ - {__pyx_k_empty, sizeof(__pyx_k_empty), 0, 1, 1}, /* PyObject cname: __pyx_n_u_empty */ - {__pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_enable */ - {__pyx_k_encode, sizeof(__pyx_k_encode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_encode */ - {__pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 1, 1}, /* PyObject cname: __pyx_n_u_encoding */ - {__pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enumerate */ - {__pyx_k_expanduser, sizeof(__pyx_k_expanduser), 0, 1, 1}, /* PyObject cname: __pyx_n_u_expanduser */ - {__pyx_k_extend, sizeof(__pyx_k_extend), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extend */ - {__pyx_k_extra_date_formats, sizeof(__pyx_k_extra_date_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extra_date_formats */ - {__pyx_k_extra_datetime_formats, sizeof(__pyx_k_extra_datetime_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extra_datetime_formats */ - {__pyx_k_extra_time_formats, sizeof(__pyx_k_extra_time_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_extra_time_formats */ - {__pyx_k_file_encoding, sizeof(__pyx_k_file_encoding), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_encoding */ - {__pyx_k_file_extension, sizeof(__pyx_k_file_extension), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_extension */ - {__pyx_k_file_format, sizeof(__pyx_k_file_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_format */ - {__pyx_k_file_label, sizeof(__pyx_k_file_label), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_label */ - {__pyx_k_file_path_could_not_be_encoded_w, sizeof(__pyx_k_file_path_could_not_be_encoded_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_file_path_could_not_be_encoded_w */ - {__pyx_k_filename_path, sizeof(__pyx_k_filename_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filename_path */ - {__pyx_k_fill, sizeof(__pyx_k_fill), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fill */ - {__pyx_k_float, sizeof(__pyx_k_float), 0, 1, 1}, /* PyObject cname: __pyx_n_u_float */ - {__pyx_k_float64, sizeof(__pyx_k_float64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_float64 */ - {__pyx_k_format, sizeof(__pyx_k_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_format */ - {__pyx_k_formats_as_category, sizeof(__pyx_k_formats_as_category), 0, 1, 1}, /* PyObject cname: __pyx_n_u_formats_as_category */ - {__pyx_k_formats_as_ordered_category, sizeof(__pyx_k_formats_as_ordered_category), 0, 1, 1}, /* PyObject cname: __pyx_n_u_formats_as_ordered_category */ - {__pyx_k_from_dict, sizeof(__pyx_k_from_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_from_dict */ - {__pyx_k_from_epoch, sizeof(__pyx_k_from_epoch), 0, 1, 1}, /* PyObject cname: __pyx_n_u_from_epoch */ - {__pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fromtimestamp */ - {__pyx_k_fsdecode, sizeof(__pyx_k_fsdecode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fsdecode */ - {__pyx_k_fsencode, sizeof(__pyx_k_fsencode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fsencode */ - {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ - {__pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_gc */ - {__pyx_k_get, sizeof(__pyx_k_get), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get */ - {__pyx_k_get_native_namespace, sizeof(__pyx_k_get_native_namespace), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_native_namespace */ - {__pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getfilesystemencoding */ - {__pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getstate */ - {__pyx_k_hi, sizeof(__pyx_k_hi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_hi */ - {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ - {__pyx_k_int16, sizeof(__pyx_k_int16), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int16 */ - {__pyx_k_int32, sizeof(__pyx_k_int32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int32 */ - {__pyx_k_int64, sizeof(__pyx_k_int64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int64 */ - {__pyx_k_int8, sizeof(__pyx_k_int8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int8 */ - {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ - {__pyx_k_is_dichotomy, sizeof(__pyx_k_is_dichotomy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_dichotomy */ - {__pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_isenabled */ - {__pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_isfile */ - {__pyx_k_items, sizeof(__pyx_k_items), 0, 1, 1}, /* PyObject cname: __pyx_n_u_items */ - {__pyx_k_keys, sizeof(__pyx_k_keys), 0, 1, 1}, /* PyObject cname: __pyx_n_u_keys */ - {__pyx_k_label, sizeof(__pyx_k_label), 0, 1, 1}, /* PyObject cname: __pyx_n_u_label */ - {__pyx_k_left, sizeof(__pyx_k_left), 0, 1, 1}, /* PyObject cname: __pyx_n_u_left */ - {__pyx_k_lo, sizeof(__pyx_k_lo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lo */ - {__pyx_k_loc, sizeof(__pyx_k_loc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_loc */ - {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ - {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ - {__pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metadata */ - {__pyx_k_metadata_container, sizeof(__pyx_k_metadata_container), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metadata_container */ - {__pyx_k_metadataonly, sizeof(__pyx_k_metadataonly), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metadataonly */ - {__pyx_k_metaonly, sizeof(__pyx_k_metaonly), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaonly */ - {__pyx_k_missing_ranges, sizeof(__pyx_k_missing_ranges), 0, 1, 1}, /* PyObject cname: __pyx_n_u_missing_ranges */ - {__pyx_k_missing_user_values, sizeof(__pyx_k_missing_user_values), 0, 1, 1}, /* PyObject cname: __pyx_n_u_missing_user_values */ - {__pyx_k_modification_time, sizeof(__pyx_k_modification_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_modification_time */ - {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ - {__pyx_k_mr_sets, sizeof(__pyx_k_mr_sets), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mr_sets */ - {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ - {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ - {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ - {__pyx_k_nan, sizeof(__pyx_k_nan), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nan */ - {__pyx_k_narwhals, sizeof(__pyx_k_narwhals), 0, 1, 1}, /* PyObject cname: __pyx_n_u_narwhals */ - {__pyx_k_narwhals_stable_v2, sizeof(__pyx_k_narwhals_stable_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_narwhals_stable_v2 */ - {__pyx_k_no_datetime_conversion, sizeof(__pyx_k_no_datetime_conversion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_no_datetime_conversion */ - {__pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_no_default___reduce___due_to_non */ - {__pyx_k_nominal, sizeof(__pyx_k_nominal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nominal */ - {__pyx_k_notes, sizeof(__pyx_k_notes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_notes */ - {__pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, /* PyObject cname: __pyx_n_u_np */ - {__pyx_k_nt, sizeof(__pyx_k_nt), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nt */ - {__pyx_k_number_columns, sizeof(__pyx_k_number_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_number_columns */ - {__pyx_k_number_rows, sizeof(__pyx_k_number_rows), 0, 1, 1}, /* PyObject cname: __pyx_n_u_number_rows */ - {__pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numpy */ - {__pyx_k_nw, sizeof(__pyx_k_nw), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nw */ - {__pyx_k_object, sizeof(__pyx_k_object), 0, 1, 1}, /* PyObject cname: __pyx_n_u_object */ - {__pyx_k_ordinal, sizeof(__pyx_k_ordinal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ordinal */ - {__pyx_k_original_variable_types, sizeof(__pyx_k_original_variable_types), 0, 1, 1}, /* PyObject cname: __pyx_n_u_original_variable_types */ - {__pyx_k_os, sizeof(__pyx_k_os), 0, 1, 1}, /* PyObject cname: __pyx_n_u_os */ - {__pyx_k_output_format, sizeof(__pyx_k_output_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_output_format */ - {__pyx_k_output_format_must_be_one_of_all, sizeof(__pyx_k_output_format_must_be_one_of_all), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_output_format_must_be_one_of_all */ - {__pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pandas */ - {__pyx_k_parser_entry_point, sizeof(__pyx_k_parser_entry_point), 0, 1, 1}, /* PyObject cname: __pyx_n_u_parser_entry_point */ - {__pyx_k_parser_format, sizeof(__pyx_k_parser_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_parser_format */ - {__pyx_k_path, sizeof(__pyx_k_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_path */ - {__pyx_k_path_must_be_either_str_or_bytes, sizeof(__pyx_k_path_must_be_either_str_or_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_path_must_be_either_str_or_bytes */ - {__pyx_k_path_must_be_str_bytes_or_unicod, sizeof(__pyx_k_path_must_be_str_bytes_or_unicod), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_path_must_be_str_bytes_or_unicod */ - {__pyx_k_polars, sizeof(__pyx_k_polars), 0, 1, 1}, /* PyObject cname: __pyx_n_u_polars */ - {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ - {__pyx_k_por, sizeof(__pyx_k_por), 0, 1, 1}, /* PyObject cname: __pyx_n_u_por */ - {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ - {__pyx_k_pyclasses, sizeof(__pyx_k_pyclasses), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyclasses */ - {__pyx_k_pyreadstat__readstat_parser, sizeof(__pyx_k_pyreadstat__readstat_parser), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyreadstat__readstat_parser */ - {__pyx_k_pyreadstat__readstat_parser_pyx, sizeof(__pyx_k_pyreadstat__readstat_parser_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_pyreadstat__readstat_parser_pyx */ - {__pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_capi */ - {__pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_state */ - {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ - {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */ - {__pyx_k_read, sizeof(__pyx_k_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read */ - {__pyx_k_readstat_to_numpy_types, sizeof(__pyx_k_readstat_to_numpy_types), 0, 1, 1}, /* PyObject cname: __pyx_n_u_readstat_to_numpy_types */ - {__pyx_k_readstat_variable_types, sizeof(__pyx_k_readstat_variable_types), 0, 1, 1}, /* PyObject cname: __pyx_n_u_readstat_variable_types */ - {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ - {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */ - {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */ - {__pyx_k_right, sizeof(__pyx_k_right), 0, 1, 1}, /* PyObject cname: __pyx_n_u_right */ - {__pyx_k_row_limit, sizeof(__pyx_k_row_limit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_row_limit */ - {__pyx_k_row_offset, sizeof(__pyx_k_row_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_row_offset */ - {__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */ - {__pyx_k_sas7bcat, sizeof(__pyx_k_sas7bcat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas7bcat */ - {__pyx_k_sas7bdat, sizeof(__pyx_k_sas7bdat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas7bdat */ - {__pyx_k_sas_all_formats, sizeof(__pyx_k_sas_all_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas_all_formats */ - {__pyx_k_sas_date_formats, sizeof(__pyx_k_sas_date_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas_date_formats */ - {__pyx_k_sas_datetime_formats, sizeof(__pyx_k_sas_datetime_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas_datetime_formats */ - {__pyx_k_sas_origin, sizeof(__pyx_k_sas_origin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas_origin */ - {__pyx_k_sas_time_formats, sizeof(__pyx_k_sas_time_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sas_time_formats */ - {__pyx_k_sav_zsav, sizeof(__pyx_k_sav_zsav), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_sav_zsav */ - {__pyx_k_scale, sizeof(__pyx_k_scale), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scale */ - {__pyx_k_schema, sizeof(__pyx_k_schema), 0, 1, 1}, /* PyObject cname: __pyx_n_u_schema */ - {__pyx_k_seek, sizeof(__pyx_k_seek), 0, 1, 1}, /* PyObject cname: __pyx_n_u_seek */ - {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ - {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ - {__pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate */ - {__pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate_cython */ - {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ - {__pyx_k_spss_all_formats, sizeof(__pyx_k_spss_all_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spss_all_formats */ - {__pyx_k_spss_date_formats, sizeof(__pyx_k_spss_date_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spss_date_formats */ - {__pyx_k_spss_datetime_formats, sizeof(__pyx_k_spss_datetime_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spss_datetime_formats */ - {__pyx_k_spss_origin, sizeof(__pyx_k_spss_origin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spss_origin */ - {__pyx_k_spss_time_formats, sizeof(__pyx_k_spss_time_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spss_time_formats */ - {__pyx_k_stable, sizeof(__pyx_k_stable), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stable */ - {__pyx_k_stata_all_formats, sizeof(__pyx_k_stata_all_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stata_all_formats */ - {__pyx_k_stata_date_formats, sizeof(__pyx_k_stata_date_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stata_date_formats */ - {__pyx_k_stata_datetime_formats, sizeof(__pyx_k_stata_datetime_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stata_datetime_formats */ - {__pyx_k_stata_origin, sizeof(__pyx_k_stata_origin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stata_origin */ - {__pyx_k_stata_time_formats, sizeof(__pyx_k_stata_time_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stata_time_formats */ - {__pyx_k_string, sizeof(__pyx_k_string), 0, 1, 1}, /* PyObject cname: __pyx_n_u_string */ - {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */ - {__pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 1, 1}, /* PyObject cname: __pyx_n_u_surrogateescape */ - {__pyx_k_sys, sizeof(__pyx_k_sys), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sys */ - {__pyx_k_tC, sizeof(__pyx_k_tC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tC */ - {__pyx_k_table_name, sizeof(__pyx_k_table_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_table_name */ - {__pyx_k_tc, sizeof(__pyx_k_tc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tc */ - {__pyx_k_tcHH_MM, sizeof(__pyx_k_tcHH_MM), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tcHH_MM */ - {__pyx_k_tcHH_MM_SS, sizeof(__pyx_k_tcHH_MM_SS), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tcHH_MM_SS */ - {__pyx_k_td, sizeof(__pyx_k_td), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_td */ - {__pyx_k_tdCCYY_NN_DD, sizeof(__pyx_k_tdCCYY_NN_DD), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tdCCYY_NN_DD */ - {__pyx_k_tdD_m_Y, sizeof(__pyx_k_tdD_m_Y), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_tdD_m_Y */ - {__pyx_k_tell, sizeof(__pyx_k_tell), 0, 1, 1}, /* PyObject cname: __pyx_n_u_tell */ - {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ - {__pyx_k_time, sizeof(__pyx_k_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_time */ - {__pyx_k_time_unit, sizeof(__pyx_k_time_unit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_time_unit */ - {__pyx_k_to_datetime, sizeof(__pyx_k_to_datetime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_to_datetime */ - {__pyx_k_to_native, sizeof(__pyx_k_to_native), 0, 1, 1}, /* PyObject cname: __pyx_n_u_to_native */ - {__pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 1, 1}, /* PyObject cname: __pyx_n_u_tolist */ - {__pyx_k_type, sizeof(__pyx_k_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_type */ - {__pyx_k_undetermined, sizeof(__pyx_k_undetermined), 0, 1, 1}, /* PyObject cname: __pyx_n_u_undetermined */ - {__pyx_k_unknown, sizeof(__pyx_k_unknown), 0, 1, 1}, /* PyObject cname: __pyx_n_u_unknown */ - {__pyx_k_usecols, sizeof(__pyx_k_usecols), 0, 1, 1}, /* PyObject cname: __pyx_n_u_usecols */ - {__pyx_k_user_missing, sizeof(__pyx_k_user_missing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_user_missing */ - {__pyx_k_usernan, sizeof(__pyx_k_usernan), 0, 1, 1}, /* PyObject cname: __pyx_n_u_usernan */ - {__pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_utf_8 */ - {__pyx_k_v2, sizeof(__pyx_k_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_v2 */ - {__pyx_k_value_labels, sizeof(__pyx_k_value_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value_labels */ - {__pyx_k_variable_alignment, sizeof(__pyx_k_variable_alignment), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_alignment */ - {__pyx_k_variable_display_width, sizeof(__pyx_k_variable_display_width), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_display_width */ - {__pyx_k_variable_list, sizeof(__pyx_k_variable_list), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_list */ - {__pyx_k_variable_measure, sizeof(__pyx_k_variable_measure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_measure */ - {__pyx_k_variable_storage_width, sizeof(__pyx_k_variable_storage_width), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_storage_width */ - {__pyx_k_variable_to_label, sizeof(__pyx_k_variable_to_label), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_to_label */ - {__pyx_k_variable_value_labels, sizeof(__pyx_k_variable_value_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_value_labels */ - {__pyx_k_warn, sizeof(__pyx_k_warn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_warn */ - {__pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 1, 1}, /* PyObject cname: __pyx_n_u_warnings */ - {__pyx_k_with_columns, sizeof(__pyx_k_with_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_with_columns */ - {__pyx_k_with_date_type_in_column, sizeof(__pyx_k_with_date_type_in_column), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_with_date_type_in_column */ - {__pyx_k_wrong_parser_format, sizeof(__pyx_k_wrong_parser_format), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_wrong_parser_format */ - {__pyx_k_xport, sizeof(__pyx_k_xport), 0, 1, 1}, /* PyObject cname: __pyx_n_u_xport */ - {__pyx_k_zip, sizeof(__pyx_k_zip), 0, 1, 1}, /* PyObject cname: __pyx_n_u_zip */ - {0, 0, 0, 0, 0} -}; -/* InitStrings.proto */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); - /* #### Code section: cached_builtins ### */ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 79, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 413, __pyx_L1_error) __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1065, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1084, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1183, __pyx_L1_error) - __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 1231, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_keys.method_name = &__pyx_mstate->__pyx_n_u_keys; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; return 0; __pyx_L1_error:; return -1; @@ -21650,17 +21052,44 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u_utf_8, __pyx_mstate_global->__pyx_n_u_surrogateescape); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - - /* "pyreadstat/_readstat_parser.pyx":33 - * import sys - * - * import narwhals.stable.v2 as nw # <<<<<<<<<<<<<< - * import numpy as np - * -*/ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_narwhals, __pyx_mstate_global->__pyx_n_u_stable, __pyx_mstate_global->__pyx_n_u_v2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 33, __pyx_L1_error) - __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); - __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_slice; + for (Py_ssize_t i=0; i<1; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -21671,40 +21100,126 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; - __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; - __pyx_mstate->__pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_keys.method_name = &__pyx_mstate->__pyx_n_u_keys; - __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; - if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_100000 = PyLong_FromLong(100000L); if (unlikely(!__pyx_mstate->__pyx_int_100000)) __PYX_ERR(0, 1, __pyx_L1_error) + { + const struct { const unsigned int length: 11; } index[] = {{0},{12},{32},{34},{24},{93},{88},{7},{4},{179},{24},{8},{8},{19},{16},{10},{62},{62},{1},{1},{1},{8},{44},{2},{7},{6},{149},{2},{9},{50},{75},{32},{34},{31},{22},{19},{29},{16},{13},{17},{17},{20},{14},{19},{8},{14},{3},{3},{8},{11},{3},{13},{8},{5},{28},{19},{5},{7},{6},{7},{7},{7},{7},{4},{6},{6},{5},{5},{8},{8},{10},{10},{10},{10},{10},{10},{9},{6},{7},{9},{7},{9},{7},{9},{8},{8},{7},{9},{7},{9},{6},{5},{7},{7},{7},{5},{7},{6},{4},{8},{8},{8},{5},{6},{6},{7},{6},{7},{9},{7},{9},{7},{9},{8},{8},{7},{9},{7},{9},{6},{11},{15},{20},{13},{5},{7},{6},{4},{6},{5},{5},{8},{3},{8},{8},{8},{8},{8},{6},{8},{7},{7},{7},{7},{7},{3},{15},{6},{6},{18},{7},{6},{17},{18},{3},{11},{13},{12},{22},{7},{4},{13},{13},{1},{14},{32},{34},{10},{4},{15},{24},{8},{4},{27},{7},{6},{3},{5},{6},{11},{5},{6},{8},{9},{10},{6},{18},{22},{18},{13},{14},{11},{10},{13},{4},{5},{7},{6},{19},{27},{9},{10},{13},{8},{8},{8},{3},{20},{21},{12},{2},{5},{5},{5},{4},{13},{12},{6},{5},{4},{5},{4},{2},{3},{8},{13},{8},{18},{12},{8},{14},{19},{17},{10},{7},{15},{4},{8},{3},{18},{22},{7},{5},{2},{2},{14},{11},{5},{2},{6},{7},{23},{2},{13},{6},{18},{13},{4},{6},{3},{3},{11},{9},{27},{12},{11},{12},{4},{23},{10},{17},{13},{5},{9},{10},{1},{8},{8},{5},{6},{4},{4},{12},{10},{12},{19},{6},{6},{15},{3},{10},{4},{8},{4},{9},{11},{9},{6},{4},{12},{7},{7},{12},{7},{2},{12},{6},{18},{22},{13},{16},{22},{17},{21},{4},{8},{12},{5},{3},{0},{1446},{310},{9},{283}}; + #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2566 bytes) */ +const char* const cstring = "BZh91AY&SY\317\002\362\226\000\001\264\377\377\346\377y\362c\377\377\375\277\373\377\352\377\377\377\377@@@@@@\000@@\000@@@\000@\000`\no\275y\335=v\356\0077{I\013\266\273\226\007N\264\242\226\306\212\016\373\303\022\021&\325=O\320\322b0S\323MO\"\0324b\000\000\003\322\032h\r4i\221\240hbh\006(Si\251\345OF\251\342F h\323A\221\223\004\000\310\321\202h\032i\2402i\246L\t\210i\203M\004F\241\225?H\217M@h\320\003M\006\200\000\320\003M\000\000\000\000\000\004\247\251\n`\232T\374\251\372\t\352i<\240h\000\000\365\006\200\000\000\000\001\352\000\000\323AJ\003B`\r\023\000\3214\300\000\000\000\004\304\311\200\230\000\000\0004\022$\010\t\244\315&\247\240\2325O\324\310\010\3656\243\324\006\232\000\001\240\000\000z\200\000\362\205\244-I]\334\014^]\261\253\345\327oj\331Q\221\346\001E\262\004o`\031\000\241\024Cw{\365\036\224\177\321l\324\"@\034\032>\001OV\247\374\377\323\252\351\247\247\021f\346\005:\321R\221\035M\301\034\201\366\357\234\007\345\340s\216f\024\2165\230&%\210Q\005J\363\325\324\016\375\002\020\374\347Y\3562B\363\262\230A\n\363\033\263\360\223\214\354a\346\364`3\036\351\237\210\241\006\262ly2-H\"\227\235\300X?J[Y4\250\025F\235\262\223\275\347E+@\034\326+\256*c\370\222@tz\332\246\241]*\302\324\375\2541J\354i\247\021G\030E=\316\205\0109\326\037b\3307\247Y\305O\353\353\367\313\253\202\275\261\211T\344\320\006m\026\345\224a\016\036\t\005\272\240\007j=N\225\371]\031\340t\022\206O\035\t\025F\314\031\301\302\233\007\004\\\275\326\206\276\334\351\352\225M4\211X\231\255\221m\014\004\273\026\204\304\014\300\335\\\303\002\215\3513(\316\366\364\230`D\324\251\222f\250!\035l\310\244\001hX\004UA\201\rK\305\256F\221\021m\0160Z\373\264(\001;B&\373\214\314\3768\277\027\243\335\312\277;\220\370\007h\031.\275\353\351\240\034\3544\003aTmS\336\360\230\373\327\214~\0168#\003\207r\257\260`\275\234r\246Y\364\357\311OC\304Eqj\267B=\236\217Z\225y\205\302R\210\234\213\351{\000\334\016\014\230@\250X$\224\257\244\030\260\325\261\206\367$\246]r\325\356-j*ZB\355L\220:\247^7[\367\333\027\246\031\244\266\234\313\314L\3556\262\202S\301\025 \232\302\033\310\200#Z\025B=J\261,W]y\233.\341\031vT\357r\337\333|L\272\252\351A\341\255\365\221k\020\226$\026\004\337T\204_\026\362\245Bd\234\231\322U\274\2468\343\024\230H\213H;\344\367q\t\3402\303\244\033\013\246\2210&[q\343\2213\030\326C\224\241 /W\336\3300M\322\010T\272)5\035\225\030\211\352Z\005n\3712\212\200\014\323qHG\013U\210D&P\235\033\033\003\023B&\320\332/\262d\022s\034+\315\256cE\373;\244]\262\2502I\222pF&&lA,(\203\005\022,\230\214\364\326\307\026\211cw&\254aY\232jl\337\351\307~E\024I\355@B\r\263\3458Y\361\302Y\307\016|\261\016\034\367\233\232Y8d\330n1W\353-9%\271\241\317\231Z\377\022VE\260e\355\004\0262gOE\024\2530\250c\333N\213\303aH\302\010\307I7\334\245\\\254\265wR\020YUt\0348h-\214\323_t\336\260$]\241\263i/4\315\247ND\276\336\266\270\274\327\233\273\246e\032+X\002F\023\224\366#\203G\027\312\"\275E\330_\201\317\235\261\304\317.\256\354,\211b\235\264E\022\207\204\344el\035\335\233d\211|\244\212\340.\327\021\227\251\313K\216^`\333@\333\003\261:\271\236\001\232LH\251\001\266d\244\023\261v\230\314\241g\346\261}\326{\320/~I%\347\230v\366\365\366dX\342\335\215\315iL\3006\226\320!4 \231GE\273\r\313\307\001b\342\370\276\377\244<\001\014#X\320\031\227X\245F\314@\224\277Q4\204\232\361V\274\256\216\322\275\022\244\340\\\310\252\271\010f\014\032\205\311*\314\300\224*\301\330\340@\271\320\344Th\026\356g""yug\001\206\363\027.\303[k\356x\242g2\271\362%V}\237\036\262\t\354\301#\034\340\006\206V\262\225e\266\3127\347'\017k\347\273\231}\333\210VE\003R\030\024\037\222\223\261\220P\006\254\270l\317+\257cYf\335\361Jt\361_@\336m7#\332\3174\267u\233#:\017\327h\321\275\261\3067H\2238[\212\300\032\344I\036\307\276\320\322\331\326g\"\026#S\232\247\313\216\315\030\223\025\"\020l<\250\016\tb\365k|\227*\227\3235PP%s$B\241\034\261\224\353\200&a%\3710\256\022\265\207\202&\317\266\377\340\263d\r=]\255\275\315\357\337\027\037\010\013\355\001\007i\275\302\023\241\007\203k\377S\363\364\247\207\223\340\030|F\004\030\226a\341Z\020\\508\004\0205h\310qN\201 \343A\301\010\301\320n\267\354\377S\315\224\332j\313\377\027rE8P\220\317\002\362\226"; + PyObject *data = __Pyx_DecompressString(cstring, 2566, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2345 bytes) */ +const char* const cstring = "x\332\255XQo\033\271\021V\000\027M\357\232\242i\201^[\240\000\363\220\352.\347(\222\222s\344kpEb9MR\310q\"\367Z\243\010x\364.%m\275Z\256\227\\\313{\271\024y\314\243\037\375\230\307\374\204{\354O\320\243\036\375\023\372\023\372\r\271\273Z\311>\244\311\305\2609\344p8\344\314|\234\341\272{wgs\347ao\263}\263\321\276/\202P\372\314S\321\241L\014\333`F\26183#\025\261C\021\2462\237\0077\221\302gQ:\336\223\tS\003\314&\201\330\013\245\276\017\001\366\274\371\202\371Jj\026)\303\344Q\240\315\225\217\030~\036\245\3320_\016\202(\210\206L0\017c5\206\204'c\023`\023R,\002-\331d$#\273\2076\302\260ap\010e\"b2IT\002\276I\223\010\247\364e\303\352}\037\345qV\252\267\\\247\277\020vz\357\364:\377\214\364\263-\025\311-e$3#Ho8\177\004\032\233\205\001\354\027F\206\031\323&\t<\003o@(b\333\233\333\327ounA\247\217\343\376KzF3\235\356y\241\320\264\025<\266\227\006\241\tp\252,\226\272\301\036\016X\246R\026I\347\336\030r\325\005\206\216\254\245\241\016\253\213\010\216\025tN\216\3450\267\316\374 \301&\360\023\255\276/B-\033\375\235\247\017\267\376b7`\223\300\214\\\010Y\235\202\335j5\3326\350\315\306\315\277E\373\221\232Dl@\241\033\250d,\014X\304\361\205\021v\375n\257\373\240\327o\2557\332\2738d\"\017R\251\rN\032\303>\001\317\301\242\324\304\251\341n9\2143\314\263\247d\3018V\200\222\223\\Z\255B\221\374\177\253\255d\275\361g\341\373\034|\351\2510\035G\254\016\244\325m(\3228\0147jA\002\004\227\\\245\330\321\347\266\004z\360\266+\236\3103>\0259\216\027\217\021\330\n\202\310\264\326\320\334l\243Y\273\205\246\303\003\234\265\2007\3728\317H\341\335\231\005\326A\204k\275/3m]\200\307\207\tUH!\034\003?\034?ci\204\273\005\266K\340)\350\034f\005GEaF}K\003\255\351\200\211@tu1\242\300:\220\3531\014\030\020 \n\244c\007\345\247!\321\304\302\226:\n!D=\003~\254'\346mt\266\352F\352\365F\"!%\225$F\027\001\036(f\016U\340\323y\255\270\365\315\017\317\234\223\nI\360\235\027\234=\315\302\322r\272\254\213\246\252\336\322\322\262\037\035\252\037uC\253\267n\361$\261\341\"\031\352\267*M\322h\231\307\256\225:\260\tJ%)*\354.e\355\177\3068\002M\032\346\305\271F\357#\356r\270\260\217\322\032\336q\221&X\224@\253-:\201\333\267\2367w\370\362<\251\203\332\212\2462\240\016n\265\021\n\366b\236-X\364L\230O\273U\013\342\305\240\334\374\034\227\324P\027\275}\23430\266J\247z~EjK?\345R\252^\364\002q\005\273\206B\213\232\023\026\257Y"";\256>\203KF\365\315k\231\356\315b\273\213s\261^RI\214E\235\005\347\354\302B+\365\027g\ry\177A\257\345,*.Y\347\254-T\333Au\376\345\205\331\312G\257>?~2\255\375\361\265\230}\362\371\233\326\354R}Z\1774}\364l\372,\236\306\007\263K\315i\363\356\364n\177\332\337\237\356\207\263K\020\371\357\317k?\271\370\362\337\307\375\223\013\263\213\2779\026\263\213\277;\271<\373\331'\307\372\344\312\207e\234^\374\305+u\362\344D\234\256\320\364\312O_\036\314.\376\372\270u\272\302^_\310\207\277?\271r\272\362\333\223b\370\253c\014\353\257\017\362\341\225\327\227OW~y\374\361\311Wo.\277\271\361\375\037\246\367\277\236~\375\315\364\0331\273\366\247\357\327\377\363p\332\223S\t\313\016\247\207\337M\277{1\273\266>]\1772}\002\346\340t\345\343Ww\216\017\376\007<\213\241\374"; + PyObject *data = __Pyx_DecompressString(cstring, 2345, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (5919 bytes) */ +const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to read number of variablesFile {0} does not exist!\n Just defining a custom exception to raise when readstat gives an error return code.\n \n Just defining a custom exception to raise when pyreadstat raises an exception.\n %tC%tc%tcHH:MM%tcHH:MM:SS%td%tdCCYY-NN-DD%tdD_m_Yutf-8' with date type in column 'wrong parser formatADATEADATE10ADATE8B8601DAB8601DNB8601DTB8601TMDATEDATE11DATE12DATE8DATE9DATEAMPMDATETIMEDATETIME17DATETIME18DATETIME19DATETIME20DATETIME21DATETIME22DATETIME8DDMMYYDDMMYYBDDMMYYB10DDMMYYCDDMMYYC10DDMMYYDDDMMYYD10DDMMYYN6DDMMYYN8DDMMYYPDDMMYYP10DDMMYYSDDMMYYS10DTDATEDTIMEE8601DAE8601DTE8601TMEDATEEDATE10EDATE8HHMMIS8601DAIS8601DTIS8601TMJDATEJDATE5JDATE7MDYAMPMMMDDYYMMDDYYBMMDDYYB10MMDDYYCMMDDYYC10MMDDYYDMMDDYYD10MMDDYYN6MMDDYYN8MMDDYYPMMDDYYP10MMDDYYSMMDDYYS10ObjectOrderedDictPyreadstatError__Pyx_PyDict_NextRefReadstatErrorSDATESDATE10SDATE8TIMETIM""E20TIME5TIME8TIMEAMPMTODWEEKDATEWEEKDATXYMDHMS16YMDHMS19YMDHMS20YYMMDDYYMMDD10YYMMDDBYYMMDDDYYMMDDNYYMMDDPYYMMDDSallallowed_formatsappendastypeasyncio.coroutinesbackendcenter__class_getitem__cline_in_tracebackcolcollectionscolumn_labelscolumn_namescolumn_names_to_labelscolumnscopycounted_valuecreation_timeddata_containerdata_container.__reduce_cython__data_container.__setstate_cython__data_framedatedates_as_pandasdates_as_pandas_datetimedatetimedictdisable_datetime_conversion__doc__doubledtadtypedtypes_duplicatedemptyencodeencodingenumerateexpanduserextendextra_date_formatsextra_datetime_formatsextra_time_formatsfile_encodingfile_extensionfile_formatfile_labelfilename_pathfillfloatfloat64formatformats_as_categoryformats_as_ordered_categoryfrom_dictfrom_epochfromtimestampfsdecodefsencode__func__getget_native_namespacegetfilesystemencoding__getstate__hiint16int32int64int8_is_coroutineis_dichotomyisfileitemskeyslabelleftloloc__main____metaclass__metadatametadata_containermetadataonlymetaonlymissing_rangesmissing_user_valuesmodification_time__module__mr_sets__mro_entries__name__name__nannarwhals.stable.v2no_datetime_conversionnominalnotesnpntnumber_columnsnumber_rowsnumpynwobjectordinaloriginal_variable_typesosoutput_formatpandasparser_entry_pointparser_formatpathpolarspoppor__prepare__pyclassespyreadstat._readstat_parser__pyx_capi____pyx_state__qualname__readreadstat_variable_types__reduce____reduce_cython____reduce_ex__rightrow_limitrow_offsetssas7bcatsas7bdatscaleschemaseekself__set_name__setdefault__setstate____setstate_cython__stablestringsurrogateescapesystable_nametell__test__timetime_unitto_datetimeto_nativetolisttypeundeterminedunknownusecolsuser_missingusernanv2value_labelsvaluesvariable_alignmentvariable_display_widthvariable_listvariable_measurevariable_storage_widthvariable_to_labelvariable_value_labelswarnwarningswith_columnsxportzipPyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, __pyx_t_10pyreadstat_16_readstat_parser_py_fil""e_extension, PyObject *, int, int, PyObject *, int, int, long, long, PyObject *, PyObject *, PyObject *, PyObject *)\000PyObject *(PyObject *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000PyObject *(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, double, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, PyObject *, int, PyObject *, double)\000PyObject *(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000\000__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format (PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format)\000int (char *, readstat_value_t, char *, void *)\000int (int, char *, void *)\000int (int, readstat_variable_t *, char *, void *)\000int (int, readstat_variable_t *, readstat_value_t, void *)\000int (readstat_metadata_t *, void *)\000void (char *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, long, long, struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser *__pyx_optional_args)\000void (readstat_error_t)\000run_conversion\000dict_to_dataframe\000transform_datetime\000data_container_extract_metadata\000data_container_to_dict\000transform_variable_format\000handle_value_label\000handle_note\000handle_variable\000handle_value\000handle_metadata\000run_readstat_parser\000check_exit_statusPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000readstat_to_numpy_types\000sas_all_formats\000sas_date_formats\000sas_datetime_formats\000sas_origin\000sas_time_formats\000spss_all_formats\000spss_date_formats\000spss_datetime_formats\000spss_origin\000spss_time_formats\000stata_all_formats\000stata_date_formats\000stata_datetime_formats\000stata_origin\000stata_time_formats\200\001\330\004\n\210+\220Q\320\000&\240a\330\027+\2501\330\r'\320'J\320J]\320]p\320pq\330\r0\3200A\320AS\320Sk\320kl\330\r+\2501\360\014\000\005\010\200~\220S\230\001\330\010\026\220a\330\010\031""\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\340\010\016\210o\230Q\230a\340\004\031\230\021\330\004\007\200q\330\010\023\2201\340\004 \240\001\330\004\007\200q\330\010\032\230!\340\004\030\230\001\330\004\007\200q\330\010\022\220!\340\004'\240q\330\004\007\200q\330\010!\240\021\340\004\020\220\013\230>\250\021\250/\270\035\320FV\320V`\320`a\330*;\2709\300I\320Me\320ek\320kv\320v|\320|}\330*9\3209Q\320Qe\320ef\340\004\013\210<\220q"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 319; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 56) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 319; i < 324; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 324; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 319; + for (Py_ssize_t i=0; i<5; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + int8_t const cint_constants_1[] = {0,1}; + int32_t const cint_constants_4[] = {100000L}; + for (int i = 0; i < 3; i++) { + numbertab[i] = PyLong_FromLong((i < 2 ? cint_constants_1[i - 0] : cint_constants_4[i - 2])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<3; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_codeobjects ### */ -\ - typedef struct { - unsigned int argcount : 5; - unsigned int num_posonly_args : 1; - unsigned int num_kwonly_args : 1; - unsigned int nlocals : 5; - unsigned int flags : 10; - unsigned int first_line : 11; - unsigned int line_table_length : 13; - } __Pyx_PyCode_New_function_description; +typedef struct { + unsigned int argcount : 5; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 5; + unsigned int flags : 10; + unsigned int first_line : 11; +} __Pyx_PyCode_New_function_description; /* NewCodeObj.proto */ static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, - const char *line_table, + PyObject *line_table, PyObject *tuple_dedup_map ); @@ -21713,19 +21228,19 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; - __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; - __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {16, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1346, 283}; + const __Pyx_PyCode_New_function_description descr = {16, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1346}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_filename_path, __pyx_mstate->__pyx_n_u_parser_format, __pyx_mstate->__pyx_n_u_metadataonly, __pyx_mstate->__pyx_n_u_dates_as_pandas_datetime, __pyx_mstate->__pyx_n_u_formats_as_category, __pyx_mstate->__pyx_n_u_formats_as_ordered_category, __pyx_mstate->__pyx_n_u_encoding, __pyx_mstate->__pyx_n_u_usecols, __pyx_mstate->__pyx_n_u_user_missing, __pyx_mstate->__pyx_n_u_disable_datetime_conversion, __pyx_mstate->__pyx_n_u_row_limit, __pyx_mstate->__pyx_n_u_row_offset, __pyx_mstate->__pyx_n_u_output_format, __pyx_mstate->__pyx_n_u_extra_datetime_formats, __pyx_mstate->__pyx_n_u_extra_date_formats, __pyx_mstate->__pyx_n_u_extra_time_formats, __pyx_mstate->__pyx_n_u_file_format, __pyx_mstate->__pyx_n_u_file_extension, __pyx_mstate->__pyx_n_u_metaonly, __pyx_mstate->__pyx_n_u_dates_as_pandas, __pyx_mstate->__pyx_n_u_usernan, __pyx_mstate->__pyx_n_u_no_datetime_conversion, __pyx_mstate->__pyx_n_u_data_frame, __pyx_mstate->__pyx_n_u_metadata}; - __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyreadstat__readstat_parser_pyx, __pyx_mstate->__pyx_n_u_parser_entry_point, __pyx_k_a_1_JJ_ppq_00AASSkkl_1_S_a_s_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyreadstat__readstat_parser_pyx, __pyx_mstate->__pyx_n_u_parser_entry_point, __pyx_mstate->__pyx_kp_b_iso88591_a_1_JJ_ppq_00AASSkkl_1_S_a_s_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; @@ -21738,22 +21253,32 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitGlobals(void) { /* PythonCompatibility.init */ if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CachedMethodType.init */ #if CYTHON_COMPILING_IN_LIMITED_API -{ - PyObject *typesModule=NULL; - typesModule = PyImport_ImportModule("types"); - if (typesModule) { - __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); - Py_DECREF(typesModule); - } -} // error handling follows -#endif - -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -21794,7 +21319,7 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #endif -/* PyErrExceptionMatches */ +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; @@ -21835,7 +21360,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta } #endif -/* PyErrFetchRestore */ +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 @@ -21894,7 +21419,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject } #endif -/* PyObjectGetAttrStr */ +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); @@ -21904,7 +21429,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject } #endif -/* PyObjectGetAttrStrNoError */ +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare @@ -21963,7 +21488,7 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } -/* TupleAndListFromArray */ +/* TupleAndListFromArray (used by fastcall) */ #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) @@ -21976,7 +21501,7 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { - if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < 0)) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } @@ -22019,7 +21544,7 @@ __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) } #endif -/* BytesEquals */ +/* BytesEquals (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) @@ -22067,7 +21592,7 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq #endif } -/* UnicodeEquals */ +/* UnicodeEquals (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL return PyObject_RichCompareBool(s1, s2, equals); @@ -22228,249 +21753,7 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } -/* RejectKeywords */ -static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { - PyObject *key = NULL; - if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { - key = __Pyx_PySequence_ITEM(kwds, 0); - } else { - Py_ssize_t pos = 0; -#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) - if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; -#endif - PyDict_Next(kwds, &pos, &key, NULL); - Py_INCREF(key); - } - if (likely(key)) { - PyErr_Format(PyExc_TypeError, - "%s() got an unexpected keyword argument '%U'", - function_name, key); - Py_DECREF(key); - } -} - -/* RaiseException */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - PyObject* owned_instance = NULL; - if (tb == Py_None) { - tb = 0; - } else if (tb && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto bad; - } - if (value == Py_None) - value = 0; - if (PyExceptionInstance_Check(type)) { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto bad; - } - value = type; - type = (PyObject*) Py_TYPE(value); - } else if (PyExceptionClass_Check(type)) { - PyObject *instance_class = NULL; - if (value && PyExceptionInstance_Check(value)) { - instance_class = (PyObject*) Py_TYPE(value); - if (instance_class != type) { - int is_subclass = PyObject_IsSubclass(instance_class, type); - if (!is_subclass) { - instance_class = NULL; - } else if (unlikely(is_subclass == -1)) { - goto bad; - } else { - type = instance_class; - } - } - } - if (!instance_class) { - PyObject *args; - if (!value) - args = PyTuple_New(0); - else if (PyTuple_Check(value)) { - Py_INCREF(value); - args = value; - } else - args = PyTuple_Pack(1, value); - if (!args) - goto bad; - owned_instance = PyObject_Call(type, args, NULL); - Py_DECREF(args); - if (!owned_instance) - goto bad; - value = owned_instance; - if (!PyExceptionInstance_Check(value)) { - PyErr_Format(PyExc_TypeError, - "calling %R should have returned an instance of " - "BaseException, not %R", - type, Py_TYPE(value)); - goto bad; - } - } - } else { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto bad; - } - if (cause) { - PyObject *fixed_cause; - if (cause == Py_None) { - fixed_cause = NULL; - } else if (PyExceptionClass_Check(cause)) { - fixed_cause = PyObject_CallObject(cause, NULL); - if (fixed_cause == NULL) - goto bad; - } else if (PyExceptionInstance_Check(cause)) { - fixed_cause = cause; - Py_INCREF(fixed_cause); - } else { - PyErr_SetString(PyExc_TypeError, - "exception causes must derive from " - "BaseException"); - goto bad; - } - PyException_SetCause(value, fixed_cause); - } - PyErr_SetObject(type, value); - if (tb) { -#if PY_VERSION_HEX >= 0x030C00A6 - PyException_SetTraceback(value, tb); -#elif CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } -#else - 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); -#endif - } -bad: - Py_XDECREF(owned_instance); - return; -} - -/* RaiseDoubleKeywords */ -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); -} - -/* PyFunctionFastCall */ -#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL -static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, - PyObject *globals) { - PyFrameObject *f; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject **fastlocals; - Py_ssize_t i; - PyObject *result; - assert(globals != NULL); - /* XXX Perhaps we should create a specialized - PyFrame_New() that doesn't take locals, but does - take builtins without sanity checking them. - */ - assert(tstate != NULL); - f = PyFrame_New(tstate, co, globals, NULL); - if (f == NULL) { - return NULL; - } - fastlocals = __Pyx_PyFrame_GetLocalsplus(f); - for (i = 0; i < na; i++) { - Py_INCREF(*args); - fastlocals[i] = *args++; - } - result = PyEval_EvalFrameEx(f,0); - ++tstate->recursion_depth; - Py_DECREF(f); - --tstate->recursion_depth; - return result; -} -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { - PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); - PyObject *argdefs = PyFunction_GET_DEFAULTS(func); - PyObject *closure; - PyObject *kwdefs; - PyObject *kwtuple, **k; - PyObject **d; - Py_ssize_t nd; - Py_ssize_t nk; - PyObject *result; - assert(kwargs == NULL || PyDict_Check(kwargs)); - nk = kwargs ? PyDict_Size(kwargs) : 0; - if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { - return NULL; - } - if ( - co->co_kwonlyargcount == 0 && - likely(kwargs == NULL || nk == 0) && - co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { - if (argdefs == NULL && co->co_argcount == nargs) { - result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); - goto done; - } - else if (nargs == 0 && argdefs != NULL - && co->co_argcount == Py_SIZE(argdefs)) { - /* function called with no arguments, but all parameters have - a default value: use default values as arguments .*/ - args = &PyTuple_GET_ITEM(argdefs, 0); - result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); - goto done; - } - } - if (kwargs != NULL) { - Py_ssize_t pos, i; - kwtuple = PyTuple_New(2 * nk); - if (kwtuple == NULL) { - result = NULL; - goto done; - } - k = &PyTuple_GET_ITEM(kwtuple, 0); - pos = i = 0; - while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { - Py_INCREF(k[i]); - Py_INCREF(k[i+1]); - i += 2; - } - nk = i / 2; - } - else { - kwtuple = NULL; - k = NULL; - } - closure = PyFunction_GET_CLOSURE(func); - kwdefs = PyFunction_GET_KW_DEFAULTS(func); - if (argdefs != NULL) { - d = &PyTuple_GET_ITEM(argdefs, 0); - nd = Py_SIZE(argdefs); - } - else { - d = NULL; - nd = 0; - } - result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); - Py_XDECREF(kwtuple); -done: - Py_LeaveRecursiveCall(); - return result; -} -#endif - -/* PyObjectCall */ +/* PyObjectCall (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; @@ -22490,7 +21773,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif -/* PyObjectCallMethO */ +/* PyObjectCallMethO (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; @@ -22510,7 +21793,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject } #endif -/* PyObjectFastCall */ +/* PyObjectFastCall (used by PyObjectCallOneArg) */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; @@ -22565,38 +21848,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj return __Pyx_PyObject_CallMethO(func, args[0]); } #endif - #if PY_VERSION_HEX < 0x030800B1 - #if CYTHON_FAST_PYCCALL - if (PyCFunction_Check(func)) { - if (kwargs) { - return _PyCFunction_FastCallDict(func, args, nargs, kwargs); - } else { - return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); - } - } - if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { - return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); - } - #endif - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); - } - #endif - #endif if (kwargs == NULL) { - #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API - vectorcallfunc f = __Pyx_PyVectorcall_Function(func); - if (f) { - return f(func, args, _nargs, NULL); - } - #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL - if (__Pyx_CyFunction_CheckExact(func)) { - __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); - if (f) return f(func, args, _nargs, NULL); - } - #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL - return PyObject_Vectorcall(func, args, _nargs, NULL); + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif #endif } if (nargs == 0) { @@ -22609,7 +21870,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj #endif } -/* UnpackUnboundCMethod */ +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { PyObject *result; @@ -22690,8 +21957,258 @@ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { Py_DECREF(result); } else #endif - target->method = result; - return 0; + target->method = result; + return 0; +} + +/* CallUnboundCMethod0 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + if (likely(cfunc->flag == METH_NOARGS)) + return __Pyx_CallCFunction(cfunc, self, NULL); + if (likely(cfunc->flag == METH_FASTCALL)) + return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); + if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) + return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (cfunc->flag == METH_VARARGS) + return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); + return __Pyx__CallUnboundCMethod0(cfunc, self); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *result; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; + result = __Pyx_PyObject_CallOneArg(cfunc->method, self); + return result; +} + +/* py_dict_items (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); +} + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by RejectKeywords) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); +#endif + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); + } + return result; +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { +#if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; +#else + Py_ssize_t pos = 0; +#endif +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); +#endif + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + 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); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); } /* CallUnboundCMethod2 */ @@ -22748,7 +22265,7 @@ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObje } } -/* ParseKeywords */ +/* ParseKeywordsImpl (used by ParseKeywords) */ static int __Pyx_ValidateDuplicatePosArgs( PyObject *kwds, PyObject ** const argnames[], @@ -22904,16 +22421,23 @@ static void __Pyx_RejectUnknownKeyword( PyObject ** const *first_kw_arg, const char *function_name) { + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else Py_ssize_t pos = 0; + #endif PyObject *key = NULL; __Pyx_BEGIN_CRITICAL_SECTION(kwds); - while (PyDict_Next(kwds, &pos, &key, NULL)) { + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { PyObject** const *name = first_kw_arg; while (*name && (**name != key)) name++; if (!*name) { - #if CYTHON_AVOID_BORROWED_REFS - Py_INCREF(key); - #endif size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp != 1) { @@ -22927,12 +22451,15 @@ static void __Pyx_RejectUnknownKeyword( #endif break; } - #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(key); - #endif } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif } __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif assert(PyErr_Occurred()); } static int __Pyx_ParseKeywordDict( @@ -23104,6 +22631,8 @@ static int __Pyx_ParseKeywordsTuple( #endif return -1; } + +/* ParseKeywords */ static int __Pyx_ParseKeywords( PyObject *kwds, PyObject * const *kwvalues, @@ -23153,69 +22682,77 @@ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else + (void)wraparound; + (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else + (void)wraparound; + (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { - return __Pyx_PyList_GetItemRef(o, n); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); } - } - else if (PyTuple_CheckExact(o)) { + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); } - } else { + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; - if (mm && mm->mp_subscript) { + if (!is_list && mm && mm->mp_subscript) { PyObject *r, *key = PyLong_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } - if (likely(sm && sm->sq_item)) { + if (is_list || likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { @@ -23234,10 +22771,12 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, return PySequence_GetItem(o, i); } #endif + (void)wraparound; + (void)boundscheck; return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); } -/* PyDictVersioning */ +/* PyDictVersioning (used by GetModuleGlobalName) */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; @@ -23406,17 +22945,21 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, /* UnicodeConcatInPlace */ # if CYTHON_COMPILING_IN_CPYTHON static int -__Pyx_unicode_modifiable(PyObject *unicode) +__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared) { - if (Py_REFCNT(unicode) != 1) + if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared)) return 0; +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000 + if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1) + return 0; +#endif if (!PyUnicode_CheckExact(unicode)) return 0; if (PyUnicode_CHECK_INTERNED(unicode)) return 0; return 1; } -static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared #if CYTHON_REFNANNY , void* __pyx_refnanny #endif @@ -23443,7 +22986,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_le return NULL; } new_len = left_len + right_len; - if (__Pyx_unicode_modifiable(left) + if (__Pyx_unicode_modifiable(left, unsafe_shared) && PyUnicode_CheckExact(right) && PyUnicode_KIND(right) <= PyUnicode_KIND(left) && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { @@ -23495,25 +23038,29 @@ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, - CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); - if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) { Py_INCREF(v); -#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS - PyList_SetItem(o, n, v); -#else - PyObject* old = PyList_GET_ITEM(o, n); + return PyList_SetItem(o, n, v); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old; + Py_INCREF(v); + old = PyList_GET_ITEM(o, n); PyList_SET_ITEM(o, n, v); Py_DECREF(old); -#endif - return 1; + return 0; } - } else { + } else +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; - if (mm && mm->mp_ass_subscript) { + if (!is_list && mm && mm->mp_ass_subscript) { int r; PyObject *key = PyLong_FromSsize_t(i); if (unlikely(!key)) return -1; @@ -23521,7 +23068,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje Py_DECREF(key); return r; } - if (likely(sm && sm->sq_ass_item)) { + if (is_list || likely(sm && sm->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { @@ -23536,11 +23083,12 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje } } #else - if (is_list || !PyMapping_Check(o)) - { + if (is_list || !PyMapping_Check(o)) { return PySequence_SetItem(o, i, v); } #endif + (void)wraparound; + (void)boundscheck; return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v); } @@ -23652,7 +23200,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, return -1; } -/* PyObjectCall2Args */ +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); @@ -23752,13 +23300,8 @@ __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) return 0; } -/* PyObjectCallOneArg */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *args[2] = {NULL, arg}; - return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); -} - -/* PyObjectGetMethod */ +/* PyObjectGetMethod (used by PyObjectCallMethod1) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP @@ -23847,9 +23390,10 @@ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **me *method = attr; return 0; } +#endif -/* PyObjectCallMethod1 */ -#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C0000) +/* PyObjectCallMethod1 (used by append) */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); @@ -23857,9 +23401,8 @@ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { -#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) PyObject *args[2] = {obj, arg}; - (void) __Pyx_PyObject_GetMethod; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); @@ -23889,7 +23432,7 @@ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { return 0; } -/* GetTopmostException */ +/* GetTopmostException (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) @@ -24033,47 +23576,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, return NULL; } -/* CallUnboundCMethod0 */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { - int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); - if (likely(was_initialized == 2 && cfunc->func)) { - if (likely(cfunc->flag == METH_NOARGS)) - return __Pyx_CallCFunction(cfunc, self, NULL); - if (likely(cfunc->flag == METH_FASTCALL)) - return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); - if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) - return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); - if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) - return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); - if (cfunc->flag == METH_VARARGS) - return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); - return __Pyx__CallUnboundCMethod0(cfunc, self); - } -#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING - else if (unlikely(was_initialized == 1)) { - __Pyx_CachedCFunction tmp_cfunc = { -#ifndef __cplusplus - 0 -#endif - }; - tmp_cfunc.type = cfunc->type; - tmp_cfunc.method_name = cfunc->method_name; - return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); - } -#endif - PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); - __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); - return result; -} -#endif -static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { - PyObject *result; - if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; - result = __Pyx_PyObject_CallOneArg(cfunc->method, self); - return result; -} - /* py_dict_keys */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_keys, d); @@ -24134,7 +23636,7 @@ static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { - return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); @@ -24177,11 +23679,6 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { } #endif -/* py_dict_items */ -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { - return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); -} - /* HasAttr */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { @@ -24304,13 +23801,13 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif } -/* PyObjectCallNoArg */ +/* PyObjectCallNoArg (used by pyfrozenset_new) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } -/* pyfrozenset_new */ +/* pyfrozenset_new (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { PyObject* result; @@ -24375,19 +23872,102 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* Import */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; +} +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); +#else + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; +#endif + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; + } + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; + } + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; +} +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { PyObject *module = 0; PyObject *empty_dict = 0; - PyObject *empty_list = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { + return module; + } else if (unlikely(module_found == -1)) { + return NULL; + } empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; + if (imported_names) { +#if CYTHON_COMPILING_IN_CPYTHON + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + name, moddict, empty_dict, from_list, 1); if (unlikely(!module)) { if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) goto bad; @@ -24398,147 +23978,20 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { } if (!module) { module = PyImport_ImportModuleLevelObject( - name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + name, moddict, empty_dict, from_list, level); } bad: + Py_XDECREF(from_list); Py_XDECREF(empty_dict); - Py_XDECREF(empty_list); - return module; -} - -/* ImportDottedModule */ -static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { - PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; - Py_ssize_t size; - if (unlikely(PyErr_Occurred())) { - PyErr_Clear(); - } -#if CYTHON_ASSUME_SAFE_SIZE - size = PyTuple_GET_SIZE(parts_tuple); -#else - size = PyTuple_Size(parts_tuple); - if (size < 0) goto bad; -#endif - if (likely(size == count)) { - partial_name = name; - } else { - slice = PySequence_GetSlice(parts_tuple, 0, count); - if (unlikely(!slice)) - goto bad; - sep = PyUnicode_FromStringAndSize(".", 1); - if (unlikely(!sep)) - goto bad; - partial_name = PyUnicode_Join(sep, slice); - } - PyErr_Format( - PyExc_ModuleNotFoundError, - "No module named '%U'", partial_name); -bad: - Py_XDECREF(sep); - Py_XDECREF(slice); - Py_XDECREF(partial_name); - return NULL; -} -static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { - PyObject *imported_module; -#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ - CYTHON_COMPILING_IN_GRAAL - PyObject *modules = PyImport_GetModuleDict(); - if (unlikely(!modules)) - return NULL; - imported_module = __Pyx_PyDict_GetItemStr(modules, name); - Py_XINCREF(imported_module); -#else - imported_module = PyImport_GetModule(name); -#endif - return imported_module; -} -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { - Py_ssize_t i, nparts; -#if CYTHON_ASSUME_SAFE_SIZE - nparts = PyTuple_GET_SIZE(parts_tuple); -#else - nparts = PyTuple_Size(parts_tuple); - if (nparts < 0) return NULL; -#endif - for (i=1; i < nparts && module; i++) { - PyObject *part, *submodule; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - part = PyTuple_GET_ITEM(parts_tuple, i); -#else - part = __Pyx_PySequence_ITEM(parts_tuple, i); - if (!part) return NULL; -#endif - submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(part); -#endif - Py_DECREF(module); - module = submodule; - } - if (unlikely(!module)) { - return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); - } return module; } -static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { - PyObject *imported_module; - PyObject *module = __Pyx_Import(name, NULL, 0); - if (!parts_tuple || unlikely(!module)) - return module; - imported_module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(imported_module)) { - Py_DECREF(module); - return imported_module; - } - PyErr_Clear(); - return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); -} -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject *module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(module)) { - PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); - if (likely(spec)) { - PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); - if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { - Py_DECREF(spec); - spec = NULL; - } - Py_XDECREF(unsafe); - } - if (likely(!spec)) { - PyErr_Clear(); - return module; - } - Py_DECREF(spec); - Py_DECREF(module); - } else if (PyErr_Occurred()) { - PyErr_Clear(); - } -#endif - return __Pyx__ImportDottedModule(name, parts_tuple); -} -/* ImportDottedModuleRelFirst */ -static PyObject *__Pyx_ImportDottedModuleRelFirst(PyObject *name, PyObject *parts_tuple) { - PyObject *module; - PyObject *from_list = NULL; - module = __Pyx_Import(name, from_list, -1); - Py_XDECREF(from_list); - if (module) { - if (parts_tuple) { - module = __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); - } - return module; - } - if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) - return NULL; - PyErr_Clear(); - return __Pyx_ImportDottedModule(name, parts_tuple); +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) { + return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level); } -/* ArgTypeTest */ +/* ArgTypeTestFunc (used by ArgTypeTest) */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; @@ -24586,6 +24039,28 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam return 0; } +/* AllocateExtensionType */ +static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { + if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); + return alloc_func(t, 0); + } else { + newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (!tp_new) { + PyObject *new_str = PyUnicode_FromString("__new__"); + if (likely(new_str)) { + PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); + Py_DECREF(new_str); + return o; + } else + return NULL; + } else + #endif + return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } +} + /* CallTypeTraverse */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #else @@ -24605,7 +24080,60 @@ static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visi } #endif -/* LimitedApiGetTypeDict */ +/* VoidPtrExport */ +static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) { + PyObject *cobj; + cobj = PyCapsule_New(p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { + PyObject *cobj; + union { + void (*fp)(void); + void *p; + } tmp; + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static Py_ssize_t __Pyx_GetTypeDictOffset(void) { PyObject *tp_dictoffset_o; @@ -24641,7 +24169,7 @@ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { } #endif -/* SetItemOnTypeDict */ +/* SetItemOnTypeDict (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { int result; PyObject *tp_dict; @@ -24698,14 +24226,11 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); -#if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; -#else - type->tp_print = (printfunc) memb->offset; -#endif changed = 1; } #endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); @@ -24720,11 +24245,13 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject } changed = 1; } +#endif // !CYTHON_COMPILING_IN_PYPY } memb++; } } #endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_getset) slot++; @@ -24756,14 +24283,23 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject ++getset; } } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY if (changed) PyType_Modified(type); #endif // PY_VERSION_HEX > 0x030900B1 return 0; } -/* PyObjectCallMethod0 */ +/* PyObjectCallMethod0 (used by PyType_Ready) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { @@ -24776,9 +24312,10 @@ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name Py_DECREF(method); bad: return result; +#endif } -/* ValidateBasesTuple */ +/* ValidateBasesTuple (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; @@ -24948,7 +24485,7 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) { #endif } -/* DelItemOnTypeDict */ +/* DelItemOnTypeDict (used by SetupReduce) */ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { int result; PyObject *tp_dict; @@ -25073,15 +24610,15 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { } /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_1_2 -#define __PYX_HAVE_RT_ImportType_3_1_2 -static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) { PyObject *result = 0; Py_ssize_t basicsize; Py_ssize_t itemsize; -#if CYTHON_COMPILING_IN_LIMITED_API +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) PyObject *py_basicsize; PyObject *py_itemsize; #endif @@ -25094,7 +24631,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name); goto bad; } -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) basicsize = ((PyTypeObject *)result)->tp_basicsize; itemsize = ((PyTypeObject *)result)->tp_itemsize; #else @@ -25132,7 +24669,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_2 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -25140,7 +24677,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_2 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { if (PyErr_WarnFormat(NULL, 0, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -25155,25 +24692,6 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module } #endif -/* ListPack */ -static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { - va_list va; - PyObject *l = PyList_New(n); - va_start(va, n); - if (unlikely(!l)) goto end; - for (Py_ssize_t i=0; i= 0x030d0000 +#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); #else value = PyDict_SetDefault(d, key, default_value); if (unlikely(!value)) return NULL; @@ -25235,7 +24768,57 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke return value; } -/* FetchCommonType */ +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* FetchCommonType (used by CommonTypesMetaclass) */ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); @@ -25308,11 +24891,13 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyOb } else if (unlikely(get_item_ref_result == -1)) { goto bad; } - CYTHON_UNUSED_VAR(module); - cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; - new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); if (unlikely(new_cached_type != cached_type)) { if (unlikely(!new_cached_type)) goto bad; Py_DECREF(cached_type); @@ -25338,26 +24923,39 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyOb goto done; } -/* CommonTypesMetaclass */ -PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); } +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, {0, 0, 0, 0, 0} }; static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif {0, 0} }; static PyType_Spec __pyx_CommonTypesMetaclass_spec = { __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", 0, 0, -#if PY_VERSION_HEX >= 0x030A0000 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | -#endif Py_TPFLAGS_DEFAULT, __pyx_CommonTypesMetaclass_slots }; @@ -25368,13 +24966,14 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) { return -1; } mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { return -1; } return 0; } -/* PyMethodNew */ +/* PyMethodNew (used by CythonFunctionShared) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *result; @@ -25400,15 +24999,20 @@ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *ty } #endif -/* PyVectorcallFastCallDict */ -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; - Py_ssize_t i, pos; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif size_t j; PyObject *key, *value; unsigned long keys_are_strings; @@ -25430,17 +25034,16 @@ static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vector return NULL; } kwvalues = newargs + nargs; - pos = i = 0; + pos = 0; + i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; - while (PyDict_Next(kw, &pos, &key, &value)) { + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { keys_are_strings &= #if CYTHON_COMPILING_IN_LIMITED_API PyType_GetFlags(Py_TYPE(key)); #else Py_TYPE(key)->tp_flags; #endif - Py_INCREF(key); - Py_INCREF(value); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; #else @@ -25455,6 +25058,9 @@ static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vector } res = vc(func, newargs, nargs, kwnames); cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); @@ -25483,7 +25089,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, _ } #endif -/* CythonFunctionShared */ +/* CythonFunctionShared (used by CythonFunction) */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { if (__Pyx_CyFunction_Check(func)) { @@ -25635,9 +25241,11 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void __Pyx_END_CRITICAL_SECTION(); return 0; } +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject * -__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) @@ -25646,36 +25254,7 @@ __Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) Py_INCREF(op->func_dict); return op->func_dict; } -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - PyObject *result; - __Pyx_BEGIN_CRITICAL_SECTION(op); - result = __Pyx_CyFunction_get_dict_locked(op); - __Pyx_END_CRITICAL_SECTION(); - return result; -} -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) -{ - CYTHON_UNUSED_VAR(context); - if (unlikely(value == NULL)) { - PyErr_SetString(PyExc_TypeError, - "function's dictionary may not be deleted"); - return -1; - } - if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "setting function's dictionary to a non-dict"); - return -1; - } - Py_INCREF(value); - __Pyx_BEGIN_CRITICAL_SECTION(op); - __Pyx_Py_XDECREF_SET(op->func_dict, value); - __Pyx_END_CRITICAL_SECTION(); - return 0; -} +#endif static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { @@ -25937,8 +25516,13 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, - {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, @@ -25959,9 +25543,11 @@ static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif #if CYTHON_METH_FASTCALL -#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#if CYTHON_COMPILING_IN_LIMITED_API {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, @@ -26017,7 +25603,9 @@ static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef * Py_XINCREF(module); cf->m_module = module; #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API op->func_dict = NULL; +#endif op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; @@ -26071,7 +25659,13 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); @@ -26119,7 +25713,20 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif __Pyx_VISIT_CONST(m->func_name); __Pyx_VISIT_CONST(m->func_qualname); Py_VISIT(m->func_doc); @@ -26231,7 +25838,7 @@ static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *a static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE @@ -26270,7 +25877,7 @@ static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, P } return result; } -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; @@ -26292,11 +25899,7 @@ static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionO static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -26331,11 +25934,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *c static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -26370,11 +25969,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -26405,11 +26000,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -26434,7 +26025,12 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject default: return NULL; } - return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); } #endif static PyType_Slot __pyx_CyFunctionType_slots[] = { @@ -26463,9 +26059,10 @@ static PyType_Spec __pyx_CyFunctionType_spec = { _Py_TPFLAGS_HAVE_VECTORCALL | #endif #endif // CYTHON_METH_FASTCALL -#if PY_VERSION_HEX >= 0x030A0000 - Py_TPFLAGS_IMMUTABLETYPE | +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | #endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; @@ -26659,7 +26256,7 @@ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bas return (PyObject*) metaclass; } -/* PyObjectLookupSpecial */ +/* PyObjectLookupSpecial (used by Py3ClassCreate) */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; @@ -26735,55 +26332,44 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj return result; } -/* CLineInTraceback */ +/* CLineInTraceback (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - PyObject *use_cline; + PyObject *use_cline = NULL; PyObject *ptype, *pvalue, *ptraceback; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject **cython_runtime_dict; -#endif + PyObject *cython_runtime_dict; CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); -#if CYTHON_COMPILING_IN_CPYTHON - cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); __PYX_PY_DICT_LOOKUP_IF_MODIFIED( - use_cline, *cython_runtime_dict, - __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) - Py_XINCREF(use_cline); - __Pyx_END_CRITICAL_SECTION(); - } else -#endif - { - PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); - if (use_cline_obj) { - use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; - Py_INCREF(use_cline); - Py_DECREF(use_cline_obj); - } else { - PyErr_Clear(); - use_cline = NULL; - } + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) } - if (!use_cline) { - c_line = 0; - (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif -/* CodeObjectCache */ +/* CodeObjectCache (used by AddTraceback) */ 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) { @@ -26935,8 +26521,7 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { - (void) __pyx_cfilenm; - (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = __pyx_find_code_object(c_line ? -c_line : py_line); @@ -26945,7 +26530,11 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; - py_funcname = PyUnicode_FromString(funcname); + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; @@ -27075,7 +26664,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_readstat_type_t(readstat_type_t return PyLong_FromLong((long) value); } else if (sizeof(readstat_type_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(readstat_type_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -27083,10 +26672,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_readstat_type_t(readstat_type_t } else { if (sizeof(readstat_type_t) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(readstat_type_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -27204,10 +26791,8 @@ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -27276,10 +26861,8 @@ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -27400,7 +26983,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { return PyLong_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -27408,10 +26991,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { } else { if (sizeof(int) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -27529,10 +27110,8 @@ static CYTHON_INLINE readstat_type_t __Pyx_PyLong_As_readstat_type_t(PyObject *x #endif if ((sizeof(readstat_type_t) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(readstat_type_t) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -27601,10 +27180,8 @@ static CYTHON_INLINE readstat_type_t __Pyx_PyLong_As_readstat_type_t(PyObject *x #endif if ((sizeof(readstat_type_t) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(readstat_type_t) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -27718,10 +27295,8 @@ static CYTHON_INLINE __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format #endif if ((sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -27790,10 +27365,8 @@ static CYTHON_INLINE __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format #endif if ((sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -27849,7 +27422,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { return PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -27857,10 +27430,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { } else { if (sizeof(long) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -27920,7 +27491,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_char(char value) { return PyLong_FromLong((long) value); } else if (sizeof(char) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -27928,10 +27499,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_char(char value) { } else { if (sizeof(char) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -27991,7 +27560,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readsta return PyLong_FromLong((long) value); } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -27999,10 +27568,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readsta } else { if (sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -28120,10 +27687,8 @@ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -28192,10 +27757,8 @@ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -28316,7 +27879,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_off_t(off_t value) { return PyLong_FromLong((long) value); } else if (sizeof(off_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(off_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -28324,10 +27887,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_off_t(off_t value) { } else { if (sizeof(off_t) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(off_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -28445,10 +28006,8 @@ static CYTHON_INLINE off_t __Pyx_PyLong_As_off_t(PyObject *x) { #endif if ((sizeof(off_t) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(off_t, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(off_t) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(off_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -28517,10 +28076,8 @@ static CYTHON_INLINE off_t __Pyx_PyLong_As_off_t(PyObject *x) { #endif if ((sizeof(off_t) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(off_t, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(off_t) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(off_t, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -28752,11 +28309,8 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* GetRuntimeVersion */ -static unsigned long __Pyx_get_runtime_version(void) { -#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 - return Py_Version & ~0xFFUL; -#else - static unsigned long __Pyx_cached_runtime_version = 0; +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +void __Pyx_init_runtime_version(void) { if (__Pyx_cached_runtime_version == 0) { const char* rt_version = Py_GetVersion(); unsigned long version = 0; @@ -28777,6 +28331,12 @@ static unsigned long __Pyx_get_runtime_version(void) { } __Pyx_cached_runtime_version = version; } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else return __Pyx_cached_runtime_version; #endif } @@ -28804,66 +28364,6 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt } } -/* VoidPtrExport */ -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { - PyObject *d; - PyObject *cobj = 0; - if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) - goto bad; - if (!d) { - d = PyDict_New(); - if (!d) - goto bad; - if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) - goto bad; - } - cobj = PyCapsule_New(p, sig, 0); - if (!cobj) - goto bad; - if (PyDict_SetItem(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - -/* FunctionExport */ -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); - if (!d) { - PyErr_Clear(); - d = PyDict_New(); - if (!d) - goto bad; - Py_INCREF(d); - if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) - goto bad; - } - tmp.fp = f; - cobj = PyCapsule_New(tmp.p, sig, 0); - if (!cobj) - goto bad; - if (PyDict_SetItemString(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - /* NewCodeObj */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, @@ -28924,9 +28424,13 @@ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *s PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif return result; } -#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY +#elif !CYTHON_COMPILING_IN_PYPY #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else @@ -28938,10 +28442,10 @@ static PyObject* __Pyx_PyCode_New( PyObject * const *varnames, PyObject *filename, PyObject *funcname, - const char *line_table, + PyObject *line_table, PyObject *tuple_dedup_map ) { - PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; PyObject *varnames_tuple = PyTuple_New(var_count); if (unlikely(!varnames_tuple)) return NULL; @@ -28962,11 +28466,12 @@ static PyObject* __Pyx_PyCode_New( #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(varnames_tuple_dedup); #endif - if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL - && !CYTHON_COMPILING_IN_GRAAL) { - line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); - if (unlikely(!line_table_bytes)) goto done; - Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; code_bytes = PyBytes_FromStringAndSize(NULL, code_len); if (unlikely(!code_bytes)) goto done; char* c_code_bytes = PyBytes_AsString(code_bytes); @@ -28989,11 +28494,10 @@ static PyObject* __Pyx_PyCode_New( filename, funcname, (int) descr.first_line, - (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes ); done: Py_XDECREF(code_bytes); - Py_XDECREF(line_table_bytes); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(varnames_tuple_dedup); #endif @@ -29001,30 +28505,68 @@ static PyObject* __Pyx_PyCode_New( return code_obj; } -/* InitStrings */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { - while (t->s) { - PyObject *str; - if (t->is_unicode) { - if (t->intern) { - str = PyUnicode_InternFromString(t->s); - } else if (t->encoding) { - str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); - } else { - str = PyUnicode_FromStringAndSize(t->s, t->n - 1); - } - } else { - str = PyBytes_FromStringAndSize(t->s, t->n - 1); - } - if (!str) - return -1; - *target = str; - if (PyObject_Hash(str) == -1) - return -1; - ++t; - ++target; +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); } - return 0; + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; } #include @@ -29246,7 +28788,7 @@ static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { return __Pyx_NewRef(Py_None); } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); + return __Pyx_NewRef(b ? Py_True: Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { return PyLong_FromSize_t(ival); diff --git a/pyreadstat/_readstat_writer.c b/pyreadstat/_readstat_writer.c index 4a684f3..f899195 100644 --- a/pyreadstat/_readstat_writer.c +++ b/pyreadstat/_readstat_writer.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.1.2 */ +/* Generated by Cython 3.2.4 */ /* BEGIN: Cython Metadata { @@ -80,8 +80,16 @@ END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ /* InitLimitedAPI */ -#if defined(Py_LIMITED_API) && !defined(CYTHON_LIMITED_API) +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif #endif #include "Python.h" @@ -90,8 +98,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_1_2" -#define CYTHON_HEX_VERSION 0x030102F0 +#define __PYX_ABI_VERSION "3_2_4" +#define CYTHON_HEX_VERSION 0x030204F0 #define CYTHON_FUTURE_DIVISION 0 /* CModulePreamble */ #include @@ -116,9 +124,6 @@ END: Cython Metadata */ #define DL_EXPORT(t) t #endif #define __PYX_COMMA , -#ifndef HAVE_LONG_LONG - #define HAVE_LONG_LONG -#endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -151,7 +156,7 @@ END: Cython Metadata */ #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS - #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE @@ -188,6 +193,8 @@ END: Cython Metadata */ #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 @@ -255,6 +262,8 @@ END: Cython Metadata */ #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX @@ -265,8 +274,6 @@ END: Cython Metadata */ #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 - #undef CYTHON_CLINE_IN_TRACEBACK - #define CYTHON_CLINE_IN_TRACEBACK 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS @@ -326,8 +333,11 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif - #undef CYTHON_USE_FREELISTS - #define CYTHON_USE_FREELISTS 0 + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 1 + #endif + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 @@ -434,6 +444,15 @@ END: Cython Metadata */ #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif + #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 + #undef CYTHON_IMMORTAL_CONSTANTS + #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work + #elif !defined(CYTHON_IMMORTAL_CONSTANTS) + #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_COMPRESS_STRINGS + #define CYTHON_COMPRESS_STRINGS 1 #endif #ifndef CYTHON_FAST_PYCCALL #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL @@ -442,10 +461,9 @@ END: Cython Metadata */ #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #else -#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) #endif #endif -#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) #if CYTHON_USE_PYLONG_INTERNALS #undef SHIFT #undef BASE @@ -521,35 +539,8 @@ END: Cython Metadata */ #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) -#ifdef _MSC_VER - #ifndef _MSC_STDINT_H_ - #if _MSC_VER < 1300 - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; - #else - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - #endif - #endif - #if _MSC_VER < 1300 - #ifdef _WIN64 - typedef unsigned long long __pyx_uintptr_t; - #else - typedef unsigned int __pyx_uintptr_t; - #endif - #else - #ifdef _WIN64 - typedef unsigned __int64 __pyx_uintptr_t; - #else - typedef unsigned __int32 __pyx_uintptr_t; - #endif - #endif -#else - #include - typedef uintptr_t __pyx_uintptr_t; -#endif +#include +typedef uintptr_t __pyx_uintptr_t; #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 @@ -592,9 +583,9 @@ END: Cython Metadata */ #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) #else - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) @@ -698,6 +689,12 @@ static int __Pyx_init_co_variables(void); #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif +#ifndef Py_TPFLAGS_IMMUTABLETYPE + #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) +#endif +#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION + #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) +#endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif @@ -730,11 +727,6 @@ static int __Pyx_init_co_variables(void); #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) -#elif CYTHON_BACKPORT_VECTORCALL - typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, - size_t nargsf, PyObject *kwnames); - #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) - #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) @@ -764,7 +756,7 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(vo #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) -#if __PYX_LIMITED_VERSION_HEX < 0x03090000 +#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else @@ -781,6 +773,9 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(vo #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) #elif CYTHON_COMPILING_IN_GRAAL #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) @@ -871,7 +866,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #endif #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) -#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#if CYTHON_USE_TYPE_SPECS #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ @@ -935,7 +930,10 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #endif #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) -#if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else @@ -951,6 +949,22 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif +enum __Pyx_ReferenceSharing { + __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check + __Pyx_ReferenceSharing_OwnStrongReference, + __Pyx_ReferenceSharing_FunctionArgument, + __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar +}; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ + (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ + (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ + (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) +#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) +#else +#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) +#endif #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) @@ -968,6 +982,12 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) #endif +#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ + __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) +#else + #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) +#endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS @@ -1027,15 +1047,6 @@ static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) #endif -#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 - #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) -#else - static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { - PyObject *module = PyImport_AddModule(name); - Py_XINCREF(module); - return module; - } -#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif @@ -1142,15 +1153,6 @@ static int __Pyx_init_co_variables(void) { #endif #endif #include -#ifdef NAN -#define __PYX_NAN() ((float) NAN) -#else -static CYTHON_INLINE float __PYX_NAN() { - float value; - memset(&value, 0xFF, sizeof(value)); - return value; -} -#endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else @@ -1205,6 +1207,15 @@ static CYTHON_INLINE float __PYX_NAN() { #define CYTHON_WITHOUT_ASSERTIONS #endif +#ifdef CYTHON_FREETHREADING_COMPATIBLE +#if CYTHON_FREETHREADING_COMPATIBLE +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif +#else +#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED +#endif #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 1 #define __Pyx_PyObject_FromString __Pyx_PyUnicode_FromString @@ -1407,7 +1418,7 @@ static const char* const __pyx_f[] = { "pyreadstat/_readstat_parser.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ -/* Atomics.proto */ +/* Atomics.proto (used by UnpackUnboundCMethod) */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 @@ -1443,6 +1454,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) @@ -1467,6 +1479,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) @@ -1476,6 +1489,7 @@ static const char* const __pyx_f[] = { (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_ptr_type void* + #define __pyx_nonatomic_ptr_type void* #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) @@ -1491,6 +1505,12 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif @@ -1501,6 +1521,7 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_ptr_type void* #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long + #define __pyx_nonatomic_ptr_type void* #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) @@ -1517,6 +1538,12 @@ static const char* const __pyx_f[] = { #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { + __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif @@ -1527,36 +1554,27 @@ static const char* const __pyx_f[] = { #warning "Not using atomics" #endif #endif -#if CYTHON_ATOMICS - #define __pyx_add_acquisition_count(memview)\ - __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) - #define __pyx_sub_acquisition_count(memview)\ - __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) -#else - #define __pyx_add_acquisition_count(memview)\ - __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview)\ - __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) -#endif - -/* IncludeStructmemberH.proto */ -#include -/* CriticalSections.proto */ +/* CriticalSectionsDefinition.proto (used by CriticalSections) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection void* #define __Pyx_PyCriticalSection2 void* -#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs -#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs -#define __Pyx_PyCriticalSection_End1(cs) -#define __Pyx_PyCriticalSection_End2(cs) +#define __Pyx_PyCriticalSection_End(cs) +#define __Pyx_PyCriticalSection2_End(cs) #else #define __Pyx_PyCriticalSection PyCriticalSection #define __Pyx_PyCriticalSection2 PyCriticalSection2 -#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin -#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin -#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End -#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#define __Pyx_PyCriticalSection_End PyCriticalSection_End +#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End +#endif + +/* CriticalSections.proto (used by ParseKeywordsImpl) */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) +#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) +#else +#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin +#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin #endif #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_BEGIN_CRITICAL_SECTION(o) { @@ -1566,6 +1584,9 @@ static const char* const __pyx_f[] = { #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION #endif +/* IncludeStructmemberH.proto (used by FixUpExtensionType) */ +#include + /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ @@ -1801,7 +1822,7 @@ struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container { #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -/* PyErrExceptionMatches.proto */ +/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); @@ -1809,7 +1830,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif -/* PyThreadStateGet.proto */ +/* PyThreadStateGet.proto (used by PyErrFetchRestore) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; @@ -1827,7 +1848,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif -/* PyErrFetchRestore.proto */ +/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) @@ -1852,40 +1873,40 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif -/* PyObjectGetAttrStr.proto */ +/* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif -/* PyObjectGetAttrStrNoError.proto */ +/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* GetItemInt.proto */ -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) -#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + int wraparound, int boundscheck, int unsafe_shared); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); + int wraparound, int boundscheck, int unsafe_shared); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); + int is_list, int wraparound, int boundscheck, int unsafe_shared); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS @@ -1908,7 +1929,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif -/* PyDictVersioning.proto */ +/* PyDictVersioning.proto (used by GetModuleGlobalName) */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) @@ -1919,7 +1940,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ + (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ @@ -1955,43 +1976,14 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif -/* PyFunctionFastCall.proto */ -#if CYTHON_FAST_PYCALL -#if !CYTHON_VECTORCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs)\ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); -#endif -#define __Pyx_BUILD_ASSERT_EXPR(cond)\ - (sizeof(char [1 - 2*!(cond)]) - 1) -#ifndef Py_MEMBER_SIZE -#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) -#endif -#if !CYTHON_VECTORCALL -#if PY_VERSION_HEX >= 0x03080000 - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets() - #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) -#else - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ - ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -#endif -#endif -#endif - -/* PyObjectCall.proto */ +/* PyObjectCall.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif -/* PyObjectCallMethO.proto */ +/* PyObjectCallMethO.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif @@ -2026,7 +2018,7 @@ static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double f ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) #endif -/* PyObjectVectorCallKwBuilder.proto */ +/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */ CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); #if CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03090000 @@ -2051,7 +2043,7 @@ static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, P static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); #endif -/* RaiseException.proto */ +/* RaiseException.export */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyObject_Unicode.proto */ @@ -2064,7 +2056,7 @@ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); /* py_dict_keys.proto */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); -/* CallCFunction.proto */ +/* CallCFunction.proto (used by CallUnboundCMethod0) */ #define __Pyx_CallCFunction(cfunc, self, args)\ ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ @@ -2074,10 +2066,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) -/* PyObjectCallOneArg.proto */ +/* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -/* UnpackUnboundCMethod.proto */ +/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ typedef struct { PyObject *type; PyObject **method_name; @@ -2122,7 +2114,7 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); -/* PyObjectCall2Args.proto */ +/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* CallUnboundCMethod1.proto */ @@ -2170,19 +2162,19 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif -/* PyObjectCallNoArg.proto */ +/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); -/* pyfrozenset_new.proto */ +/* pyfrozenset_new.proto (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); /* PySetContains.proto */ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); -/* IncludeStringH.proto */ +/* IncludeStringH.proto (used by BytesEquals) */ #include -/* BytesEquals.proto */ +/* BytesEquals.proto (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ @@ -2206,11 +2198,11 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* PyUnicode_Unicode.proto */ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); -/* JoinPyUnicode.proto */ +/* JoinPyUnicode.export */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); -/* UnicodeAsUCS4.proto */ +/* UnicodeAsUCS4.proto (used by object_ord) */ static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); /* object_ord.proto */ @@ -2233,24 +2225,30 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObj /* RaiseUnboundLocalError.proto */ static void __Pyx_RaiseUnboundLocalError(const char *varname); -/* BuildPyUnicode.proto */ +/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, int prepend_sign, char padding_char); -/* COrdinalToPyUnicode.proto */ +/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); -/* GCCDiagnostics.proto */ +/* GCCDiagnostics.proto (used by CIntToPyUnicode) */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif -/* IncludeStdlibH.proto */ +/* IncludeStdlibH.proto (used by CIntToPyUnicode) */ #include /* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char); +#define __Pyx_PyUnicode_From_long(value, width, padding_char, format_char) (\ + ((format_char) == ('c')) ?\ + __Pyx_uchar___Pyx_PyUnicode_From_long(value, width, padding_char) :\ + __Pyx____Pyx_PyUnicode_From_long(value, width, padding_char, format_char)\ + ) +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char); +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char); /* PyObjectFormatSimple.proto */ #if CYTHON_COMPILING_IN_PYPY @@ -2276,7 +2274,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); #endif -/* GetTopmostException.proto */ +/* GetTopmostException.proto (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif @@ -2292,6 +2290,9 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif +/* PyUnicodeError_Check.proto */ +#define __Pyx_PyExc_UnicodeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_UnicodeError) + /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) @@ -2329,7 +2330,7 @@ static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject * static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif -/* TupleAndListFromArray.proto */ +/* TupleAndListFromArray.proto (used by fastcall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); #endif @@ -2373,9 +2374,50 @@ static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif -/* RaiseDoubleKeywords.proto */ +/* py_dict_values.proto (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); + +/* OwnedDictNext.proto (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); +#else +CYTHON_INLINE +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); +#endif + +/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); +/* ParseKeywordsImpl.export */ +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name +); +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + /* ParseKeywords.proto */ static CYTHON_INLINE int __Pyx_ParseKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], @@ -2389,88 +2431,111 @@ static CYTHON_INLINE int __Pyx_ParseKeywords( 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); +/* ArgTypeTestFunc.export */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); + +/* GetApiDict.proto */ +static PyObject *__Pyx_ApiExport_GetApiDict(void); /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_2 -#define __PYX_HAVE_RT_ImportType_proto_3_1_2 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4 +#define __PYX_HAVE_RT_ImportType_proto_3_2_4 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_1_2(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_1_2 { - __Pyx_ImportType_CheckSize_Error_3_1_2 = 0, - __Pyx_ImportType_CheckSize_Warn_3_1_2 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_1_2 = 2 +enum __Pyx_ImportType_CheckSize_3_2_4 { + __Pyx_ImportType_CheckSize_Error_3_2_4 = 0, + __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size); +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size); #endif +/* VoidPtrImport.proto */ +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* ImportImpl.export */ +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); + /* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); +static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); -/* ImportDottedModule.proto */ -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); -/* ImportDottedModuleRelFirst.proto */ -static PyObject *__Pyx_ImportDottedModuleRelFirst(PyObject *name, PyObject *parts_tuple); +/* PyRange_Check.proto */ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) + #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) +#endif /* ListPack.proto */ static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); +/* dict_setdefault.proto (used by FetchCommonType) */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); -/* LimitedApiGetTypeDict.proto */ +/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); #endif -/* SetItemOnTypeDict.proto */ +/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) -/* FixUpExtensionType.proto */ +/* FixUpExtensionType.proto (used by FetchCommonType) */ static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); -/* FetchSharedCythonModule.proto */ -static PyObject *__Pyx_FetchSharedCythonABIModule(void); +/* AddModuleRef.proto (used by FetchSharedCythonModule) */ +#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ + __PYX_LIMITED_VERSION_HEX < 0x030d0000) + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); +#else + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#endif -/* dict_setdefault.proto */ -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); +/* FetchSharedCythonModule.proto (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); -/* FetchCommonType.proto */ +/* FetchCommonType.proto (used by CommonTypesMetaclass) */ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); -/* CommonTypesMetaclass.proto */ +/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ static int __pyx_CommonTypesMetaclass_init(PyObject *module); #define __Pyx_CommonTypesMetaclass_USED -/* CallTypeTraverse.proto */ +/* CallTypeTraverse.proto (used by CythonFunctionShared) */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); #endif -/* PyMethodNew.proto */ +/* PyMethodNew.proto (used by CythonFunctionShared) */ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); -/* PyVectorcallFastCallDict.proto */ -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif -/* CythonFunctionShared.proto */ +/* CythonFunctionShared.proto (used by CythonFunction) */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 @@ -2500,14 +2565,15 @@ typedef struct { #else PyCMethodObject func; #endif -#if CYTHON_BACKPORT_VECTORCALL ||\ - (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) +#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL __pyx_vectorcallfunc func_vectorcall; #endif #if CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_dict; +#endif PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; @@ -2552,7 +2618,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *c static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) @@ -2566,14 +2632,14 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, PyObject *module, PyObject *globals, PyObject* code); -/* CLineInTraceback.proto */ +/* CLineInTraceback.proto (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #else #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #endif -/* CodeObjectCache.proto */ +/* CodeObjectCache.proto (used by AddTraceback) */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject __Pyx_CachedCodeObjectType; #else @@ -2668,19 +2734,19 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* GetRuntimeVersion.proto */ +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +static unsigned long __Pyx_cached_runtime_version = 0; +static void __Pyx_init_runtime_version(void); +#else +#define __Pyx_init_runtime_version() +#endif static unsigned long __Pyx_get_runtime_version(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); -/* FunctionExport.proto */ -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); - -/* VoidPtrImport.proto */ -static int __Pyx_ImportVoidPtr_3_1_2(PyObject *module, const char *name, void **p, const char *sig); - -/* FunctionImport.proto */ -static int __Pyx_ImportFunction_3_1_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig); +/* DecompressString.proto */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); /* MultiPhaseInitModuleState.proto */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE @@ -2813,220 +2879,8 @@ int __pyx_module_is_main_pyreadstat___readstat_writer = 0; /* Implementation of "pyreadstat._readstat_writer" */ /* #### Code section: global_var ### */ -static PyObject *__pyx_builtin_range; -static PyObject *__pyx_builtin_UnicodeError; static PyObject *__pyx_builtin_zip; /* #### Code section: string_decls ### */ -static const char __pyx_k_[] = ")"; -static const char __pyx_k_x[] = "x"; -static const char __pyx_k__2[] = " "; -static const char __pyx_k__3[] = ""; -static const char __pyx_k__4[] = "."; -static const char __pyx_k__5[] = "_"; -static const char __pyx_k__6[] = "?"; -static const char __pyx_k_df[] = "df"; -static const char __pyx_k_hi[] = "hi"; -static const char __pyx_k_lo[] = "lo"; -static const char __pyx_k_ms[] = "ms"; -static const char __pyx_k_np[] = "np"; -static const char __pyx_k_ns[] = "ns"; -static const char __pyx_k_nt[] = "nt"; -static const char __pyx_k_nw[] = "nw"; -static const char __pyx_k_os[] = "os"; -static const char __pyx_k_us[] = "us"; -static const char __pyx_k_v2[] = "v2"; -static const char __pyx_k_cat[] = "cat"; -static const char __pyx_k_dta[] = "dta"; -static const char __pyx_k_get[] = "get"; -static const char __pyx_k_min[] = "min"; -static const char __pyx_k_nth[] = "nth"; -static const char __pyx_k_pop[] = "pop"; -static const char __pyx_k_por[] = "por"; -static const char __pyx_k_sav[] = "sav"; -static const char __pyx_k_sys[] = "sys"; -static const char __pyx_k_utc[] = "utc"; -static const char __pyx_k_zip[] = "zip"; -static const char __pyx_k_Date[] = "Date"; -static const char __pyx_k_Enum[] = "Enum"; -static const char __pyx_k_Int8[] = "Int8"; -static const char __pyx_k_None[] = "None"; -static const char __pyx_k_Time[] = "Time"; -static const char __pyx_k_cast[] = "cast"; -static const char __pyx_k_date[] = "date"; -static const char __pyx_k_days[] = "days"; -static const char __pyx_k_func[] = "__func__"; -static const char __pyx_k_isna[] = "isna"; -static const char __pyx_k_keys[] = "keys"; -static const char __pyx_k_left[] = "left"; -static const char __pyx_k_main[] = "__main__"; -static const char __pyx_k_name[] = "name"; -static const char __pyx_k_note[] = "note"; -static const char __pyx_k_path[] = "path"; -static const char __pyx_k_spec[] = "__spec__"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_then[] = "then"; -static const char __pyx_k_time[] = "time"; -static const char __pyx_k_warn[] = "warn"; -static const char __pyx_k_when[] = "when"; -static const char __pyx_k_Int16[] = "Int16"; -static const char __pyx_k_Int32[] = "Int32"; -static const char __pyx_k_Int64[] = "Int64"; -static const char __pyx_k_UInt8[] = "UInt8"; -static const char __pyx_k_clone[] = "clone"; -static const char __pyx_k_dtype[] = "dtype"; -static const char __pyx_k_is_in[] = "is_in"; -static const char __pyx_k_isdir[] = "isdir"; -static const char __pyx_k_items[] = "items"; -static const char __pyx_k_numpy[] = "numpy"; -static const char __pyx_k_range[] = "range"; -static const char __pyx_k_right[] = "right"; -static const char __pyx_k_round[] = "round"; -static const char __pyx_k_scale[] = "scale"; -static const char __pyx_k_upper[] = "upper"; -static const char __pyx_k_utf_8[] = "utf-8"; -static const char __pyx_k_xport[] = "xport"; -static const char __pyx_k_Int128[] = "Int128"; -static const char __pyx_k_Object[] = "Object"; -static const char __pyx_k_String[] = "String"; -static const char __pyx_k_UInt16[] = "UInt16"; -static const char __pyx_k_UInt32[] = "UInt32"; -static const char __pyx_k_UInt64[] = "UInt64"; -static const char __pyx_k_center[] = "center"; -static const char __pyx_k_encode[] = "encode"; -static const char __pyx_k_filter[] = "filter"; -static const char __pyx_k_module[] = "__module__"; -static const char __pyx_k_name_2[] = "__name__"; -static const char __pyx_k_stable[] = "stable"; -static const char __pyx_k_tzinfo[] = "tzinfo"; -static const char __pyx_k_Boolean[] = "Boolean"; -static const char __pyx_k_Decimal[] = "Decimal"; -static const char __pyx_k_Float32[] = "Float32"; -static const char __pyx_k_Float64[] = "Float64"; -static const char __pyx_k_UInt128[] = "UInt128"; -static const char __pyx_k_columns[] = "columns"; -static const char __pyx_k_combine[] = "combine"; -static const char __pyx_k_dirname[] = "dirname"; -static const char __pyx_k_instead[] = " instead"; -static const char __pyx_k_isalpha[] = "isalpha"; -static const char __pyx_k_nominal[] = "nominal"; -static const char __pyx_k_ordinal[] = "ordinal"; -static const char __pyx_k_replace[] = "replace"; -static const char __pyx_k_unknown[] = "unknown"; -static const char __pyx_k_version[] = "version"; -static const char __pyx_k_Datetime[] = "Datetime"; -static const char __pyx_k_add_note[] = "add_note"; -static const char __pyx_k_compress[] = "compress"; -static const char __pyx_k_datetime[] = "datetime"; -static const char __pyx_k_dst_path[] = "dst_path"; -static const char __pyx_k_fsdecode[] = "fsdecode"; -static const char __pyx_k_fsencode[] = "fsencode"; -static const char __pyx_k_narwhals[] = "narwhals"; -static const char __pyx_k_qualname[] = "__qualname__"; -static const char __pyx_k_set_name[] = "__set_name__"; -static const char __pyx_k_timezone[] = "timezone"; -static const char __pyx_k_warnings[] = "warnings"; -static const char __pyx_k_is_pandas[] = "is_pandas"; -static const char __pyx_k_is_polars[] = "is_polars"; -static const char __pyx_k_iter_rows[] = "iter_rows"; -static const char __pyx_k_ordinal_2[] = "' (ordinal "; -static const char __pyx_k_time_unit[] = "time_unit"; -static const char __pyx_k_timestamp[] = "timestamp"; -static const char __pyx_k_datetime64[] = "datetime64"; -static const char __pyx_k_drop_nulls[] = "drop_nulls"; -static const char __pyx_k_eager_only[] = "eager_only"; -static const char __pyx_k_expanduser[] = "expanduser"; -static const char __pyx_k_file_label[] = "file_label"; -static const char __pyx_k_is_of_type[] = "' is of type "; -static const char __pyx_k_null_count[] = "null_count"; -static const char __pyx_k_table_name[] = "table_name"; -static const char __pyx_k_Categorical[] = "Categorical"; -static const char __pyx_k_from_native[] = "from_native"; -static const char __pyx_k_in_variable[] = " in variable "; -static const char __pyx_k_must_be_int[] = " must be int"; -static const char __pyx_k_UnicodeError[] = "UnicodeError"; -static const char __pyx_k_initializing[] = "_initializing"; -static const char __pyx_k_is_coroutine[] = "_is_coroutine"; -static const char __pyx_k_iter_columns[] = "iter_columns"; -static const char __pyx_k_row_compress[] = "row_compress"; -static const char __pyx_k_with_columns[] = "with_columns"; -static const char __pyx_k_ReadstatError[] = "ReadstatError"; -static const char __pyx_k_class_getitem[] = "__class_getitem__"; -static const char __pyx_k_column_labels[] = "column_labels"; -static const char __pyx_k_total_seconds[] = "total_seconds"; -static const char __pyx_k_variable_name[] = "variable name '"; -static const char __pyx_k_writer_format[] = "writer_format"; -static const char __pyx_k_does_not_exist[] = " does not exist!"; -static const char __pyx_k_get_categories[] = "get_categories"; -static const char __pyx_k_implementation[] = "implementation"; -static const char __pyx_k_missing_ranges[] = "missing_ranges"; -static const char __pyx_k_must_be_string[] = " must be string"; -static const char __pyx_k_PyreadstatError[] = "PyreadstatError"; -static const char __pyx_k_must_be_numeric[] = " must be numeric"; -static const char __pyx_k_readstat_parser[] = "_readstat_parser"; -static const char __pyx_k_row_compression[] = "row_compression"; -static const char __pyx_k_surrogateescape[] = "surrogateescape"; -static const char __pyx_k_variable_format[] = "variable_format"; -static const char __pyx_k_must_be_dict_got[] = " must be dict, got "; -static const char __pyx_k_variable_measure[] = "variable_measure"; -static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; -static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; -static const char __pyx_k_narwhals_stable_v2[] = "narwhals.stable.v2"; -static const char __pyx_k_variable_alignment[] = "variable_alignment"; -static const char __pyx_k_writer_entry_point[] = "writer_entry_point"; -static const char __pyx_k_writer_file_format[] = "writer_file_format"; -static const char __pyx_k_file_format_version[] = "file_format_version"; -static const char __pyx_k_missing_user_values[] = "missing_user_values"; -static const char __pyx_k_unknown_file_format[] = "unknown file format"; -static const char __pyx_k_wrong_writer_format[] = "wrong writer format"; -static const char __pyx_k_get_native_namespace[] = "get_native_namespace"; -static const char __pyx_k_measure_for_variable[] = "measure for variable "; -static const char __pyx_k_Version_not_supported[] = "Version not supported"; -static const char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding"; -static const char __pyx_k_variable_value_labels[] = "variable_value_labels"; -static const char __pyx_k_alignment_for_variable[] = "alignment for variable "; -static const char __pyx_k_the_destination_folder[] = "the destination folder "; -static const char __pyx_k_variable_display_width[] = "variable_display_width"; -static const char __pyx_k_pyreadstat__readstat_writer[] = "pyreadstat._readstat_writer"; -static const char __pyx_k_must_be_boolean_or_be_1_or_0[] = " must be boolean or be 1 or 0"; -static const char __pyx_k_Column_labels_must_be_strings[] = "Column labels must be strings"; -static const char __pyx_k_Unknown_data_format_to_insert[] = "Unknown data format to insert"; -static const char __pyx_k_must_be_either_nominal_ordinal[] = " must be either nominal, ordinal, scale or unknown got "; -static const char __pyx_k_Q_22BBVVW_11K1_1_S_Q_a_9D_1_1_a[] = "\320\000%\320%=\270Q\330\027\030\330\027\030\330\0272\3202B\320BV\320VW\330\0201\3201K\3101\330\020\021\330\020\021\330\020\021\330\020\021\360\010\000\005$\2401\330\004 \240\001\360\010\000\005\010\200~\220S\230\001\330\010\035\230Q\330\010\036\230a\330\010\013\2109\220D\230\001\330\014\022\220/\240\021\240!\330\010\013\2101\330\014\"\240!\330\010\013\2101\330\014\036\230a\330\t\027\220s\230!\330\010\035\230Q\330\010\013\2108\2203\220a\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220T\230\024\230Q\330\014\"\240!\330\r\025\220T\230\023\230A\330\014\"\240!\340\014\022\220/\240\021\240!\330\010\017\210q\330\t\027\220s\230!\330\010\035\230Q\330\010\036\230a\330\t\027\220s\230!\330\010\035\230Q\340\010\016\210o\230Q\230a\340\004\r\210Q\210d\220*\320\0340\260\014\270A\330\010\035\230V\240<\320/F\320FV\320VW\330\010\034\320\0344\3204F\320FW\320WX"; -static const char __pyx_k_and_it_must_be_str_not_starting[] = " and it must be str (not starting with numbers!)"; -static const char __pyx_k_length_of_column_labels_must_be[] = "length of column labels must be the same as number of columns"; -static const char __pyx_k_missing_ranges_hi_and_lo_values[] = "missing_ranges: hi and lo values must be both the same for string type"; -static const char __pyx_k_missing_user_values_not_allowed[] = "missing_user_values not allowed for character variable %s"; -static const char __pyx_k_must_be_either_right_center_lef[] = " must be either right, center, left or unknown got "; -static const char __pyx_k_must_match_the_type_of_the_colu[] = " must match the type of the column in dataframe and be of type date, datetime or time"; -static const char __pyx_k_pyreadstat__readstat_writer_pyx[] = "pyreadstat/_readstat_writer.pyx"; -static const char __pyx_k_starts_with_an_illegal_non_alph[] = "' starts with an illegal (non-alphabetic) character: '"; -static const char __pyx_k_variable_value_labels_value_for[] = "variable_value_labels: value for key "; -static const char __pyx_k_Non_unique_column_names_detected[] = "Non unique column names detected in the dataframe!"; -static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; -static const char __pyx_k_Unknown_pywriter_variable_format[] = "Unknown pywriter variable format"; -static const char __pyx_k_character_missing_ranges_value_g[] = "character missing_ranges value given for non character variable %s"; -static const char __pyx_k_column_labels_must_be_either_lis[] = "column_labels must be either list or dict!"; -static const char __pyx_k_compress_and_row_compress_cannot[] = "compress and row_compress cannot be both True"; -static const char __pyx_k_dataframe_must_be_pandas_or_pola[] = "dataframe must be pandas or polars dataframe"; -static const char __pyx_k_dictionaries_in_missing_ranges_m[] = "dictionaries in missing_ranges must have the keys hi and lo"; -static const char __pyx_k_file_path_could_not_be_encoded_w[] = "file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly."; -static const char __pyx_k_missing_ranges_max_1_discrete_nu[] = "missing_ranges: max 1 discrete numeric value if combined with 1 range value per variable allowed"; -static const char __pyx_k_missing_ranges_max_1_range_value[] = "missing_ranges: max 1 range value per variable allowed"; -static const char __pyx_k_missing_ranges_max_3_discrete_nu[] = "missing_ranges: max 3 discrete numeric values per variable allowed"; -static const char __pyx_k_missing_ranges_max_3_string_valu[] = "missing_ranges: max 3 string values per variable allowed"; -static const char __pyx_k_missing_ranges_string_values_len[] = "missing_ranges: string values length must not be larger than 8"; -static const char __pyx_k_missing_ranges_values_in_diction[] = "missing_ranges: values in dictionary must be list"; -static const char __pyx_k_missing_ranges_values_must_be_bo[] = "missing_ranges: values must be both either of numeric or string type"; -static const char __pyx_k_missing_user_values_supports_val[] = "missing_user_values supports values a to z for Stata and A to Z and _ for SAS, got %s instead"; -static const char __pyx_k_missing_user_values_values_in_di[] = "missing_user_values: values in dictionary must be list"; -static const char __pyx_k_note_should_be_either_str_or_lis[] = "note should be either str or list, got "; -static const char __pyx_k_numeric_missing_ranges_value_giv[] = "numeric missing_ranges value given for non numeric variable %s"; -static const char __pyx_k_path_must_be_either_str_or_bytes[] = "path must be either str or bytes"; -static const char __pyx_k_variable_name_s_contains_a_space[] = "variable name '%s' contains a space, which is not allowed"; -static const char __pyx_k_variable_names_must_be_non_empty[] = "variable names must be non-empty strings, not starting with numbers"; -static const char __pyx_k_variable_value_labels_type_of_La[] = "variable_value_labels: type of Label "; -static const char __pyx_k_variable_value_labels_type_of_Va[] = "variable_value_labels: type of Value "; -static const char __pyx_k_missing_ranges_hi_and_lo_values_2[] = "missing_ranges: hi and lo values must be both either of numeric or string type"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_10pyreadstat_16_readstat_writer_writer_entry_point(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_df, PyObject *__pyx_v_dst_path, PyObject *__pyx_v_writer_format, PyObject *__pyx_v_file_label, int __pyx_v_version, PyObject *__pyx_v_table_name, PyObject *__pyx_v_column_labels, PyObject *__pyx_v_compress, PyObject *__pyx_v_row_compress, PyObject *__pyx_v_note, PyObject *__pyx_v_variable_value_labels, PyObject *__pyx_v_missing_ranges, PyObject *__pyx_v_variable_display_width, PyObject *__pyx_v_variable_measure, PyObject *__pyx_v_missing_user_values, PyObject *__pyx_v_variable_format, PyObject *__pyx_v_variable_alignment); /* proto */ /* #### Code section: late_includes ### */ @@ -3049,41 +2903,16 @@ typedef struct { PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; - #ifdef __Pyx_CyFunction_USED - PyTypeObject *__pyx_CyFunctionType; - #endif - #ifdef __Pyx_FusedFunction_USED - PyTypeObject *__pyx_FusedFunctionType; - #endif - #ifdef __Pyx_Generator_USED - PyTypeObject *__pyx_GeneratorType; - #endif - #ifdef __Pyx_IterableCoroutine_USED - PyTypeObject *__pyx_IterableCoroutineType; - #endif - #ifdef __Pyx_Coroutine_USED - PyTypeObject *__pyx_CoroutineAwaitType; - #endif - #ifdef __Pyx_Coroutine_USED - PyTypeObject *__pyx_CoroutineType; - #endif PyTypeObject *__pyx_ptype_10pyreadstat_16_readstat_parser_data_container; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; - PyObject *__pyx_tuple[3]; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; + PyObject *__pyx_tuple[2]; PyObject *__pyx_codeobj_tab[1]; - PyObject *__pyx_string_tab[209]; - PyObject *__pyx_float_1e3; - PyObject *__pyx_float_1e6; - PyObject *__pyx_float_1e9; - PyObject *__pyx_int_0; - PyObject *__pyx_int_1; - PyObject *__pyx_int_65; - PyObject *__pyx_int_97; - PyObject *__pyx_int_1970; - PyObject *__pyx_int_neg_9223372036854775808; + PyObject *__pyx_string_tab[219]; + PyObject *__pyx_number_tab[9]; /* #### Code section: module_state_contents ### */ /* CommonTypesMetaclass.module_state_decls */ PyTypeObject *__pyx_CommonTypesMetaclassType; @@ -3093,6 +2922,9 @@ PyTypeObject *__pyx_CommonTypesMetaclassType; PyObject *__Pyx_CachedMethodType; #endif +/* CythonFunctionShared.module_state_decls */ +PyTypeObject *__pyx_CyFunctionType; + /* CodeObjectCache.module_state_decls */ struct __Pyx_CodeObjectCache __pyx_code_cache; @@ -3122,214 +2954,233 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #endif /* #### Code section: constant_name_defines ### */ #define __pyx_kp_u_ __pyx_string_tab[0] -#define __pyx_n_u_Boolean __pyx_string_tab[1] -#define __pyx_n_u_Categorical __pyx_string_tab[2] -#define __pyx_kp_u_Column_labels_must_be_strings __pyx_string_tab[3] -#define __pyx_n_u_Date __pyx_string_tab[4] -#define __pyx_n_u_Datetime __pyx_string_tab[5] -#define __pyx_n_u_Decimal __pyx_string_tab[6] -#define __pyx_n_u_Enum __pyx_string_tab[7] -#define __pyx_n_u_Float32 __pyx_string_tab[8] -#define __pyx_n_u_Float64 __pyx_string_tab[9] -#define __pyx_n_u_Int128 __pyx_string_tab[10] -#define __pyx_n_u_Int16 __pyx_string_tab[11] -#define __pyx_n_u_Int32 __pyx_string_tab[12] -#define __pyx_n_u_Int64 __pyx_string_tab[13] -#define __pyx_n_u_Int8 __pyx_string_tab[14] -#define __pyx_kp_u_Non_unique_column_names_detected __pyx_string_tab[15] -#define __pyx_kp_u_None __pyx_string_tab[16] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[17] -#define __pyx_n_u_Object __pyx_string_tab[18] -#define __pyx_n_u_PyreadstatError __pyx_string_tab[19] -#define __pyx_n_u_ReadstatError __pyx_string_tab[20] -#define __pyx_n_u_String __pyx_string_tab[21] -#define __pyx_n_u_Time __pyx_string_tab[22] -#define __pyx_n_u_UInt128 __pyx_string_tab[23] -#define __pyx_n_u_UInt16 __pyx_string_tab[24] -#define __pyx_n_u_UInt32 __pyx_string_tab[25] -#define __pyx_n_u_UInt64 __pyx_string_tab[26] -#define __pyx_n_u_UInt8 __pyx_string_tab[27] -#define __pyx_n_u_UnicodeError __pyx_string_tab[28] -#define __pyx_kp_u_Unknown_data_format_to_insert __pyx_string_tab[29] -#define __pyx_kp_u_Unknown_pywriter_variable_format __pyx_string_tab[30] -#define __pyx_kp_u_Version_not_supported __pyx_string_tab[31] -#define __pyx_kp_u__2 __pyx_string_tab[32] -#define __pyx_kp_u__3 __pyx_string_tab[33] -#define __pyx_kp_u__4 __pyx_string_tab[34] -#define __pyx_n_u__5 __pyx_string_tab[35] -#define __pyx_kp_u__6 __pyx_string_tab[36] -#define __pyx_kp_u_add_note __pyx_string_tab[37] -#define __pyx_kp_u_alignment_for_variable __pyx_string_tab[38] -#define __pyx_kp_u_and_it_must_be_str_not_starting __pyx_string_tab[39] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[40] -#define __pyx_n_u_cast __pyx_string_tab[41] -#define __pyx_n_u_cat __pyx_string_tab[42] -#define __pyx_n_u_center __pyx_string_tab[43] -#define __pyx_kp_u_character_missing_ranges_value_g __pyx_string_tab[44] -#define __pyx_n_u_class_getitem __pyx_string_tab[45] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[46] -#define __pyx_n_u_clone __pyx_string_tab[47] -#define __pyx_n_u_column_labels __pyx_string_tab[48] -#define __pyx_kp_u_column_labels_must_be_either_lis __pyx_string_tab[49] -#define __pyx_n_u_columns __pyx_string_tab[50] -#define __pyx_n_u_combine __pyx_string_tab[51] -#define __pyx_n_u_compress __pyx_string_tab[52] -#define __pyx_kp_u_compress_and_row_compress_cannot __pyx_string_tab[53] -#define __pyx_kp_u_dataframe_must_be_pandas_or_pola __pyx_string_tab[54] -#define __pyx_n_u_date __pyx_string_tab[55] -#define __pyx_n_u_datetime __pyx_string_tab[56] -#define __pyx_n_u_datetime64 __pyx_string_tab[57] -#define __pyx_n_u_days __pyx_string_tab[58] -#define __pyx_n_u_df __pyx_string_tab[59] -#define __pyx_kp_u_dictionaries_in_missing_ranges_m __pyx_string_tab[60] -#define __pyx_n_u_dirname __pyx_string_tab[61] -#define __pyx_kp_u_does_not_exist __pyx_string_tab[62] -#define __pyx_n_u_drop_nulls __pyx_string_tab[63] -#define __pyx_n_u_dst_path __pyx_string_tab[64] -#define __pyx_n_u_dta __pyx_string_tab[65] -#define __pyx_n_u_dtype __pyx_string_tab[66] -#define __pyx_n_u_eager_only __pyx_string_tab[67] -#define __pyx_n_u_encode __pyx_string_tab[68] -#define __pyx_n_u_expanduser __pyx_string_tab[69] -#define __pyx_n_u_file_format_version __pyx_string_tab[70] -#define __pyx_n_u_file_label __pyx_string_tab[71] -#define __pyx_kp_u_file_path_could_not_be_encoded_w __pyx_string_tab[72] -#define __pyx_n_u_filter __pyx_string_tab[73] -#define __pyx_n_u_from_native __pyx_string_tab[74] -#define __pyx_n_u_fsdecode __pyx_string_tab[75] -#define __pyx_n_u_fsencode __pyx_string_tab[76] -#define __pyx_n_u_func __pyx_string_tab[77] -#define __pyx_n_u_get __pyx_string_tab[78] -#define __pyx_n_u_get_categories __pyx_string_tab[79] -#define __pyx_n_u_get_native_namespace __pyx_string_tab[80] -#define __pyx_n_u_getfilesystemencoding __pyx_string_tab[81] -#define __pyx_n_u_hi __pyx_string_tab[82] -#define __pyx_n_u_implementation __pyx_string_tab[83] -#define __pyx_kp_u_in_variable __pyx_string_tab[84] -#define __pyx_n_u_initializing __pyx_string_tab[85] -#define __pyx_kp_u_instead __pyx_string_tab[86] -#define __pyx_n_u_is_coroutine __pyx_string_tab[87] -#define __pyx_n_u_is_in __pyx_string_tab[88] -#define __pyx_kp_u_is_of_type __pyx_string_tab[89] -#define __pyx_n_u_is_pandas __pyx_string_tab[90] -#define __pyx_n_u_is_polars __pyx_string_tab[91] -#define __pyx_n_u_isalpha __pyx_string_tab[92] -#define __pyx_n_u_isdir __pyx_string_tab[93] -#define __pyx_n_u_isna __pyx_string_tab[94] -#define __pyx_n_u_items __pyx_string_tab[95] -#define __pyx_n_u_iter_columns __pyx_string_tab[96] -#define __pyx_n_u_iter_rows __pyx_string_tab[97] -#define __pyx_n_u_keys __pyx_string_tab[98] -#define __pyx_n_u_left __pyx_string_tab[99] -#define __pyx_kp_u_length_of_column_labels_must_be __pyx_string_tab[100] -#define __pyx_n_u_lo __pyx_string_tab[101] -#define __pyx_n_u_main __pyx_string_tab[102] -#define __pyx_kp_u_measure_for_variable __pyx_string_tab[103] -#define __pyx_n_u_min __pyx_string_tab[104] -#define __pyx_n_u_missing_ranges __pyx_string_tab[105] -#define __pyx_kp_u_missing_ranges_hi_and_lo_values __pyx_string_tab[106] -#define __pyx_kp_u_missing_ranges_hi_and_lo_values_2 __pyx_string_tab[107] -#define __pyx_kp_u_missing_ranges_max_1_discrete_nu __pyx_string_tab[108] -#define __pyx_kp_u_missing_ranges_max_1_range_value __pyx_string_tab[109] -#define __pyx_kp_u_missing_ranges_max_3_discrete_nu __pyx_string_tab[110] -#define __pyx_kp_u_missing_ranges_max_3_string_valu __pyx_string_tab[111] -#define __pyx_kp_u_missing_ranges_string_values_len __pyx_string_tab[112] -#define __pyx_kp_u_missing_ranges_values_in_diction __pyx_string_tab[113] -#define __pyx_kp_u_missing_ranges_values_must_be_bo __pyx_string_tab[114] -#define __pyx_n_u_missing_user_values __pyx_string_tab[115] -#define __pyx_kp_u_missing_user_values_not_allowed __pyx_string_tab[116] -#define __pyx_kp_u_missing_user_values_supports_val __pyx_string_tab[117] -#define __pyx_kp_u_missing_user_values_values_in_di __pyx_string_tab[118] -#define __pyx_n_u_module __pyx_string_tab[119] -#define __pyx_n_u_ms __pyx_string_tab[120] -#define __pyx_kp_u_must_be_boolean_or_be_1_or_0 __pyx_string_tab[121] -#define __pyx_kp_u_must_be_dict_got __pyx_string_tab[122] -#define __pyx_kp_u_must_be_either_nominal_ordinal __pyx_string_tab[123] -#define __pyx_kp_u_must_be_either_right_center_lef __pyx_string_tab[124] -#define __pyx_kp_u_must_be_int __pyx_string_tab[125] -#define __pyx_kp_u_must_be_numeric __pyx_string_tab[126] -#define __pyx_kp_u_must_be_string __pyx_string_tab[127] -#define __pyx_kp_u_must_match_the_type_of_the_colu __pyx_string_tab[128] -#define __pyx_n_u_name __pyx_string_tab[129] -#define __pyx_n_u_name_2 __pyx_string_tab[130] -#define __pyx_n_u_narwhals __pyx_string_tab[131] -#define __pyx_n_u_narwhals_stable_v2 __pyx_string_tab[132] -#define __pyx_n_u_nominal __pyx_string_tab[133] -#define __pyx_n_u_note __pyx_string_tab[134] -#define __pyx_kp_u_note_should_be_either_str_or_lis __pyx_string_tab[135] -#define __pyx_n_u_np __pyx_string_tab[136] -#define __pyx_n_u_ns __pyx_string_tab[137] -#define __pyx_n_u_nt __pyx_string_tab[138] -#define __pyx_n_u_nth __pyx_string_tab[139] -#define __pyx_n_u_null_count __pyx_string_tab[140] -#define __pyx_kp_u_numeric_missing_ranges_value_giv __pyx_string_tab[141] -#define __pyx_n_u_numpy __pyx_string_tab[142] -#define __pyx_n_u_nw __pyx_string_tab[143] -#define __pyx_n_u_ordinal __pyx_string_tab[144] -#define __pyx_kp_u_ordinal_2 __pyx_string_tab[145] -#define __pyx_n_u_os __pyx_string_tab[146] -#define __pyx_n_u_path __pyx_string_tab[147] -#define __pyx_kp_u_path_must_be_either_str_or_bytes __pyx_string_tab[148] -#define __pyx_n_u_pop __pyx_string_tab[149] -#define __pyx_n_u_por __pyx_string_tab[150] -#define __pyx_n_u_pyreadstat__readstat_writer __pyx_string_tab[151] -#define __pyx_kp_u_pyreadstat__readstat_writer_pyx __pyx_string_tab[152] -#define __pyx_n_u_qualname __pyx_string_tab[153] -#define __pyx_n_u_range __pyx_string_tab[154] -#define __pyx_n_u_readstat_parser __pyx_string_tab[155] -#define __pyx_n_u_replace __pyx_string_tab[156] -#define __pyx_n_u_right __pyx_string_tab[157] -#define __pyx_n_u_round __pyx_string_tab[158] -#define __pyx_n_u_row_compress __pyx_string_tab[159] -#define __pyx_n_u_row_compression __pyx_string_tab[160] -#define __pyx_n_u_sav __pyx_string_tab[161] -#define __pyx_n_u_scale __pyx_string_tab[162] -#define __pyx_n_u_set_name __pyx_string_tab[163] -#define __pyx_n_u_spec __pyx_string_tab[164] -#define __pyx_n_u_stable __pyx_string_tab[165] -#define __pyx_kp_u_starts_with_an_illegal_non_alph __pyx_string_tab[166] -#define __pyx_n_u_surrogateescape __pyx_string_tab[167] -#define __pyx_n_u_sys __pyx_string_tab[168] -#define __pyx_n_u_table_name __pyx_string_tab[169] -#define __pyx_n_u_test __pyx_string_tab[170] -#define __pyx_kp_u_the_destination_folder __pyx_string_tab[171] -#define __pyx_n_u_then __pyx_string_tab[172] -#define __pyx_n_u_time __pyx_string_tab[173] -#define __pyx_n_u_time_unit __pyx_string_tab[174] -#define __pyx_n_u_timestamp __pyx_string_tab[175] -#define __pyx_n_u_timezone __pyx_string_tab[176] -#define __pyx_n_u_total_seconds __pyx_string_tab[177] -#define __pyx_n_u_tzinfo __pyx_string_tab[178] -#define __pyx_n_u_unknown __pyx_string_tab[179] -#define __pyx_kp_u_unknown_file_format __pyx_string_tab[180] -#define __pyx_n_u_upper __pyx_string_tab[181] -#define __pyx_n_u_us __pyx_string_tab[182] -#define __pyx_n_u_utc __pyx_string_tab[183] -#define __pyx_kp_u_utf_8 __pyx_string_tab[184] -#define __pyx_n_u_v2 __pyx_string_tab[185] -#define __pyx_n_u_variable_alignment __pyx_string_tab[186] -#define __pyx_n_u_variable_display_width __pyx_string_tab[187] -#define __pyx_n_u_variable_format __pyx_string_tab[188] -#define __pyx_n_u_variable_measure __pyx_string_tab[189] -#define __pyx_kp_u_variable_name __pyx_string_tab[190] -#define __pyx_kp_u_variable_name_s_contains_a_space __pyx_string_tab[191] -#define __pyx_kp_u_variable_names_must_be_non_empty __pyx_string_tab[192] -#define __pyx_n_u_variable_value_labels __pyx_string_tab[193] -#define __pyx_kp_u_variable_value_labels_type_of_La __pyx_string_tab[194] -#define __pyx_kp_u_variable_value_labels_type_of_Va __pyx_string_tab[195] -#define __pyx_kp_u_variable_value_labels_value_for __pyx_string_tab[196] -#define __pyx_n_u_version __pyx_string_tab[197] -#define __pyx_n_u_warn __pyx_string_tab[198] -#define __pyx_n_u_warnings __pyx_string_tab[199] -#define __pyx_n_u_when __pyx_string_tab[200] -#define __pyx_n_u_with_columns __pyx_string_tab[201] -#define __pyx_n_u_writer_entry_point __pyx_string_tab[202] -#define __pyx_n_u_writer_file_format __pyx_string_tab[203] -#define __pyx_n_u_writer_format __pyx_string_tab[204] -#define __pyx_kp_u_wrong_writer_format __pyx_string_tab[205] -#define __pyx_n_u_x __pyx_string_tab[206] -#define __pyx_n_u_xport __pyx_string_tab[207] -#define __pyx_n_u_zip __pyx_string_tab[208] +#define __pyx_kp_u_Column_labels_must_be_strings __pyx_string_tab[1] +#define __pyx_kp_u_Non_unique_column_names_detected __pyx_string_tab[2] +#define __pyx_kp_u_None __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u_Unknown_data_format_to_insert __pyx_string_tab[5] +#define __pyx_kp_u_Unknown_pywriter_variable_format __pyx_string_tab[6] +#define __pyx_kp_u_Version_not_supported __pyx_string_tab[7] +#define __pyx_kp_u__2 __pyx_string_tab[8] +#define __pyx_kp_u__3 __pyx_string_tab[9] +#define __pyx_kp_u__4 __pyx_string_tab[10] +#define __pyx_kp_u__6 __pyx_string_tab[11] +#define __pyx_kp_u_add_note __pyx_string_tab[12] +#define __pyx_kp_u_alignment_for_variable __pyx_string_tab[13] +#define __pyx_kp_u_and_it_must_be_str_not_starting __pyx_string_tab[14] +#define __pyx_kp_u_character_missing_ranges_value_g __pyx_string_tab[15] +#define __pyx_kp_u_column_labels_must_be_either_lis __pyx_string_tab[16] +#define __pyx_kp_u_compress_and_row_compress_cannot __pyx_string_tab[17] +#define __pyx_kp_u_dataframe_must_be_pandas_or_pola __pyx_string_tab[18] +#define __pyx_kp_u_dictionaries_in_missing_ranges_m __pyx_string_tab[19] +#define __pyx_kp_u_does_not_exist __pyx_string_tab[20] +#define __pyx_kp_u_file_path_could_not_be_encoded_w __pyx_string_tab[21] +#define __pyx_kp_u_in_variable __pyx_string_tab[22] +#define __pyx_kp_u_instead __pyx_string_tab[23] +#define __pyx_kp_u_is_of_type __pyx_string_tab[24] +#define __pyx_kp_u_length_of_column_labels_must_be __pyx_string_tab[25] +#define __pyx_kp_u_measure_for_variable __pyx_string_tab[26] +#define __pyx_kp_u_missing_ranges_hi_and_lo_values __pyx_string_tab[27] +#define __pyx_kp_u_missing_ranges_hi_and_lo_values_2 __pyx_string_tab[28] +#define __pyx_kp_u_missing_ranges_max_1_discrete_nu __pyx_string_tab[29] +#define __pyx_kp_u_missing_ranges_max_1_range_value __pyx_string_tab[30] +#define __pyx_kp_u_missing_ranges_max_3_discrete_nu __pyx_string_tab[31] +#define __pyx_kp_u_missing_ranges_max_3_string_valu __pyx_string_tab[32] +#define __pyx_kp_u_missing_ranges_string_values_len __pyx_string_tab[33] +#define __pyx_kp_u_missing_ranges_values_in_diction __pyx_string_tab[34] +#define __pyx_kp_u_missing_ranges_values_must_be_bo __pyx_string_tab[35] +#define __pyx_kp_u_missing_user_values_not_allowed __pyx_string_tab[36] +#define __pyx_kp_u_missing_user_values_supports_val __pyx_string_tab[37] +#define __pyx_kp_u_missing_user_values_values_in_di __pyx_string_tab[38] +#define __pyx_kp_u_must_be_boolean_or_be_1_or_0 __pyx_string_tab[39] +#define __pyx_kp_u_must_be_dict_got __pyx_string_tab[40] +#define __pyx_kp_u_must_be_either_nominal_ordinal __pyx_string_tab[41] +#define __pyx_kp_u_must_be_either_right_center_lef __pyx_string_tab[42] +#define __pyx_kp_u_must_be_int __pyx_string_tab[43] +#define __pyx_kp_u_must_be_numeric __pyx_string_tab[44] +#define __pyx_kp_u_must_be_string __pyx_string_tab[45] +#define __pyx_kp_u_must_match_the_type_of_the_colu __pyx_string_tab[46] +#define __pyx_kp_u_note_should_be_either_str_or_lis __pyx_string_tab[47] +#define __pyx_kp_u_numeric_missing_ranges_value_giv __pyx_string_tab[48] +#define __pyx_kp_u_ordinal_2 __pyx_string_tab[49] +#define __pyx_kp_u_path_must_be_either_str_or_bytes __pyx_string_tab[50] +#define __pyx_kp_u_pyreadstat__readstat_parser __pyx_string_tab[51] +#define __pyx_kp_u_pyreadstat__readstat_writer_pyx __pyx_string_tab[52] +#define __pyx_kp_u_pyreadstat_datetime __pyx_string_tab[53] +#define __pyx_kp_u_pyreadstat_narwhals_stable_v2 __pyx_string_tab[54] +#define __pyx_kp_u_pyreadstat_numpy __pyx_string_tab[55] +#define __pyx_kp_u_pyreadstat_os __pyx_string_tab[56] +#define __pyx_kp_u_pyreadstat_sys __pyx_string_tab[57] +#define __pyx_kp_u_pyreadstat_warnings __pyx_string_tab[58] +#define __pyx_kp_u_starts_with_an_illegal_non_alph __pyx_string_tab[59] +#define __pyx_kp_u_the_destination_folder __pyx_string_tab[60] +#define __pyx_kp_u_unknown_file_format __pyx_string_tab[61] +#define __pyx_kp_u_utf_8 __pyx_string_tab[62] +#define __pyx_kp_u_variable_name __pyx_string_tab[63] +#define __pyx_kp_u_variable_name_s_contains_a_space __pyx_string_tab[64] +#define __pyx_kp_u_variable_names_must_be_non_empty __pyx_string_tab[65] +#define __pyx_kp_u_variable_value_labels_type_of_La __pyx_string_tab[66] +#define __pyx_kp_u_variable_value_labels_type_of_Va __pyx_string_tab[67] +#define __pyx_kp_u_variable_value_labels_value_for __pyx_string_tab[68] +#define __pyx_kp_u_wrong_writer_format __pyx_string_tab[69] +#define __pyx_n_u_Boolean __pyx_string_tab[70] +#define __pyx_n_u_Categorical __pyx_string_tab[71] +#define __pyx_n_u_Date __pyx_string_tab[72] +#define __pyx_n_u_Datetime __pyx_string_tab[73] +#define __pyx_n_u_Decimal __pyx_string_tab[74] +#define __pyx_n_u_Enum __pyx_string_tab[75] +#define __pyx_n_u_Float32 __pyx_string_tab[76] +#define __pyx_n_u_Float64 __pyx_string_tab[77] +#define __pyx_n_u_Int128 __pyx_string_tab[78] +#define __pyx_n_u_Int16 __pyx_string_tab[79] +#define __pyx_n_u_Int32 __pyx_string_tab[80] +#define __pyx_n_u_Int64 __pyx_string_tab[81] +#define __pyx_n_u_Int8 __pyx_string_tab[82] +#define __pyx_n_u_Object __pyx_string_tab[83] +#define __pyx_n_u_PyreadstatError __pyx_string_tab[84] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[85] +#define __pyx_n_u_ReadstatError __pyx_string_tab[86] +#define __pyx_n_u_String __pyx_string_tab[87] +#define __pyx_n_u_Time __pyx_string_tab[88] +#define __pyx_n_u_UInt128 __pyx_string_tab[89] +#define __pyx_n_u_UInt16 __pyx_string_tab[90] +#define __pyx_n_u_UInt32 __pyx_string_tab[91] +#define __pyx_n_u_UInt64 __pyx_string_tab[92] +#define __pyx_n_u_UInt8 __pyx_string_tab[93] +#define __pyx_n_u__5 __pyx_string_tab[94] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[95] +#define __pyx_n_u_cast __pyx_string_tab[96] +#define __pyx_n_u_cat __pyx_string_tab[97] +#define __pyx_n_u_center __pyx_string_tab[98] +#define __pyx_n_u_class_getitem __pyx_string_tab[99] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[100] +#define __pyx_n_u_clone __pyx_string_tab[101] +#define __pyx_n_u_column_labels __pyx_string_tab[102] +#define __pyx_n_u_columns __pyx_string_tab[103] +#define __pyx_n_u_combine __pyx_string_tab[104] +#define __pyx_n_u_compress __pyx_string_tab[105] +#define __pyx_n_u_date __pyx_string_tab[106] +#define __pyx_n_u_datetime __pyx_string_tab[107] +#define __pyx_n_u_datetime64 __pyx_string_tab[108] +#define __pyx_n_u_days __pyx_string_tab[109] +#define __pyx_n_u_df __pyx_string_tab[110] +#define __pyx_n_u_dirname __pyx_string_tab[111] +#define __pyx_n_u_drop_nulls __pyx_string_tab[112] +#define __pyx_n_u_dst_path __pyx_string_tab[113] +#define __pyx_n_u_dta __pyx_string_tab[114] +#define __pyx_n_u_dtype __pyx_string_tab[115] +#define __pyx_n_u_eager_only __pyx_string_tab[116] +#define __pyx_n_u_encode __pyx_string_tab[117] +#define __pyx_n_u_expanduser __pyx_string_tab[118] +#define __pyx_n_u_file_format_version __pyx_string_tab[119] +#define __pyx_n_u_file_label __pyx_string_tab[120] +#define __pyx_n_u_filter __pyx_string_tab[121] +#define __pyx_n_u_from_native __pyx_string_tab[122] +#define __pyx_n_u_fsdecode __pyx_string_tab[123] +#define __pyx_n_u_fsencode __pyx_string_tab[124] +#define __pyx_n_u_func __pyx_string_tab[125] +#define __pyx_n_u_get __pyx_string_tab[126] +#define __pyx_n_u_get_categories __pyx_string_tab[127] +#define __pyx_n_u_get_native_namespace __pyx_string_tab[128] +#define __pyx_n_u_getfilesystemencoding __pyx_string_tab[129] +#define __pyx_n_u_hi __pyx_string_tab[130] +#define __pyx_n_u_implementation __pyx_string_tab[131] +#define __pyx_n_u_is_coroutine __pyx_string_tab[132] +#define __pyx_n_u_is_in __pyx_string_tab[133] +#define __pyx_n_u_is_pandas __pyx_string_tab[134] +#define __pyx_n_u_is_polars __pyx_string_tab[135] +#define __pyx_n_u_isalpha __pyx_string_tab[136] +#define __pyx_n_u_isdir __pyx_string_tab[137] +#define __pyx_n_u_isna __pyx_string_tab[138] +#define __pyx_n_u_items __pyx_string_tab[139] +#define __pyx_n_u_iter_columns __pyx_string_tab[140] +#define __pyx_n_u_iter_rows __pyx_string_tab[141] +#define __pyx_n_u_keys __pyx_string_tab[142] +#define __pyx_n_u_left __pyx_string_tab[143] +#define __pyx_n_u_lo __pyx_string_tab[144] +#define __pyx_n_u_main __pyx_string_tab[145] +#define __pyx_n_u_min __pyx_string_tab[146] +#define __pyx_n_u_missing_ranges __pyx_string_tab[147] +#define __pyx_n_u_missing_user_values __pyx_string_tab[148] +#define __pyx_n_u_module __pyx_string_tab[149] +#define __pyx_n_u_ms __pyx_string_tab[150] +#define __pyx_n_u_name __pyx_string_tab[151] +#define __pyx_n_u_name_2 __pyx_string_tab[152] +#define __pyx_n_u_narwhals_stable_v2 __pyx_string_tab[153] +#define __pyx_n_u_nominal __pyx_string_tab[154] +#define __pyx_n_u_note __pyx_string_tab[155] +#define __pyx_n_u_np __pyx_string_tab[156] +#define __pyx_n_u_ns __pyx_string_tab[157] +#define __pyx_n_u_nt __pyx_string_tab[158] +#define __pyx_n_u_nth __pyx_string_tab[159] +#define __pyx_n_u_null_count __pyx_string_tab[160] +#define __pyx_n_u_numpy __pyx_string_tab[161] +#define __pyx_n_u_nw __pyx_string_tab[162] +#define __pyx_n_u_ordinal __pyx_string_tab[163] +#define __pyx_n_u_os __pyx_string_tab[164] +#define __pyx_n_u_path __pyx_string_tab[165] +#define __pyx_n_u_pop __pyx_string_tab[166] +#define __pyx_n_u_por __pyx_string_tab[167] +#define __pyx_n_u_pyreadstat__readstat_writer __pyx_string_tab[168] +#define __pyx_n_u_pyx_capi __pyx_string_tab[169] +#define __pyx_n_u_qualname __pyx_string_tab[170] +#define __pyx_n_u_readstat_parser __pyx_string_tab[171] +#define __pyx_n_u_replace __pyx_string_tab[172] +#define __pyx_n_u_right __pyx_string_tab[173] +#define __pyx_n_u_round __pyx_string_tab[174] +#define __pyx_n_u_row_compress __pyx_string_tab[175] +#define __pyx_n_u_row_compression __pyx_string_tab[176] +#define __pyx_n_u_sav __pyx_string_tab[177] +#define __pyx_n_u_scale __pyx_string_tab[178] +#define __pyx_n_u_set_name __pyx_string_tab[179] +#define __pyx_n_u_setdefault __pyx_string_tab[180] +#define __pyx_n_u_stable __pyx_string_tab[181] +#define __pyx_n_u_surrogateescape __pyx_string_tab[182] +#define __pyx_n_u_sys __pyx_string_tab[183] +#define __pyx_n_u_table_name __pyx_string_tab[184] +#define __pyx_n_u_test __pyx_string_tab[185] +#define __pyx_n_u_then __pyx_string_tab[186] +#define __pyx_n_u_time __pyx_string_tab[187] +#define __pyx_n_u_time_unit __pyx_string_tab[188] +#define __pyx_n_u_timestamp __pyx_string_tab[189] +#define __pyx_n_u_timezone __pyx_string_tab[190] +#define __pyx_n_u_total_seconds __pyx_string_tab[191] +#define __pyx_n_u_tzinfo __pyx_string_tab[192] +#define __pyx_n_u_unknown __pyx_string_tab[193] +#define __pyx_n_u_upper __pyx_string_tab[194] +#define __pyx_n_u_us __pyx_string_tab[195] +#define __pyx_n_u_utc __pyx_string_tab[196] +#define __pyx_n_u_v2 __pyx_string_tab[197] +#define __pyx_n_u_values __pyx_string_tab[198] +#define __pyx_n_u_variable_alignment __pyx_string_tab[199] +#define __pyx_n_u_variable_display_width __pyx_string_tab[200] +#define __pyx_n_u_variable_format __pyx_string_tab[201] +#define __pyx_n_u_variable_measure __pyx_string_tab[202] +#define __pyx_n_u_variable_value_labels __pyx_string_tab[203] +#define __pyx_n_u_version __pyx_string_tab[204] +#define __pyx_n_u_warn __pyx_string_tab[205] +#define __pyx_n_u_warnings __pyx_string_tab[206] +#define __pyx_n_u_when __pyx_string_tab[207] +#define __pyx_n_u_with_columns __pyx_string_tab[208] +#define __pyx_n_u_writer_entry_point __pyx_string_tab[209] +#define __pyx_n_u_writer_file_format __pyx_string_tab[210] +#define __pyx_n_u_writer_format __pyx_string_tab[211] +#define __pyx_n_u_x __pyx_string_tab[212] +#define __pyx_n_u_xport __pyx_string_tab[213] +#define __pyx_n_u_zip __pyx_string_tab[214] +#define __pyx_kp_b_PyObject_PyObject_PyObject_PyObj __pyx_string_tab[215] +#define __pyx_kp_b_PyObject_readstat_to_numpy_types __pyx_string_tab[216] +#define __pyx_kp_b_iso88591_Q_22BBVVW_11K1_1_S_Q_a_9D_1_1_a __pyx_string_tab[217] +#define __pyx_kp_b_void_readstat_error_t_check_exit __pyx_string_tab[218] +#define __pyx_float_1e3 __pyx_number_tab[0] +#define __pyx_float_1e6 __pyx_number_tab[1] +#define __pyx_float_1e9 __pyx_number_tab[2] +#define __pyx_int_0 __pyx_number_tab[3] +#define __pyx_int_1 __pyx_number_tab[4] +#define __pyx_int_65 __pyx_number_tab[5] +#define __pyx_int_97 __pyx_number_tab[6] +#define __pyx_int_1970 __pyx_number_tab[7] +#define __pyx_int_neg_9223372036854775808 __pyx_number_tab[8] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -3341,29 +3192,23 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_CLEAR(clear_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); - #endif #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif Py_CLEAR(clear_module_state->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); - for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<209; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } - Py_CLEAR(clear_module_state->__pyx_float_1e3); - Py_CLEAR(clear_module_state->__pyx_float_1e6); - Py_CLEAR(clear_module_state->__pyx_float_1e9); - Py_CLEAR(clear_module_state->__pyx_int_0); - Py_CLEAR(clear_module_state->__pyx_int_1); - Py_CLEAR(clear_module_state->__pyx_int_65); - Py_CLEAR(clear_module_state->__pyx_int_97); - Py_CLEAR(clear_module_state->__pyx_int_1970); - Py_CLEAR(clear_module_state->__pyx_int_neg_9223372036854775808); - return 0; + for (int i=0; i<219; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<9; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_clear_contents ### */ +/* CommonTypesMetaclass.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_clear */ +Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_clear_end ### */ +return 0; } #endif /* #### Code section: module_state_traverse ### */ @@ -3377,26 +3222,20 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_VISIT(traverse_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); - #endif Py_VISIT(traverse_module_state->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); - for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<209; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } - __Pyx_VISIT_CONST(traverse_module_state->__pyx_float_1e3); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_float_1e6); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_float_1e9); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_65); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_97); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1970); - __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_neg_9223372036854775808); - return 0; + for (int i=0; i<219; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<9; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } +/* #### Code section: module_state_traverse_contents ### */ +/* CommonTypesMetaclass.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); + +/* CythonFunctionShared.module_state_traverse */ +Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + +/* #### Code section: module_state_traverse_end ### */ +return 0; } #endif /* #### Code section: module_code ### */ @@ -3531,9 +3370,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date */ __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ns, __pyx_mstate_global->__pyx_float_1e9) < 0) __PYX_ERR(0, 80, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_float_1e6) < 0) __PYX_ERR(0, 80, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ms, __pyx_mstate_global->__pyx_float_1e3) < 0) __PYX_ERR(0, 80, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ns, __pyx_mstate_global->__pyx_float_1e9) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_float_1e6) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ms, __pyx_mstate_global->__pyx_float_1e3) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __pyx_v_convfacs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; @@ -3572,7 +3411,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 84, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -3634,7 +3473,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_col_indxs}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 87, __pyx_L1_error) @@ -3650,7 +3489,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -3660,7 +3499,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 87, __pyx_L1_error) @@ -3686,7 +3525,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif if (__pyx_t_15 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_15); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_15; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -3705,7 +3544,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 89, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_timeunits, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_timeunits, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_convfacs, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -3751,7 +3590,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_19}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_20, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; @@ -3774,7 +3613,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_20}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; @@ -3805,7 +3644,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_13}; - __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -3815,7 +3654,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_17}; - __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -3825,7 +3664,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; - __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error) @@ -3865,7 +3704,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_20}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; @@ -3882,7 +3721,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_20}; - __pyx_t_17 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -3906,7 +3745,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) @@ -3921,7 +3760,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; - __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error) @@ -4119,7 +3958,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 112, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -4181,7 +4020,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_col_indxs}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L1_error) @@ -4197,7 +4036,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -4207,7 +4046,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error) @@ -4233,7 +4072,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif if (__pyx_t_15 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_15); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_15; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -4278,7 +4117,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_18}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; @@ -4301,7 +4140,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_19}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -4332,7 +4171,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_13}; - __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -4342,7 +4181,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16}; - __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -4352,7 +4191,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) @@ -4392,7 +4231,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_19}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; @@ -4409,7 +4248,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_19}; - __pyx_t_16 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -4427,7 +4266,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; - __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error) @@ -4442,7 +4281,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) @@ -4616,7 +4455,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 135, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -4678,7 +4517,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_col_indxs}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 138, __pyx_L1_error) @@ -4694,7 +4533,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -4704,7 +4543,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error) @@ -4730,7 +4569,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif if (__pyx_t_15 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_15); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_15; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -4775,7 +4614,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_18}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; @@ -4798,7 +4637,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_19}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -4829,7 +4668,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif { PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_13}; - __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -4839,7 +4678,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16}; - __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_then, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -4849,7 +4688,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) @@ -4889,7 +4728,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_19}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; @@ -4906,7 +4745,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_19}; - __pyx_t_16 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -4921,7 +4760,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; - __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error) @@ -4936,7 +4775,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) @@ -5136,8 +4975,8 @@ static double __pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_nu PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_7, __pyx_t_6, __pyx_callargs+1, 0) < 0) __PYX_ERR(0, 161, __pyx_L1_error) - __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_7, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5149,7 +4988,7 @@ static double __pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_nu __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) @@ -5360,7 +5199,7 @@ static double __pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_nu __pyx_t_8 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_curval}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_combine, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5394,7 +5233,7 @@ static double __pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_nu __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_total_seconds, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_seconds, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -5713,7 +5552,7 @@ static char *__pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unknown_pywriter_variable_format}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) @@ -5739,7 +5578,7 @@ static char *__pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pyreadstat._readstat_writer.get_datetimelike_format_for_readstat", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -5810,7 +5649,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_str_series_max_l #endif if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { @@ -5885,7 +5724,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_str_series_max_l __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -5992,7 +5831,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_str_series_max_l #endif if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_2); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6141,7 +5980,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_check_series_all_same_types(P #endif if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { @@ -6344,7 +6183,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_iter_columns, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_iter_columns, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6369,7 +6208,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ #endif if (__pyx_t_5 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_5); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; } else { { @@ -6458,7 +6297,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_categories, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_categories, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) @@ -6491,7 +6330,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_null_count, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_null_count, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -6521,7 +6360,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_drop_nulls, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_drop_nulls, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -6607,7 +6446,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_pandas, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_pandas, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L1_error) @@ -6662,7 +6501,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ #endif if (__pyx_t_11 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_11); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_11; } else { { @@ -6728,7 +6567,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_curuser_missing}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_in, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_in, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -6739,7 +6578,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_13}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_filter, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_filter, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 292, __pyx_L1_error) @@ -6883,7 +6722,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ * equal = check_series_all_same_types(curseries, curtype) * # if all elements are equal, they could be a few we expect to be an object class */ - __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_curseries, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_curseries, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_13))); __Pyx_DECREF_SET(__pyx_v_curtype, ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_t_13)))); @@ -7298,7 +7137,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_typ __pyx_t_2 = __pyx_t_10; goto __pyx_L30_bool_binop_done; } - __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_curtype), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_curtype), ((PyObject *)(&PyBool_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __pyx_t_10; @@ -8260,7 +8099,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif if (__pyx_t_5 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_5); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; } else { { @@ -8305,10 +8144,10 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_8); } else { - __pyx_t_7 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } @@ -8329,7 +8168,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 391, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_unpacking_done; @@ -8405,7 +8244,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error) @@ -8431,8 +8270,14 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l * if curpytype == PYWRITER_CHARACTER or curpytype == PYWRITER_OBJECT or curpytype==PYWRITER_DTA_STR_REF: * msg = "missing_user_values not allowed for character variable %s" % variable_name */ - __pyx_t_14 = (__pyx_v_user_missing_tags != Py_None)&&(__Pyx_PyList_GET_SIZE(__pyx_v_user_missing_tags) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_14 < 0))) __PYX_ERR(0, 397, __pyx_L1_error) + if (__pyx_v_user_missing_tags == Py_None) __pyx_t_14 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_user_missing_tags); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_14 = (__pyx_temp != 0); + } + if (__pyx_t_14) { } else { __pyx_t_11 = __pyx_t_14; @@ -8491,7 +8336,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L1_error) @@ -8525,7 +8370,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8632,7 +8477,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) @@ -8664,7 +8509,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -8743,7 +8588,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_msg}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 416, __pyx_L1_error) @@ -8775,7 +8620,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -8801,7 +8646,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l * msg = "variable_value_labels: type of Value %s in variable %s must be boolean or be 1 or 0" % (str(value), variable_name) * raise PyreadstatError(msg) */ - __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject*)&PyBool_Type), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)(&PyBool_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_14) { @@ -8868,7 +8713,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_msg}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error) @@ -8903,7 +8748,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8956,7 +8801,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8967,7 +8812,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -9062,7 +8907,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_msg}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) @@ -9103,7 +8948,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __pyx_t_13 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -9160,7 +9005,7 @@ static readstat_label_set_t *__pyx_f_10pyreadstat_16_readstat_writer_set_value_l __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pyreadstat._readstat_writer.set_value_label", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XDECREF(__pyx_v_label); @@ -9252,7 +9097,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9281,7 +9126,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_hi}; - __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9301,7 +9146,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_lo}; - __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -9361,7 +9206,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error) @@ -9483,7 +9328,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error) @@ -9653,7 +9498,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error) @@ -9729,7 +9574,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error) @@ -9812,7 +9657,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error) @@ -9869,7 +9714,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error) @@ -9971,7 +9816,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) @@ -10093,7 +9938,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error) @@ -10157,7 +10002,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error) @@ -10240,7 +10085,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) @@ -10298,7 +10143,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) @@ -10371,7 +10216,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) @@ -10434,7 +10279,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error) @@ -10506,7 +10351,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(PyObject #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) @@ -10747,7 +10592,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_set_variable_alignment(reads #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error) @@ -11006,7 +10851,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_set_variable_measure(readsta #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L1_error) @@ -11222,7 +11067,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer__check_exit_status(readstat_ #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_err_message}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) @@ -11334,7 +11179,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_open_file(PyObject *__pyx_v_f #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_filename_bytes}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) @@ -11350,7 +11195,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_open_file(PyObject *__pyx_v_f * flags = _O_WRONLY | _O_CREAT | _O_BINARY | _O_TRUNC * fd = _wsopen(u16_path, flags, _SH_DENYRW, _S_IREAD | _S_IWRITE) */ - __pyx_t_7 = PyUnicode_AsWideCharString(__pyx_v_filename_str, (&__pyx_v_length)); if (unlikely(__pyx_t_7 == ((wchar_t *)0))) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_7 = PyUnicode_AsWideCharString(__pyx_v_filename_str, (&__pyx_v_length)); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 599, __pyx_L1_error) __pyx_v_u16_path = __pyx_t_7; /* "pyreadstat/_readstat_writer.pyx":600 @@ -11631,7 +11476,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_msg}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error) @@ -11693,7 +11538,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_5, __pyx_t_7); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { @@ -11738,10 +11583,10 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_9); } else { - __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_9); } @@ -11762,7 +11607,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 626, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 626, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L10_unpacking_done; @@ -11837,7 +11682,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_msg}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error) @@ -11984,7 +11829,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_7); + __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { @@ -12029,10 +11874,10 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_9); } else { - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 638, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_9); } @@ -12053,7 +11898,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 638, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L17_unpacking_done; @@ -12114,7 +11959,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_msg}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error) @@ -12159,7 +12004,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif if (__pyx_t_13 >= __pyx_temp) break; } - __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_5, __pyx_t_13); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_13; } else { { @@ -12242,7 +12087,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 645, __pyx_L1_error) @@ -12343,7 +12188,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) @@ -12383,7 +12228,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif if (__pyx_t_13 >= __pyx_temp) break; } - __pyx_t_9 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_13); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_13; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); @@ -12440,7 +12285,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_17}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -12495,7 +12340,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_variable_names_must_be_non_empty}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 655, __pyx_L1_error) @@ -12521,14 +12366,14 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i * raise PyreadstatError("variable name '%s' starts with an illegal (non-alphabetic) character: '%s' (ordinal %s)" % (variable_name, variable_name[0], ord(variable_name[0]))) * if " " in variable_name: */ - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_17 = __pyx_t_10; __Pyx_INCREF(__pyx_t_17); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL}; - __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_isalpha, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isalpha, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error) @@ -12551,12 +12396,12 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __Pyx_GOTREF(__pyx_t_17); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_variable_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_15), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_variable_name, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_18 = __Pyx_PyObject_Ord(__pyx_t_15); if (unlikely(__pyx_t_18 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -12589,7 +12434,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_20}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; @@ -12645,7 +12490,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_10}; - __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_20, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; @@ -12692,7 +12537,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_filename_bytes}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_dirname, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dirname, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) @@ -12724,7 +12569,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_dirname}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_isdir, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isdir, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error) @@ -12770,7 +12615,7 @@ static void __pyx_f_10pyreadstat_16_readstat_writer_initial_checks(int __pyx_v_i #endif { PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_t_17}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -12912,7 +12757,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filename_path}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L4_error) @@ -12946,7 +12791,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") */ - __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeError); + __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_UnicodeError)))); if (__pyx_t_10) { __Pyx_AddTraceback("pyreadstat._readstat_writer.filepath_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 672, __pyx_L6_except_error) @@ -12987,7 +12832,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL}; - __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 673, __pyx_L6_except_error) @@ -13010,7 +12855,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -13046,7 +12891,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_filename_path}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 674, __pyx_L6_except_error) @@ -13123,7 +12968,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -13198,7 +13043,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_path_must_be_either_str_or_bytes}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error) @@ -13220,9 +13065,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes(PyObj * */ __Pyx_XDECREF(__pyx_r); - if (!(likely(PyBytes_CheckExact(__pyx_v_filename_bytes))||((__pyx_v_filename_bytes) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_filename_bytes))) __PYX_ERR(0, 682, __pyx_L1_error) - __Pyx_INCREF(__pyx_v_filename_bytes); - __pyx_r = ((PyObject*)__pyx_v_filename_bytes); + __pyx_t_6 = __pyx_v_filename_bytes; + __Pyx_INCREF(__pyx_t_6); + if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_6))) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_r = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; goto __pyx_L0; /* "pyreadstat/_readstat_writer.pyx":665 @@ -13409,7 +13256,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_filename_bytes}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_expanduser, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_expanduser, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) @@ -13448,8 +13295,8 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_df}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_eager_only, Py_True, __pyx_t_2, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 704, __pyx_L1_error) - __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_eager_only, Py_True, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13486,7 +13333,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_df}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) @@ -13509,7 +13356,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_pandas, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_pandas, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) @@ -13533,7 +13380,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_polars, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_polars, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) @@ -13635,7 +13482,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_7); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -13646,7 +13493,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -13803,57 +13650,54 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_builtin_zip); - __pyx_t_2 = __pyx_builtin_zip; __pyx_t_5 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_col_names, __pyx_v_col_types}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); } if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L12_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L12_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_3))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 740, __pyx_L12_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 740, __pyx_L12_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7)); #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L12_error) } else { - __pyx_t_4 = __pyx_t_8(__pyx_t_2); + __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -13874,21 +13718,21 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_9); } else { - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L12_error) - __Pyx_XGOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyList_GetItemRef(sequence, 1); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L12_error) + __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L12_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); #endif @@ -13899,11 +13743,11 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); - index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed; - __Pyx_GOTREF(__pyx_t_3); + index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 740, __pyx_L12_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 740, __pyx_L12_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L16_unpacking_done; @@ -13914,16 +13758,16 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __PYX_ERR(0, 740, __pyx_L12_error) __pyx_L16_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_2); + __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_7genexpr__pyx_v_v, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L12_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_7genexpr__pyx_v_v, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 740, __pyx_L12_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0; goto __pyx_L18_exit_scope; @@ -14018,8 +13862,14 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * file_label_bytes = file_label.encode("utf-8") * file_labl = file_label_bytes */ - __pyx_t_6 = (__pyx_v_file_label != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_file_label) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 778, __pyx_L22_error) + if (__pyx_v_file_label == Py_None) __pyx_t_6 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_file_label); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 778, __pyx_L22_error) + __pyx_t_6 = (__pyx_temp != 0); + } + if (__pyx_t_6) { /* "pyreadstat/_readstat_writer.pyx":779 @@ -14150,7 +14000,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_7); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { @@ -14161,16 +14011,16 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); + __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L22_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L22_error) } else { - __pyx_t_2 = __pyx_t_8(__pyx_t_1); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 787, __pyx_L22_error) @@ -14179,9 +14029,9 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d break; } } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); + __pyx_t_3 = 0; /* "pyreadstat/_readstat_writer.pyx":788 * if type(note) == list: @@ -14195,14 +14045,14 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 788, __pyx_L22_error) + __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 788, __pyx_L22_error) readstat_add_note(__pyx_v_writer, __pyx_t_17); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyreadstat/_readstat_writer.pyx":787 * note = [note] @@ -14232,31 +14082,31 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * if file_format_version > -1: */ /*else*/ { - __pyx_t_2 = NULL; + __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_note)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 790, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_note_should_be_either_str_or_lis, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_note_should_be_either_str_or_lis, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - assert(__pyx_t_2); + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -14338,8 +14188,14 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * table_name_bytes = table_name.encode("utf-8") * tab_name = table_name_bytes */ - __pyx_t_6 = (__pyx_v_table_name != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_table_name) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 799, __pyx_L22_error) + if (__pyx_v_table_name == Py_None) __pyx_t_6 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_table_name); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 799, __pyx_L22_error) + __pyx_t_6 = (__pyx_temp != 0); + } + if (__pyx_t_6) { /* "pyreadstat/_readstat_writer.pyx":800 @@ -14426,25 +14282,25 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * col_label_temp = list() */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_column_labels_must_be_either_lis}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -14508,7 +14364,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 811, __pyx_L22_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_variable_name, __pyx_t_1); __pyx_t_1 = 0; @@ -14520,13 +14376,13 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * col_label_temp.append(column_labels[variable_name]) * else: */ - __pyx_t_3 = __pyx_v_column_labels; - __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_v_column_labels; + __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -14615,25 +14471,25 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * * strref_cnt = 0 */ - __pyx_t_3 = NULL; + __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - assert(__pyx_t_3); + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_length_of_column_labels_must_be}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_length_of_column_labels_must_be}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -14692,7 +14548,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 824, __pyx_L22_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -14706,30 +14562,30 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_4); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); __Pyx_INCREF(__pyx_t_9); } else { - __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0); + __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L22_error) - __Pyx_XGOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 2); + __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyList_GetItemRef(sequence, 3); + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L22_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_9); } #else { Py_ssize_t i; - PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_9}; + PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_2,&__pyx_t_3,&__pyx_t_9}; for (i=0; i < 4; i++) { PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_GOTREF(item); @@ -14740,7 +14596,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_9}; + PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_2,&__pyx_t_3,&__pyx_t_9}; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -14750,7 +14606,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) __PYX_ERR(0, 824, __pyx_L22_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < (0)) __PYX_ERR(0, 824, __pyx_L22_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L50_unpacking_done; @@ -14763,12 +14619,12 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d } __pyx_t_22 = ((__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L22_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_23 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L22_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_23 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_curtype = __pyx_t_22; __pyx_v_max_length = __pyx_t_23; - __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_3); + __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v__, __pyx_t_9); __pyx_t_9 = 0; @@ -14783,7 +14639,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 825, __pyx_L22_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_variable_name, __pyx_t_1); __pyx_t_1 = 0; @@ -14800,7 +14656,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -14812,11 +14668,11 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d } __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_v_curtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 827, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_10pyreadstat_16_readstat_writer_narwhals_to_readstat_types, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_10pyreadstat_16_readstat_writer_narwhals_to_readstat_types, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_25 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L22_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_25 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_variable = readstat_add_variable(__pyx_v_writer, __pyx_t_24, __pyx_t_25, __pyx_v_max_length); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -14854,8 +14710,14 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * readstat_variable_set_format(variable, tempformat.encode("utf-8")) * if curtype in pyrwriter_datetimelike_types and (variable_format is None or variable_name not in variable_format.keys()): */ - __pyx_t_6 = (__pyx_v_tempformat != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_tempformat) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 831, __pyx_L22_error) + if (__pyx_v_tempformat == Py_None) __pyx_t_6 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_tempformat); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 831, __pyx_L22_error) + __pyx_t_6 = (__pyx_temp != 0); + } + if (__pyx_t_6) { /* "pyreadstat/_readstat_writer.pyx":832 @@ -14938,7 +14800,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * readstat_variable_set_format(variable, curformat) * # prepare string_ref */ - __pyx_t_16 = __pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for_readstat(__pyx_v_file_format, __pyx_v_curtype); if (unlikely(__pyx_t_16 == ((char *)0) && PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L22_error) + __pyx_t_16 = __pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for_readstat(__pyx_v_file_format, __pyx_v_curtype); if (unlikely(__pyx_t_16 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L22_error) __pyx_v_curformat = __pyx_t_16; /* "pyreadstat/_readstat_writer.pyx":835 @@ -14979,45 +14841,45 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_v_variable_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L22_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L22_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_3))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 839, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 839, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L22_error) } else { - __pyx_t_1 = __pyx_t_8(__pyx_t_2); + __pyx_t_1 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -15104,7 +14966,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * curvalstr = str(curval) */ } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyreadstat/_readstat_writer.pyx":838 * # prepare string_ref @@ -15132,10 +14994,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * if type(column_labels[col_indx]) != str: * raise PyreadstatError("Column labels must be strings") */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__pyx_t_2 != Py_None); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = (__pyx_t_3 != Py_None); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { /* "pyreadstat/_readstat_writer.pyx":848 @@ -15145,10 +15007,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * raise PyreadstatError("Column labels must be strings") * cur_col_label = column_labels[col_indx].encode("utf-8") */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_2)), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L22_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_3)), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 848, __pyx_L22_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_6)) { @@ -15160,25 +15022,25 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * cur_col_label = column_labels[col_indx].encode("utf-8") * readstat_variable_set_label(variable, cur_col_label) */ - __pyx_t_2 = NULL; + __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 849, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); - assert(__pyx_t_2); + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Column_labels_must_be_strings}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Column_labels_must_be_strings}; + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -15203,16 +15065,16 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * readstat_variable_set_label(variable, cur_col_label) * if variable_value_labels: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __pyx_t_2; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_column_labels, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __pyx_t_3; __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -15298,12 +15160,12 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d */ __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_lblset_cnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_variable_name, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L22_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_variable_name, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L22_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_XDECREF_SET(__pyx_v_labelset_name, __pyx_t_1); __pyx_t_1 = 0; @@ -15368,7 +15230,9 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * col_names_to_types[variable_name], file_format, variable_name, curuser_missing) * readstat_variable_set_label_set(variable, label_set) */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_labelset_name))||((__pyx_v_labelset_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_labelset_name))) __PYX_ERR(0, 860, __pyx_L22_error) + __pyx_t_1 = __pyx_v_labelset_name; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 860, __pyx_L22_error) /* "pyreadstat/_readstat_writer.pyx":861 * curuser_missing = missing_user_values.get(variable_name) @@ -15377,12 +15241,16 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * readstat_variable_set_label_set(variable, label_set) * # missing ranges */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_col_names_to_types, __pyx_v_variable_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = ((__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L22_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_v_variable_name))||((__pyx_v_variable_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_variable_name))) __PYX_ERR(0, 861, __pyx_L22_error) - if (!(likely(PyList_CheckExact(__pyx_v_curuser_missing))||((__pyx_v_curuser_missing) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_curuser_missing))) __PYX_ERR(0, 861, __pyx_L22_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_col_names_to_types, __pyx_v_variable_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_22 = ((__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_v_variable_name; + __Pyx_INCREF(__pyx_t_3); + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 861, __pyx_L22_error) + __pyx_t_9 = __pyx_v_curuser_missing; + __Pyx_INCREF(__pyx_t_9); + if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_9))) __PYX_ERR(0, 861, __pyx_L22_error) /* "pyreadstat/_readstat_writer.pyx":860 * if missing_user_values: @@ -15391,7 +15259,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * col_names_to_types[variable_name], file_format, variable_name, curuser_missing) * readstat_variable_set_label_set(variable, label_set) */ - __pyx_t_29 = __pyx_f_10pyreadstat_16_readstat_writer_set_value_label(__pyx_v_writer, __pyx_v_value_labels, ((PyObject*)__pyx_v_labelset_name), __pyx_t_22, __pyx_v_file_format, ((PyObject*)__pyx_v_variable_name), ((PyObject*)__pyx_v_curuser_missing)); if (unlikely(__pyx_t_29 == ((readstat_label_set_t *)0) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L22_error) + __pyx_t_29 = __pyx_f_10pyreadstat_16_readstat_writer_set_value_label(__pyx_v_writer, __pyx_v_value_labels, ((PyObject*)__pyx_t_1), __pyx_t_22, __pyx_v_file_format, ((PyObject*)__pyx_t_3), ((PyObject*)__pyx_t_9)); if (unlikely(__pyx_t_29 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_label_set = __pyx_t_29; /* "pyreadstat/_readstat_writer.pyx":862 @@ -15442,10 +15313,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(0, 865, __pyx_L22_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_missing_ranges, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_cur_ranges, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_missing_ranges, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 865, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_cur_ranges, __pyx_t_9); + __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":866 * if missing_ranges: @@ -15485,31 +15356,31 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * add_missing_ranges(cur_ranges, variable, curtype, variable_name) * if variable_alignment: */ - __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); - assert(__pyx_t_2); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); - __Pyx_INCREF(__pyx_t_2); + if (unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_5 = 0; } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_msg}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; + __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_9); } - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(0, 869, __pyx_L22_error) /* "pyreadstat/_readstat_writer.pyx":867 @@ -15528,9 +15399,15 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * if variable_alignment: * # At the moment this is ineffective for sav and dta (the function runs but in */ - if (!(likely(PyList_CheckExact(__pyx_v_cur_ranges))||((__pyx_v_cur_ranges) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_cur_ranges))) __PYX_ERR(0, 870, __pyx_L22_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_variable_name))||((__pyx_v_variable_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_variable_name))) __PYX_ERR(0, 870, __pyx_L22_error) - __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(((PyObject*)__pyx_v_cur_ranges), __pyx_v_variable, __pyx_v_curtype, ((PyObject*)__pyx_v_variable_name)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L22_error) + __pyx_t_9 = __pyx_v_cur_ranges; + __Pyx_INCREF(__pyx_t_9); + if (!(likely(PyList_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_9))) __PYX_ERR(0, 870, __pyx_L22_error) + __pyx_t_1 = __pyx_v_variable_name; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 870, __pyx_L22_error) + __pyx_f_10pyreadstat_16_readstat_writer_add_missing_ranges(((PyObject*)__pyx_t_9), __pyx_v_variable, __pyx_v_curtype, ((PyObject*)__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_writer.pyx":866 * if missing_ranges: @@ -15593,9 +15470,15 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * if variable_display_width: * cur_display_width = variable_display_width.get(variable_name) */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_cur_alignment))||((__pyx_v_cur_alignment) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_cur_alignment))) __PYX_ERR(0, 876, __pyx_L22_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_variable_name))||((__pyx_v_variable_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_variable_name))) __PYX_ERR(0, 876, __pyx_L22_error) - __pyx_f_10pyreadstat_16_readstat_writer_set_variable_alignment(__pyx_v_variable, ((PyObject*)__pyx_v_cur_alignment), ((PyObject*)__pyx_v_variable_name)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L22_error) + __pyx_t_1 = __pyx_v_cur_alignment; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 876, __pyx_L22_error) + __pyx_t_9 = __pyx_v_variable_name; + __Pyx_INCREF(__pyx_t_9); + if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_9))) __PYX_ERR(0, 876, __pyx_L22_error) + __pyx_f_10pyreadstat_16_readstat_writer_set_variable_alignment(__pyx_v_variable, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":875 * # the resulting file all alignments are still unknown) @@ -15636,10 +15519,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(0, 878, __pyx_L22_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_variable_display_width, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_cur_display_width, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_variable_display_width, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 878, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_cur_display_width, __pyx_t_9); + __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":879 * if variable_display_width: @@ -15659,8 +15542,11 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * cur_measure = variable_measure.get(variable_name) */ __pyx_t_23 = __Pyx_PyLong_As_int(__pyx_v_cur_display_width); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L22_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_variable_name))||((__pyx_v_variable_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_variable_name))) __PYX_ERR(0, 880, __pyx_L22_error) - __pyx_f_10pyreadstat_16_readstat_writer_set_variable_display_width(__pyx_v_variable, __pyx_t_23, ((PyObject*)__pyx_v_variable_name)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L22_error) + __pyx_t_9 = __pyx_v_variable_name; + __Pyx_INCREF(__pyx_t_9); + if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_9))) __PYX_ERR(0, 880, __pyx_L22_error) + __pyx_f_10pyreadstat_16_readstat_writer_set_variable_display_width(__pyx_v_variable, __pyx_t_23, ((PyObject*)__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":879 * if variable_display_width: @@ -15701,10 +15587,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(0, 882, __pyx_L22_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_variable_measure, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_XDECREF_SET(__pyx_v_cur_measure, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_variable_measure, __pyx_v_variable_name, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 882, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_cur_measure, __pyx_t_9); + __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":883 * if variable_measure: @@ -15723,9 +15609,15 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * * # start writing */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_cur_measure))||((__pyx_v_cur_measure) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_cur_measure))) __PYX_ERR(0, 884, __pyx_L22_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_variable_name))||((__pyx_v_variable_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_variable_name))) __PYX_ERR(0, 884, __pyx_L22_error) - __pyx_f_10pyreadstat_16_readstat_writer_set_variable_measure(__pyx_v_variable, ((PyObject*)__pyx_v_cur_measure), ((PyObject*)__pyx_v_variable_name)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L22_error) + __pyx_t_9 = __pyx_v_cur_measure; + __Pyx_INCREF(__pyx_t_9); + if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_9))) __PYX_ERR(0, 884, __pyx_L22_error) + __pyx_t_1 = __pyx_v_variable_name; + __Pyx_INCREF(__pyx_t_1); + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 884, __pyx_L22_error) + __pyx_f_10pyreadstat_16_readstat_writer_set_variable_measure(__pyx_v_variable, ((PyObject*)__pyx_t_9), ((PyObject*)__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L22_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pyreadstat/_readstat_writer.pyx":883 * if variable_measure: @@ -15878,25 +15770,25 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * # validation */ __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_9); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_unknown_file_format}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -15959,28 +15851,28 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 909, __pyx_L22_error) } - __pyx_t_2 = __pyx_v_col_types; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_col_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; for (;;) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 909, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_9 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 909, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 909, __pyx_L22_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 909, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 909, __pyx_L22_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pywriter_types = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -15997,28 +15889,28 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 910, __pyx_L22_error) } - __pyx_t_2 = __pyx_v_col_types; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_col_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; for (;;) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 910, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_9 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_x, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L22_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_x, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 910, __pyx_L22_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pywriter_timeunits = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -16097,13 +15989,13 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * if hasdatetime64: * df2 = vectorized_convert_datetime_to_number(df2, file_format, pywriter_types, pywriter_timeunits, col_count) */ - __pyx_t_2 = __pyx_v_df; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_df; + __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_clone, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_clone, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -16242,56 +16134,56 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * check_exit_status(readstat_begin_row(writer)) * */ - __pyx_t_2 = __pyx_v_df2; - __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_v_df2; + __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_iter_rows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_iter_rows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 929, __pyx_L22_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 929, __pyx_L22_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_3))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 929, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); + __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 929, __pyx_L22_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L22_error) } else { - __pyx_t_1 = __pyx_t_8(__pyx_t_2); + __pyx_t_1 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -16342,7 +16234,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * curtype = pywriter_types[col_indx] * is_missing = col_types[col_indx][2] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_row, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_row, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_curval, __pyx_t_1); __pyx_t_1 = 0; @@ -16354,7 +16246,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * is_missing = col_types[col_indx][2] * curuser_missing = None */ - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_pywriter_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_22 = ((__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L22_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -16371,9 +16263,9 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 937, __pyx_L22_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L22_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_types, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 937, __pyx_L22_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 937, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_is_missing, __pyx_t_9); @@ -16414,7 +16306,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 940, __pyx_L22_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 940, __pyx_L22_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_col_indx, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 940, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_missing_user_values, __pyx_t_9, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -16462,7 +16354,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_curval}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_isna, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isna, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -16726,7 +16618,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; - __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); @@ -16947,25 +16839,25 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d */ /*else*/ { __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L22_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_9); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Unknown_data_format_to_insert}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); } @@ -17006,7 +16898,7 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * */ } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyreadstat/_readstat_writer.pyx":985 * rowcnt += 1 @@ -17046,10 +16938,10 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d */ /*except:*/ { __Pyx_AddTraceback("pyreadstat._readstat_writer.run_write", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 987, __pyx_L24_except_error) - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 987, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); /* "pyreadstat/_readstat_writer.pyx":988 * @@ -17058,11 +16950,11 @@ static int __pyx_f_10pyreadstat_16_readstat_writer_run_write(PyObject *__pyx_v_d * finally: * readstat_writer_free(writer) */ - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3); - __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2); + __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 988, __pyx_L24_except_error) } @@ -17381,7 +17273,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "writer_entry_point", 0) < 0) __PYX_ERR(0, 995, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "writer_entry_point", 0) < (0)) __PYX_ERR(0, 995, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_kp_u__3))); @@ -17783,7 +17675,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_writer_writer_entry_point(CYT #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_compress_and_row_compress_cannot}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error) @@ -18053,7 +17945,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_writer_writer_entry_point(CYT #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Version_not_supported}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error) @@ -18177,7 +18069,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_writer_writer_entry_point(CYT #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_wrong_writer_format}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error) @@ -18271,28 +18163,36 @@ static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ - if (__Pyx_ExportFunction("vectorized_convert_datetime_to_number", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_datetime_to_number, "PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("vectorized_convert_date_to_number", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date_to_number, "PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("vectorized_convert_time_to_number", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time_to_number, "PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("convert_datetimelike_to_number", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_number, "double (__pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("get_datetimelike_format_for_readstat", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for_readstat, "char *(__pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("get_narwhals_str_series_max_length", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_str_series_max_length, "int (PyObject *, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("check_series_all_same_types", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_check_series_all_same_types, "int (PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("get_narwhals_column_types", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_types, "PyObject *(PyObject *, PyObject *, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("write_bytes", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_write_bytes, "Py_ssize_t (void const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("open_file", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_open_file, "int (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("close_file", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_close_file, "int (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("filepath_to_bytes", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("initial_checks", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_initial_checks, "void (int, int, PyObject *, PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ExportFunction("run_write", (void (*)(void))__pyx_f_10pyreadstat_16_readstat_writer_run_write, "int (PyObject *, PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + { + __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_PyObject_PyObj); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_export_name = __pyx_export_signature + 1032; + void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_filepath_to_bytes, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_column_types, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_datetime_to_number, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_date_to_number, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_vectorized_convert_time_to_number, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_write_bytes, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_get_datetimelike_format_for_readstat, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_convert_datetimelike_to_number, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_open_file, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_check_series_all_same_types, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_run_write, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_get_narwhals_str_series_max_length, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_close_file, (void (*)(void))&__pyx_f_10pyreadstat_16_readstat_writer_initial_checks, (void (*)(void)) NULL}; + void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; + const char *__pyx_export_current_signature = __pyx_export_signature; + while (*__pyx_export_pointer) { + if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_export_pointer; + __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; + __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; + if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -18317,15 +18217,15 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule("pyreadstat._readstat_parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = __Pyx_ImportType_3_1_2(__pyx_t_1, "pyreadstat._readstat_parser", "data_container", + __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = __Pyx_ImportType_3_2_4(__pyx_t_1, "pyreadstat._readstat_parser", "data_container", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), + sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), + sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), #else - sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_1_2(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), + sizeof(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container), #endif - __Pyx_ImportType_CheckSize_Warn_3_1_2); if (!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) __PYX_ERR(1, 49, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) __PYX_ERR(1, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -18344,25 +18244,26 @@ static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ - __pyx_t_1 = PyImport_ImportModule("pyreadstat._readstat_parser"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "readstat_to_numpy_types", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "sas_date_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "sas_datetime_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "sas_time_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "sas_all_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "sas_origin", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "spss_datetime_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "spss_date_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "spss_time_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "spss_all_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "spss_origin", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "stata_datetime_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_datetime_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "stata_date_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_date_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "stata_time_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_time_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "stata_all_formats", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_all_formats, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportVoidPtr_3_1_2(__pyx_t_1, "stata_origin", (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_origin, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + { + __pyx_t_1 = PyImport_ImportModule("pyreadstat._readstat_parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_readstat_to_numpy_types); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 26; + void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_all_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_date_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_datetime_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_origin, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_sas_time_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_all_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_date_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_datetime_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_origin, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_spss_time_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_all_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_date_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_datetime_formats, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_origin, (void **)&__pyx_vp_10pyreadstat_16_readstat_parser_stata_time_formats, (void **) NULL}; + void **const *__pyx_import_pointer = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -18380,10 +18281,26 @@ static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("pyreadstat._readstat_parser"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction_3_1_2(__pyx_t_1, "check_exit_status", (void (**)(void))&__pyx_f_10pyreadstat_16_readstat_parser_check_exit_status, "void (readstat_error_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + { + __pyx_t_1 = PyImport_ImportModule("pyreadstat._readstat_parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_void_readstat_error_t_check_exit); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + const char * __pyx_import_name = __pyx_import_signature + 24; + void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_10pyreadstat_16_readstat_parser_check_exit_status, (void (**)(void)) NULL}; + void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers; + const char *__pyx_import_current_signature = __pyx_import_signature; + while (*__pyx_import_pointer) { + if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + ++__pyx_import_pointer; + __pyx_import_name = strchr(__pyx_import_name, '\0') + 1; + __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1; + if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -18399,7 +18316,7 @@ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec__readstat_writer}, #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING - {Py_mod_gil, Py_MOD_GIL_USED}, + {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, #endif #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, @@ -18461,7 +18378,8 @@ __Pyx_PyMODINIT_FUNC PyInit__readstat_writer(void) return PyModuleDef_Init(&__pyx_moduledef); } /* ModuleCreationPEP489 */ -#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { { PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think @@ -18491,12 +18409,15 @@ static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { #if !CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { static PY_INT64_T main_interpreter_id = -1; -#if CYTHON_COMPILING_IN_GRAAL +#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 + PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_GRAAL PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); -#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 - PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); -#elif CYTHON_COMPILING_IN_LIMITED_API +#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ + || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); #else PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); #endif @@ -18568,7 +18489,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_writer(PyObject *__pyx_p __pyx_mstatetype *__pyx_mstate = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; @@ -18577,10 +18498,11 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_writer(PyObject *__pyx_p PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - size_t __pyx_t_12; - Py_ssize_t __pyx_t_13; - PyObject *(*__pyx_t_14)(PyObject *); - int __pyx_t_15; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + size_t __pyx_t_14; + PyObject *(*__pyx_t_15)(PyObject *); + int __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18623,48 +18545,28 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_writer(PyObject *__pyx_p if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /* ImportRefnannyAPI */ #if CYTHON_REFNANNY -__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); -if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); -} -#endif - -__Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); - if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pxy_PyFrame_Initialize_Offsets - __Pxy_PyFrame_Initialize_Offsets(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } #endif + +__Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); + __Pyx_init_runtime_version(); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Library function declarations ---*/ /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; - if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) - if (__pyx_CommonTypesMetaclass_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_FusedFunction_USED - if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Generator_USED - if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - /*--- Library function declarations ---*/ + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__pyx_module_is_main_pyreadstat___readstat_writer) { - if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) } { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -18673,10 +18575,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); } } /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_CreateCodeObjects(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(__pyx_mstate); (void)__Pyx_modinit_variable_export_code(__pyx_mstate); @@ -18694,9 +18596,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * import warnings * import sys */ - __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_os, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":19 @@ -18706,9 +18609,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * import sys * import datetime */ - __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_warnings, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_warnings, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":20 @@ -18718,9 +18622,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * import datetime * #import calendar */ - __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_sys, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":21 @@ -18730,9 +18635,10 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * #import calendar * from datetime import timezone */ - __pyx_t_2 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_datetime, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_datetime, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < (0)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":23 @@ -18742,16 +18648,22 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * #from datetime import timezone as _timezone * #from libc.math cimport round, NAN */ - __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_timezone}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyreadstat_datetime, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_timezone, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_timezone}; + __pyx_t_3 = 0; { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pyreadstat/_readstat_writer.pyx":27 * #from libc.math cimport round, NAN @@ -18760,10 +18672,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * import narwhals.stable.v2 as nw * */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_numpy, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_numpy, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":28 * @@ -18772,10 +18685,19 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * * from readstat_api cimport * */ - __pyx_t_3 = __Pyx_ImportDottedModuleRelFirst(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, __pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_narwhals_stable_v2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_stable); + Py_DECREF(__pyx_t_1); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_v2); + Py_DECREF(__pyx_t_1); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = __pyx_t_5; + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":31 * @@ -18784,19 +18706,21 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * from _readstat_parser cimport check_exit_status * */ - __pyx_t_3 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_readstat_parser, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ReadstatError,__pyx_mstate_global->__pyx_n_u_PyreadstatError}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_readstat_parser, __pyx_imported_names, 2, __pyx_mstate_global->__pyx_kp_u_pyreadstat__readstat_parser, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + } + __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ReadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ReadstatError,__pyx_mstate_global->__pyx_n_u_PyreadstatError}; + for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_writer.pyx":34 @@ -18808,41 +18732,41 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_4) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_5) < 0) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_6) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_7) < 0) __PYX_ERR(0, 34, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_8) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_9) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_int_types); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_int_types, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); @@ -18857,62 +18781,62 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Float64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Float32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Decimal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int128); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int128); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt128); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt128); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_UInt32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_t_7) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_9) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_8) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_6) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_5) < 0) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_4) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_4) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_8) < 0) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_9) < 0) __PYX_ERR(0, 35, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_10) < 0) __PYX_ERR(0, 35, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_10) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_11) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_12) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_float_types); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_float_types, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); @@ -18927,34 +18851,34 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_t_10) < 0) __PYX_ERR(0, 36, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_t_12) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_11) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_10) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_9) < 0) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_8) < 0) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PySet_Add(__pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 36, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_nat_types); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_nat_types, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); @@ -18969,34 +18893,34 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); */ __pyx_t_2 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PySet_Add(__pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (PySet_Add(__pyx_t_7, __pyx_t_2) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PySet_Add(__pyx_t_5, __pyx_t_3) < 0) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PySet_Add(__pyx_t_5, __pyx_t_8) < 0) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PySet_Add(__pyx_t_5, __pyx_t_9) < 0) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PySet_Add(__pyx_t_5, __pyx_t_10) < 0) __PYX_ERR(0, 37, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (PySet_Add(__pyx_t_5, __pyx_t_4) < 0) __PYX_ERR(0, 37, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PySet_Add(__pyx_t_7, __pyx_t_10) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PySet_Add(__pyx_t_7, __pyx_t_11) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PySet_Add(__pyx_t_7, __pyx_t_12) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (PySet_Add(__pyx_t_7, __pyx_t_6) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_pyrwriter_datetimelike_types); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_pyrwriter_datetimelike_types, ((PyObject*)__pyx_t_5)); - __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_pyrwriter_datetimelike_types, ((PyObject*)__pyx_t_7)); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; /* "pyreadstat/_readstat_writer.pyx":38 * cdef set nat_types = {datetime.datetime, np.datetime64, datetime.time, datetime.date} #pd._libs.tslibs.timestamps.Timestamp, @@ -19005,18 +18929,18 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_DATETIME64, PYWRITER_DATE64, PYWRITER_TIME64 } * cdef dict narwhals_to_readstat_types = {PYWRITER_DOUBLE: READSTAT_TYPE_DOUBLE, PYWRITER_INTEGER: READSTAT_TYPE_INT32, */ - __pyx_t_5 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DOUBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_INTEGER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_LOGICAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_INTEGER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_12 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_LOGICAL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); /* "pyreadstat/_readstat_writer.pyx":39 * cdef set pyrwriter_datetimelike_types = {PYWRITER_DATE, PYWRITER_DATETIME, PYWRITER_TIME, PYWRITER_DATETIME64, PYWRITER_DATE64, PYWRITER_TIME64} @@ -19027,34 +18951,34 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); */ __pyx_t_2 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - if (PySet_Add(__pyx_t_11, __pyx_t_5) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_4) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_10) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = PySet_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + if (PySet_Add(__pyx_t_13, __pyx_t_7) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_6) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_12) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_11) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_10) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_9) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_8) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_3) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PySet_Add(__pyx_t_13, __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_2) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_6) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PySet_Add(__pyx_t_11, __pyx_t_7) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_8) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PySet_Add(__pyx_t_13, __pyx_t_9) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_pywriter_numeric_types); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_pywriter_numeric_types, ((PyObject*)__pyx_t_11)); - __Pyx_GIVEREF(__pyx_t_11); - __pyx_t_11 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_pywriter_numeric_types, ((PyObject*)__pyx_t_13)); + __Pyx_GIVEREF(__pyx_t_13); + __pyx_t_13 = 0; /* "pyreadstat/_readstat_writer.pyx":40 * cdef set pywriter_numeric_types = {PYWRITER_DOUBLE, PYWRITER_INTEGER, PYWRITER_LOGICAL, PYWRITER_DATE, PYWRITER_DATETIME, PYWRITER_TIME, @@ -19063,23 +18987,23 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_CHARACTER: READSTAT_TYPE_STRING, PYWRITER_LOGICAL: READSTAT_TYPE_INT32, * PYWRITER_DTA_STR_REF: READSTAT_TYPE_STRING_REF, */ - __pyx_t_11 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_INTEGER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - + __pyx_t_13 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DOUBLE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_INTEGER); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + /* "pyreadstat/_readstat_writer.pyx":41 * PYWRITER_DATETIME64, PYWRITER_DATE64, PYWRITER_TIME64 } * cdef dict narwhals_to_readstat_types = {PYWRITER_DOUBLE: READSTAT_TYPE_DOUBLE, PYWRITER_INTEGER: READSTAT_TYPE_INT32, @@ -19087,20 +19011,20 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_DTA_STR_REF: READSTAT_TYPE_STRING_REF, * PYWRITER_OBJECT: READSTAT_TYPE_STRING, PYWRITER_DATE: READSTAT_TYPE_DOUBLE, */ - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_CHARACTER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_LOGICAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_CHARACTER); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_LOGICAL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "pyreadstat/_readstat_writer.pyx":42 * cdef dict narwhals_to_readstat_types = {PYWRITER_DOUBLE: READSTAT_TYPE_DOUBLE, PYWRITER_INTEGER: READSTAT_TYPE_INT32, @@ -19109,13 +19033,13 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_OBJECT: READSTAT_TYPE_STRING, PYWRITER_DATE: READSTAT_TYPE_DOUBLE, * PYWRITER_DATETIME: READSTAT_TYPE_DOUBLE, PYWRITER_TIME: READSTAT_TYPE_DOUBLE, */ - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DTA_STR_REF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING_REF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DTA_STR_REF); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING_REF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":43 * PYWRITER_CHARACTER: READSTAT_TYPE_STRING, PYWRITER_LOGICAL: READSTAT_TYPE_INT32, @@ -19124,20 +19048,20 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_DATETIME: READSTAT_TYPE_DOUBLE, PYWRITER_TIME: READSTAT_TYPE_DOUBLE, * PYWRITER_DATETIME64: READSTAT_TYPE_DOUBLE, PYWRITER_DATE64: READSTAT_TYPE_DOUBLE, */ - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_OBJECT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_OBJECT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":44 * PYWRITER_DTA_STR_REF: READSTAT_TYPE_STRING_REF, @@ -19146,20 +19070,20 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_DATETIME64: READSTAT_TYPE_DOUBLE, PYWRITER_DATE64: READSTAT_TYPE_DOUBLE, * PYWRITER_TIME64: READSTAT_TYPE_DOUBLE, } */ - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":45 * PYWRITER_OBJECT: READSTAT_TYPE_STRING, PYWRITER_DATE: READSTAT_TYPE_DOUBLE, @@ -19168,20 +19092,20 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * PYWRITER_TIME64: READSTAT_TYPE_DOUBLE, } * */ - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_7, __pyx_t_6) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATETIME64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_DATE64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_9, __pyx_t_8) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":46 * PYWRITER_DATETIME: READSTAT_TYPE_DOUBLE, PYWRITER_TIME: READSTAT_TYPE_DOUBLE, @@ -19190,17 +19114,17 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * * cdef double spss_offset_secs = 12219379200 */ - __pyx_t_6 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_11, __pyx_t_6, __pyx_t_7) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type(__pyx_e_10pyreadstat_16_readstat_writer_PYWRITER_TIME64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_13, __pyx_t_8, __pyx_t_9) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_narwhals_to_readstat_types); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_narwhals_to_readstat_types, ((PyObject*)__pyx_t_11)); - __Pyx_GIVEREF(__pyx_t_11); - __pyx_t_11 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_narwhals_to_readstat_types, ((PyObject*)__pyx_t_13)); + __Pyx_GIVEREF(__pyx_t_13); + __pyx_t_13 = 0; /* "pyreadstat/_readstat_writer.pyx":48 * PYWRITER_TIME64: READSTAT_TYPE_DOUBLE, } @@ -19245,29 +19169,29 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * * cdef valid_user_missing_sas = [chr(x) for x in range(ord("A"), ord("Z")+1)] + ["_"] */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __pyx_t_6; - __Pyx_INCREF(__pyx_t_7); - __pyx_t_12 = 0; + __pyx_t_9 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; - __pyx_t_11 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); } __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_date_0); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_date_0, __pyx_t_11); - __Pyx_GIVEREF(__pyx_t_11); - __pyx_t_11 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_date_0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_13); + __pyx_t_13 = 0; /* "pyreadstat/_readstat_writer.pyx":54 * cdef object date_0 = datetime.datetime(1970,1,1).date() @@ -19276,64 +19200,28 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * cdef valid_user_missing_stata = [chr(x) for x in range(ord("a"), ord("z")+1)] * */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = NULL; - __Pyx_INCREF(__pyx_builtin_range); - __pyx_t_2 = __pyx_builtin_range; - __pyx_t_3 = __Pyx_PyLong_From_long((90 + 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = 1; + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_9 = NULL; + __pyx_t_2 = __Pyx_PyLong_From_long((90 + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_mstate_global->__pyx_int_65, __pyx_t_3}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_int_65, __pyx_t_2}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_14, (3-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } - if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { - __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); - __pyx_t_13 = 0; - __pyx_t_14 = NULL; - } else { - __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 54, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { - if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 54, __pyx_L1_error) - #endif - if (__pyx_t_13 >= __pyx_temp) break; - } - __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_13); - ++__pyx_t_13; - } else { - { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 54, __pyx_L1_error) - #endif - if (__pyx_t_13 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13)); - #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_13); - #endif - ++__pyx_t_13; - } - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) - } else { - __pyx_t_6 = __pyx_t_14(__pyx_t_2); - if (unlikely(!__pyx_t_6)) { + { + __pyx_t_8 = __pyx_t_15(__pyx_t_2); + if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 54, __pyx_L1_error) @@ -19342,29 +19230,29 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); break; } } - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_x, __pyx_t_6) < 0) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyUnicode_FromOrdinal(__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_x, __pyx_t_8) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyLong_As_int(__pyx_t_8); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyUnicode_FromOrdinal(__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u__5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyNumber_Add(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_8 = PyNumber_Add(__pyx_t_13, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_sas); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_sas, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_sas, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":55 * @@ -19373,63 +19261,27 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * * # max lenght of a string in dta before it has to use string_ref */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = NULL; - __Pyx_INCREF(__pyx_builtin_range); - __pyx_t_3 = __pyx_builtin_range; - __pyx_t_7 = __Pyx_PyLong_From_long((0x7A + 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = 1; + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_13 = NULL; + __pyx_t_9 = __Pyx_PyLong_From_long((0x7A + 1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_mstate_global->__pyx_int_97, __pyx_t_7}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_mstate_global->__pyx_int_97, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_14, (3-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__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_13 = 0; - __pyx_t_14 = NULL; - } else { - __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 55, __pyx_L1_error) - } + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { - if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 55, __pyx_L1_error) - #endif - if (__pyx_t_13 >= __pyx_temp) break; - } - __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_13); - ++__pyx_t_13; - } else { - { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); - #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 55, __pyx_L1_error) - #endif - if (__pyx_t_13 >= __pyx_temp) break; - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13)); - #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); - #endif - ++__pyx_t_13; - } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) - } else { - __pyx_t_2 = __pyx_t_14(__pyx_t_3); + { + __pyx_t_2 = __pyx_t_15(__pyx_t_9); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -19440,22 +19292,22 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); } } __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_x, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_x, __pyx_t_2) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 55, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_stata); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_stata, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_writer_valid_user_missing_stata, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":58 * @@ -19491,8 +19343,8 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * str table_name=None, * object column_labels=None, compress=False, row_compress=False, object note=None, */ - __pyx_t_6 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 996, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); /* "pyreadstat/_readstat_writer.pyx":995 * return 0 @@ -19501,40 +19353,43 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); * int version=0, * str table_name=None, */ - __pyx_t_3 = PyTuple_Pack(15, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_kp_u__3), __pyx_t_6, Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_writer_1writer_entry_point, 0, __pyx_mstate_global->__pyx_n_u_writer_entry_point, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_writer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 995, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_writer_entry_point, __pyx_t_6) < 0) __PYX_ERR(0, 995, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = PyTuple_Pack(15, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_kp_u__3), __pyx_t_8, Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_writer_1writer_entry_point, 0, __pyx_mstate_global->__pyx_n_u_writer_entry_point, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_writer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); + #endif + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_writer_entry_point, __pyx_t_8) < (0)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "pyreadstat/_readstat_writer.pyx":1 * # cython: c_string_type=unicode, c_string_encoding=utf8, language_level=2 # <<<<<<<<<<<<<< * # ###cython: profile=True * # ############################################################################# */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); - __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_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init pyreadstat._readstat_writer", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -19562,253 +19417,23 @@ __Pyx_RefNannySetupContext("PyInit__readstat_writer", 0); #endif } /* #### Code section: pystring_table ### */ - -typedef struct { - const char *s; -#if 179 <= 65535 - const unsigned short n; -#elif 179 / 2 < INT_MAX - const unsigned int n; -#elif 179 / 2 < LONG_MAX - const unsigned long n; -#else - const Py_ssize_t n; -#endif -#if 1 <= 31 - const unsigned int encoding : 5; -#elif 1 <= 255 - const unsigned char encoding; -#elif 1 <= 65535 - const unsigned short encoding; -#else - const Py_ssize_t encoding; -#endif - const unsigned int is_unicode : 1; - const unsigned int intern : 1; -} __Pyx_StringTabEntry; -static const char * const __pyx_string_tab_encodings[] = { 0 }; -static const __Pyx_StringTabEntry __pyx_string_tab[] = { - {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ - {__pyx_k_Boolean, sizeof(__pyx_k_Boolean), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Boolean */ - {__pyx_k_Categorical, sizeof(__pyx_k_Categorical), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Categorical */ - {__pyx_k_Column_labels_must_be_strings, sizeof(__pyx_k_Column_labels_must_be_strings), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Column_labels_must_be_strings */ - {__pyx_k_Date, sizeof(__pyx_k_Date), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Date */ - {__pyx_k_Datetime, sizeof(__pyx_k_Datetime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Datetime */ - {__pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Decimal */ - {__pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Enum */ - {__pyx_k_Float32, sizeof(__pyx_k_Float32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Float32 */ - {__pyx_k_Float64, sizeof(__pyx_k_Float64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Float64 */ - {__pyx_k_Int128, sizeof(__pyx_k_Int128), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Int128 */ - {__pyx_k_Int16, sizeof(__pyx_k_Int16), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Int16 */ - {__pyx_k_Int32, sizeof(__pyx_k_Int32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Int32 */ - {__pyx_k_Int64, sizeof(__pyx_k_Int64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Int64 */ - {__pyx_k_Int8, sizeof(__pyx_k_Int8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Int8 */ - {__pyx_k_Non_unique_column_names_detected, sizeof(__pyx_k_Non_unique_column_names_detected), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Non_unique_column_names_detected */ - {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_None */ - {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ - {__pyx_k_Object, sizeof(__pyx_k_Object), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Object */ - {__pyx_k_PyreadstatError, sizeof(__pyx_k_PyreadstatError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PyreadstatError */ - {__pyx_k_ReadstatError, sizeof(__pyx_k_ReadstatError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ReadstatError */ - {__pyx_k_String, sizeof(__pyx_k_String), 0, 1, 1}, /* PyObject cname: __pyx_n_u_String */ - {__pyx_k_Time, sizeof(__pyx_k_Time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Time */ - {__pyx_k_UInt128, sizeof(__pyx_k_UInt128), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UInt128 */ - {__pyx_k_UInt16, sizeof(__pyx_k_UInt16), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UInt16 */ - {__pyx_k_UInt32, sizeof(__pyx_k_UInt32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UInt32 */ - {__pyx_k_UInt64, sizeof(__pyx_k_UInt64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UInt64 */ - {__pyx_k_UInt8, sizeof(__pyx_k_UInt8), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UInt8 */ - {__pyx_k_UnicodeError, sizeof(__pyx_k_UnicodeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_UnicodeError */ - {__pyx_k_Unknown_data_format_to_insert, sizeof(__pyx_k_Unknown_data_format_to_insert), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unknown_data_format_to_insert */ - {__pyx_k_Unknown_pywriter_variable_format, sizeof(__pyx_k_Unknown_pywriter_variable_format), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unknown_pywriter_variable_format */ - {__pyx_k_Version_not_supported, sizeof(__pyx_k_Version_not_supported), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Version_not_supported */ - {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ - {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ - {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ - {__pyx_k__5, sizeof(__pyx_k__5), 0, 1, 1}, /* PyObject cname: __pyx_n_u__5 */ - {__pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__6 */ - {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ - {__pyx_k_alignment_for_variable, sizeof(__pyx_k_alignment_for_variable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_alignment_for_variable */ - {__pyx_k_and_it_must_be_str_not_starting, sizeof(__pyx_k_and_it_must_be_str_not_starting), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_and_it_must_be_str_not_starting */ - {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ - {__pyx_k_cast, sizeof(__pyx_k_cast), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cast */ - {__pyx_k_cat, sizeof(__pyx_k_cat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cat */ - {__pyx_k_center, sizeof(__pyx_k_center), 0, 1, 1}, /* PyObject cname: __pyx_n_u_center */ - {__pyx_k_character_missing_ranges_value_g, sizeof(__pyx_k_character_missing_ranges_value_g), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_character_missing_ranges_value_g */ - {__pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 1, 1}, /* PyObject cname: __pyx_n_u_class_getitem */ - {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ - {__pyx_k_clone, sizeof(__pyx_k_clone), 0, 1, 1}, /* PyObject cname: __pyx_n_u_clone */ - {__pyx_k_column_labels, sizeof(__pyx_k_column_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_column_labels */ - {__pyx_k_column_labels_must_be_either_lis, sizeof(__pyx_k_column_labels_must_be_either_lis), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_column_labels_must_be_either_lis */ - {__pyx_k_columns, sizeof(__pyx_k_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_columns */ - {__pyx_k_combine, sizeof(__pyx_k_combine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_combine */ - {__pyx_k_compress, sizeof(__pyx_k_compress), 0, 1, 1}, /* PyObject cname: __pyx_n_u_compress */ - {__pyx_k_compress_and_row_compress_cannot, sizeof(__pyx_k_compress_and_row_compress_cannot), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_compress_and_row_compress_cannot */ - {__pyx_k_dataframe_must_be_pandas_or_pola, sizeof(__pyx_k_dataframe_must_be_pandas_or_pola), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_dataframe_must_be_pandas_or_pola */ - {__pyx_k_date, sizeof(__pyx_k_date), 0, 1, 1}, /* PyObject cname: __pyx_n_u_date */ - {__pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_datetime */ - {__pyx_k_datetime64, sizeof(__pyx_k_datetime64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_datetime64 */ - {__pyx_k_days, sizeof(__pyx_k_days), 0, 1, 1}, /* PyObject cname: __pyx_n_u_days */ - {__pyx_k_df, sizeof(__pyx_k_df), 0, 1, 1}, /* PyObject cname: __pyx_n_u_df */ - {__pyx_k_dictionaries_in_missing_ranges_m, sizeof(__pyx_k_dictionaries_in_missing_ranges_m), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_dictionaries_in_missing_ranges_m */ - {__pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dirname */ - {__pyx_k_does_not_exist, sizeof(__pyx_k_does_not_exist), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_does_not_exist */ - {__pyx_k_drop_nulls, sizeof(__pyx_k_drop_nulls), 0, 1, 1}, /* PyObject cname: __pyx_n_u_drop_nulls */ - {__pyx_k_dst_path, sizeof(__pyx_k_dst_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dst_path */ - {__pyx_k_dta, sizeof(__pyx_k_dta), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dta */ - {__pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dtype */ - {__pyx_k_eager_only, sizeof(__pyx_k_eager_only), 0, 1, 1}, /* PyObject cname: __pyx_n_u_eager_only */ - {__pyx_k_encode, sizeof(__pyx_k_encode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_encode */ - {__pyx_k_expanduser, sizeof(__pyx_k_expanduser), 0, 1, 1}, /* PyObject cname: __pyx_n_u_expanduser */ - {__pyx_k_file_format_version, sizeof(__pyx_k_file_format_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_format_version */ - {__pyx_k_file_label, sizeof(__pyx_k_file_label), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_label */ - {__pyx_k_file_path_could_not_be_encoded_w, sizeof(__pyx_k_file_path_could_not_be_encoded_w), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_file_path_could_not_be_encoded_w */ - {__pyx_k_filter, sizeof(__pyx_k_filter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_filter */ - {__pyx_k_from_native, sizeof(__pyx_k_from_native), 0, 1, 1}, /* PyObject cname: __pyx_n_u_from_native */ - {__pyx_k_fsdecode, sizeof(__pyx_k_fsdecode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fsdecode */ - {__pyx_k_fsencode, sizeof(__pyx_k_fsencode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fsencode */ - {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ - {__pyx_k_get, sizeof(__pyx_k_get), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get */ - {__pyx_k_get_categories, sizeof(__pyx_k_get_categories), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_categories */ - {__pyx_k_get_native_namespace, sizeof(__pyx_k_get_native_namespace), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_native_namespace */ - {__pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getfilesystemencoding */ - {__pyx_k_hi, sizeof(__pyx_k_hi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_hi */ - {__pyx_k_implementation, sizeof(__pyx_k_implementation), 0, 1, 1}, /* PyObject cname: __pyx_n_u_implementation */ - {__pyx_k_in_variable, sizeof(__pyx_k_in_variable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_in_variable */ - {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ - {__pyx_k_instead, sizeof(__pyx_k_instead), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_instead */ - {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ - {__pyx_k_is_in, sizeof(__pyx_k_is_in), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_in */ - {__pyx_k_is_of_type, sizeof(__pyx_k_is_of_type), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_is_of_type */ - {__pyx_k_is_pandas, sizeof(__pyx_k_is_pandas), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_pandas */ - {__pyx_k_is_polars, sizeof(__pyx_k_is_polars), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_polars */ - {__pyx_k_isalpha, sizeof(__pyx_k_isalpha), 0, 1, 1}, /* PyObject cname: __pyx_n_u_isalpha */ - {__pyx_k_isdir, sizeof(__pyx_k_isdir), 0, 1, 1}, /* PyObject cname: __pyx_n_u_isdir */ - {__pyx_k_isna, sizeof(__pyx_k_isna), 0, 1, 1}, /* PyObject cname: __pyx_n_u_isna */ - {__pyx_k_items, sizeof(__pyx_k_items), 0, 1, 1}, /* PyObject cname: __pyx_n_u_items */ - {__pyx_k_iter_columns, sizeof(__pyx_k_iter_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_iter_columns */ - {__pyx_k_iter_rows, sizeof(__pyx_k_iter_rows), 0, 1, 1}, /* PyObject cname: __pyx_n_u_iter_rows */ - {__pyx_k_keys, sizeof(__pyx_k_keys), 0, 1, 1}, /* PyObject cname: __pyx_n_u_keys */ - {__pyx_k_left, sizeof(__pyx_k_left), 0, 1, 1}, /* PyObject cname: __pyx_n_u_left */ - {__pyx_k_length_of_column_labels_must_be, sizeof(__pyx_k_length_of_column_labels_must_be), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_length_of_column_labels_must_be */ - {__pyx_k_lo, sizeof(__pyx_k_lo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lo */ - {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ - {__pyx_k_measure_for_variable, sizeof(__pyx_k_measure_for_variable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_measure_for_variable */ - {__pyx_k_min, sizeof(__pyx_k_min), 0, 1, 1}, /* PyObject cname: __pyx_n_u_min */ - {__pyx_k_missing_ranges, sizeof(__pyx_k_missing_ranges), 0, 1, 1}, /* PyObject cname: __pyx_n_u_missing_ranges */ - {__pyx_k_missing_ranges_hi_and_lo_values, sizeof(__pyx_k_missing_ranges_hi_and_lo_values), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_hi_and_lo_values */ - {__pyx_k_missing_ranges_hi_and_lo_values_2, sizeof(__pyx_k_missing_ranges_hi_and_lo_values_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_hi_and_lo_values_2 */ - {__pyx_k_missing_ranges_max_1_discrete_nu, sizeof(__pyx_k_missing_ranges_max_1_discrete_nu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_max_1_discrete_nu */ - {__pyx_k_missing_ranges_max_1_range_value, sizeof(__pyx_k_missing_ranges_max_1_range_value), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_max_1_range_value */ - {__pyx_k_missing_ranges_max_3_discrete_nu, sizeof(__pyx_k_missing_ranges_max_3_discrete_nu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_max_3_discrete_nu */ - {__pyx_k_missing_ranges_max_3_string_valu, sizeof(__pyx_k_missing_ranges_max_3_string_valu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_max_3_string_valu */ - {__pyx_k_missing_ranges_string_values_len, sizeof(__pyx_k_missing_ranges_string_values_len), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_string_values_len */ - {__pyx_k_missing_ranges_values_in_diction, sizeof(__pyx_k_missing_ranges_values_in_diction), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_values_in_diction */ - {__pyx_k_missing_ranges_values_must_be_bo, sizeof(__pyx_k_missing_ranges_values_must_be_bo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_ranges_values_must_be_bo */ - {__pyx_k_missing_user_values, sizeof(__pyx_k_missing_user_values), 0, 1, 1}, /* PyObject cname: __pyx_n_u_missing_user_values */ - {__pyx_k_missing_user_values_not_allowed, sizeof(__pyx_k_missing_user_values_not_allowed), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_user_values_not_allowed */ - {__pyx_k_missing_user_values_supports_val, sizeof(__pyx_k_missing_user_values_supports_val), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_user_values_supports_val */ - {__pyx_k_missing_user_values_values_in_di, sizeof(__pyx_k_missing_user_values_values_in_di), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_missing_user_values_values_in_di */ - {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ - {__pyx_k_ms, sizeof(__pyx_k_ms), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ms */ - {__pyx_k_must_be_boolean_or_be_1_or_0, sizeof(__pyx_k_must_be_boolean_or_be_1_or_0), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_boolean_or_be_1_or_0 */ - {__pyx_k_must_be_dict_got, sizeof(__pyx_k_must_be_dict_got), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_dict_got */ - {__pyx_k_must_be_either_nominal_ordinal, sizeof(__pyx_k_must_be_either_nominal_ordinal), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_either_nominal_ordinal */ - {__pyx_k_must_be_either_right_center_lef, sizeof(__pyx_k_must_be_either_right_center_lef), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_either_right_center_lef */ - {__pyx_k_must_be_int, sizeof(__pyx_k_must_be_int), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_int */ - {__pyx_k_must_be_numeric, sizeof(__pyx_k_must_be_numeric), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_numeric */ - {__pyx_k_must_be_string, sizeof(__pyx_k_must_be_string), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_be_string */ - {__pyx_k_must_match_the_type_of_the_colu, sizeof(__pyx_k_must_match_the_type_of_the_colu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_must_match_the_type_of_the_colu */ - {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ - {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ - {__pyx_k_narwhals, sizeof(__pyx_k_narwhals), 0, 1, 1}, /* PyObject cname: __pyx_n_u_narwhals */ - {__pyx_k_narwhals_stable_v2, sizeof(__pyx_k_narwhals_stable_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_narwhals_stable_v2 */ - {__pyx_k_nominal, sizeof(__pyx_k_nominal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nominal */ - {__pyx_k_note, sizeof(__pyx_k_note), 0, 1, 1}, /* PyObject cname: __pyx_n_u_note */ - {__pyx_k_note_should_be_either_str_or_lis, sizeof(__pyx_k_note_should_be_either_str_or_lis), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_note_should_be_either_str_or_lis */ - {__pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, /* PyObject cname: __pyx_n_u_np */ - {__pyx_k_ns, sizeof(__pyx_k_ns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ns */ - {__pyx_k_nt, sizeof(__pyx_k_nt), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nt */ - {__pyx_k_nth, sizeof(__pyx_k_nth), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nth */ - {__pyx_k_null_count, sizeof(__pyx_k_null_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_null_count */ - {__pyx_k_numeric_missing_ranges_value_giv, sizeof(__pyx_k_numeric_missing_ranges_value_giv), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_numeric_missing_ranges_value_giv */ - {__pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numpy */ - {__pyx_k_nw, sizeof(__pyx_k_nw), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nw */ - {__pyx_k_ordinal, sizeof(__pyx_k_ordinal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ordinal */ - {__pyx_k_ordinal_2, sizeof(__pyx_k_ordinal_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ordinal_2 */ - {__pyx_k_os, sizeof(__pyx_k_os), 0, 1, 1}, /* PyObject cname: __pyx_n_u_os */ - {__pyx_k_path, sizeof(__pyx_k_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_path */ - {__pyx_k_path_must_be_either_str_or_bytes, sizeof(__pyx_k_path_must_be_either_str_or_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_path_must_be_either_str_or_bytes */ - {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ - {__pyx_k_por, sizeof(__pyx_k_por), 0, 1, 1}, /* PyObject cname: __pyx_n_u_por */ - {__pyx_k_pyreadstat__readstat_writer, sizeof(__pyx_k_pyreadstat__readstat_writer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyreadstat__readstat_writer */ - {__pyx_k_pyreadstat__readstat_writer_pyx, sizeof(__pyx_k_pyreadstat__readstat_writer_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_pyreadstat__readstat_writer_pyx */ - {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ - {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */ - {__pyx_k_readstat_parser, sizeof(__pyx_k_readstat_parser), 0, 1, 1}, /* PyObject cname: __pyx_n_u_readstat_parser */ - {__pyx_k_replace, sizeof(__pyx_k_replace), 0, 1, 1}, /* PyObject cname: __pyx_n_u_replace */ - {__pyx_k_right, sizeof(__pyx_k_right), 0, 1, 1}, /* PyObject cname: __pyx_n_u_right */ - {__pyx_k_round, sizeof(__pyx_k_round), 0, 1, 1}, /* PyObject cname: __pyx_n_u_round */ - {__pyx_k_row_compress, sizeof(__pyx_k_row_compress), 0, 1, 1}, /* PyObject cname: __pyx_n_u_row_compress */ - {__pyx_k_row_compression, sizeof(__pyx_k_row_compression), 0, 1, 1}, /* PyObject cname: __pyx_n_u_row_compression */ - {__pyx_k_sav, sizeof(__pyx_k_sav), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sav */ - {__pyx_k_scale, sizeof(__pyx_k_scale), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scale */ - {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ - {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ - {__pyx_k_stable, sizeof(__pyx_k_stable), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stable */ - {__pyx_k_starts_with_an_illegal_non_alph, sizeof(__pyx_k_starts_with_an_illegal_non_alph), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_starts_with_an_illegal_non_alph */ - {__pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 1, 1}, /* PyObject cname: __pyx_n_u_surrogateescape */ - {__pyx_k_sys, sizeof(__pyx_k_sys), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sys */ - {__pyx_k_table_name, sizeof(__pyx_k_table_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_table_name */ - {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ - {__pyx_k_the_destination_folder, sizeof(__pyx_k_the_destination_folder), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_the_destination_folder */ - {__pyx_k_then, sizeof(__pyx_k_then), 0, 1, 1}, /* PyObject cname: __pyx_n_u_then */ - {__pyx_k_time, sizeof(__pyx_k_time), 0, 1, 1}, /* PyObject cname: __pyx_n_u_time */ - {__pyx_k_time_unit, sizeof(__pyx_k_time_unit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_time_unit */ - {__pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_timestamp */ - {__pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 1, 1}, /* PyObject cname: __pyx_n_u_timezone */ - {__pyx_k_total_seconds, sizeof(__pyx_k_total_seconds), 0, 1, 1}, /* PyObject cname: __pyx_n_u_total_seconds */ - {__pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_tzinfo */ - {__pyx_k_unknown, sizeof(__pyx_k_unknown), 0, 1, 1}, /* PyObject cname: __pyx_n_u_unknown */ - {__pyx_k_unknown_file_format, sizeof(__pyx_k_unknown_file_format), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_unknown_file_format */ - {__pyx_k_upper, sizeof(__pyx_k_upper), 0, 1, 1}, /* PyObject cname: __pyx_n_u_upper */ - {__pyx_k_us, sizeof(__pyx_k_us), 0, 1, 1}, /* PyObject cname: __pyx_n_u_us */ - {__pyx_k_utc, sizeof(__pyx_k_utc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_utc */ - {__pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_utf_8 */ - {__pyx_k_v2, sizeof(__pyx_k_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_v2 */ - {__pyx_k_variable_alignment, sizeof(__pyx_k_variable_alignment), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_alignment */ - {__pyx_k_variable_display_width, sizeof(__pyx_k_variable_display_width), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_display_width */ - {__pyx_k_variable_format, sizeof(__pyx_k_variable_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_format */ - {__pyx_k_variable_measure, sizeof(__pyx_k_variable_measure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_measure */ - {__pyx_k_variable_name, sizeof(__pyx_k_variable_name), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_name */ - {__pyx_k_variable_name_s_contains_a_space, sizeof(__pyx_k_variable_name_s_contains_a_space), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_name_s_contains_a_space */ - {__pyx_k_variable_names_must_be_non_empty, sizeof(__pyx_k_variable_names_must_be_non_empty), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_names_must_be_non_empty */ - {__pyx_k_variable_value_labels, sizeof(__pyx_k_variable_value_labels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_variable_value_labels */ - {__pyx_k_variable_value_labels_type_of_La, sizeof(__pyx_k_variable_value_labels_type_of_La), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_value_labels_type_of_La */ - {__pyx_k_variable_value_labels_type_of_Va, sizeof(__pyx_k_variable_value_labels_type_of_Va), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_value_labels_type_of_Va */ - {__pyx_k_variable_value_labels_value_for, sizeof(__pyx_k_variable_value_labels_value_for), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_variable_value_labels_value_for */ - {__pyx_k_version, sizeof(__pyx_k_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_version */ - {__pyx_k_warn, sizeof(__pyx_k_warn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_warn */ - {__pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 1, 1}, /* PyObject cname: __pyx_n_u_warnings */ - {__pyx_k_when, sizeof(__pyx_k_when), 0, 1, 1}, /* PyObject cname: __pyx_n_u_when */ - {__pyx_k_with_columns, sizeof(__pyx_k_with_columns), 0, 1, 1}, /* PyObject cname: __pyx_n_u_with_columns */ - {__pyx_k_writer_entry_point, sizeof(__pyx_k_writer_entry_point), 0, 1, 1}, /* PyObject cname: __pyx_n_u_writer_entry_point */ - {__pyx_k_writer_file_format, sizeof(__pyx_k_writer_file_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_writer_file_format */ - {__pyx_k_writer_format, sizeof(__pyx_k_writer_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_writer_format */ - {__pyx_k_wrong_writer_format, sizeof(__pyx_k_wrong_writer_format), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_wrong_writer_format */ - {__pyx_k_x, sizeof(__pyx_k_x), 0, 1, 1}, /* PyObject cname: __pyx_n_u_x */ - {__pyx_k_xport, sizeof(__pyx_k_xport), 0, 1, 1}, /* PyObject cname: __pyx_n_u_xport */ - {__pyx_k_zip, sizeof(__pyx_k_zip), 0, 1, 1}, /* PyObject cname: __pyx_n_u_zip */ - {0, 0, 0, 0, 0} -}; -/* InitStrings.proto */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); - /* #### Code section: cached_builtins ### */ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 54, __pyx_L1_error) - __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 672, __pyx_L1_error) __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 740, __pyx_L1_error) + + /* Cached unbound methods */ + __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; + __pyx_mstate->__pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_keys.method_name = &__pyx_mstate->__pyx_n_u_keys; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; return 0; __pyx_L1_error:; return -1; @@ -19831,17 +19456,6 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - /* "pyreadstat/_readstat_writer.pyx":28 - * - * import numpy as np - * import narwhals.stable.v2 as nw # <<<<<<<<<<<<<< - * - * from readstat_api cimport * -*/ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_narwhals, __pyx_mstate_global->__pyx_n_u_stable, __pyx_mstate_global->__pyx_n_u_v2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 28, __pyx_L1_error) - __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); - __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); - /* "pyreadstat/_readstat_writer.pyx":52 * cdef double spss_offset_days = 141428 * cdef double sas_offset_days = 3653 @@ -19849,9 +19463,28 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { * * cdef valid_user_missing_sas = [chr(x) for x in range(ord("A"), ord("Z")+1)] + ["_"] */ - __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1970, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); - __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1970, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_tuple; + for (Py_ssize_t i=0; i<2; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -19862,46 +19495,144 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get; - __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; - __pyx_mstate->__pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_keys.method_name = &__pyx_mstate->__pyx_n_u_keys; - __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; - __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; - if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_mstate->__pyx_float_1e3 = PyFloat_FromDouble(1e3); if (unlikely(!__pyx_mstate->__pyx_float_1e3)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_float_1e6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_mstate->__pyx_float_1e6)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_float_1e9 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_mstate->__pyx_float_1e9)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_65 = PyLong_FromLong(65); if (unlikely(!__pyx_mstate->__pyx_int_65)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_97 = PyLong_FromLong(97); if (unlikely(!__pyx_mstate->__pyx_int_97)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_1970 = PyLong_FromLong(1970); if (unlikely(!__pyx_mstate->__pyx_int_1970)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_mstate->__pyx_int_neg_9223372036854775808 = PyLong_FromString("-9223372036854775808", 0, 0); if (unlikely(!__pyx_mstate->__pyx_int_neg_9223372036854775808)) __PYX_ERR(0, 1, __pyx_L1_error) + { + const struct { const unsigned int length: 11; } index[] = {{1},{29},{50},{4},{179},{29},{32},{21},{1},{0},{1},{1},{8},{23},{48},{66},{42},{45},{44},{59},{16},{149},{13},{8},{13},{61},{21},{70},{78},{96},{54},{66},{56},{62},{49},{68},{57},{93},{54},{29},{19},{55},{51},{12},{16},{15},{85},{39},{62},{11},{32},{27},{31},{19},{29},{16},{13},{14},{19},{54},{23},{19},{5},{15},{57},{67},{37},{37},{37},{19},{7},{11},{4},{8},{7},{4},{7},{7},{6},{5},{5},{5},{4},{6},{15},{20},{13},{6},{4},{7},{6},{6},{6},{5},{1},{18},{4},{3},{6},{17},{18},{5},{13},{7},{7},{8},{4},{8},{10},{4},{2},{7},{10},{8},{3},{5},{10},{6},{10},{19},{10},{6},{11},{8},{8},{8},{3},{14},{20},{21},{2},{14},{13},{5},{9},{9},{7},{5},{4},{5},{12},{9},{4},{4},{2},{8},{3},{14},{19},{10},{2},{4},{8},{18},{7},{4},{2},{2},{2},{3},{10},{5},{2},{7},{2},{4},{3},{3},{27},{12},{12},{16},{7},{5},{5},{12},{15},{3},{5},{12},{10},{6},{15},{3},{10},{8},{4},{4},{9},{9},{8},{13},{6},{7},{5},{2},{3},{2},{6},{18},{22},{15},{16},{21},{7},{4},{8},{4},{12},{18},{18},{13},{1},{5},{3},{1370},{310},{306},{41}}; + #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2357 bytes) */ +const char* const cstring = "BZh91AY&SYk=(\314\000\001\\\377\377\346o\376\307v\367\375v\277-\377\320\277\377\377\361@@@@@\000@@\000@@@@\000@\000`\n\017\225\224\366sXt\005\022P(\240\350\006 \252\256BQ&!O\3254\236iOQ\352<\231OH\000\r7\252d\006\236\240\007\250\364\207\250=O\3256\247\250`\322~T\022H\000Bjz#I\224\003@\000\000\032\000\000\000\001\240\036\240\007\000\003A\241\240\320\001\246A\241\2204\320\000\001\220\001\220\031\000\006\236\245\010\200d\000h\r4\321\2402\000\000\310\000\000\000\000\000p\0004\032\032\r\000\032d\032\031\003M\000\000\031\000\031\001\220\000H\210M\002\023L\247\224\364\231M\244\323$\321\204hi\243j\032\000\000\000hhh\036\246\227\224\274\361\234q#\024\305\216\210\212\006\214B\214MC\356\240\252\013\023\025\253\300\207\r4\350|\244\004\264\035mn\007,\n\372a\034*B.v\00733\302\212\256k\274\344b\226\017\211\340\016P\217}\3107\373~/\007\2654\024\270`\003\217\222\327\205q\317\317=\016d\340&\221+\237#\204\276K\000X\362\345n\276\352m\310\331\n\312!\005Dm\022\215i]6\317\226\326l\276\377\213u\313d\362\210yE\014=\037c\256\246#P\377\251\245\016\377\253I@h\267.N\r\"1\035:\304b=S\216\\\320\225R\236\234\215\n\341\321\032Sq\001\242\261\200\234{2\214\327\254\330.\335C\343&\233\327,\342Y\277{\247H\312\261\263\010\271Ks\031VV\267RO:\323\007M\013\024\3067\276\346X\302\370\232K\251II\343\370X\337\n\032\271\313\177s\226\313y\356a\237\301\351^\362\245\231\245\340\210Y\335(\377\273\251\"\243\2000i\264\332'2\362\355\r\246\364\245&\003\010\"\026\374\375m\250\312\346\257\005\347\212\030\240\357B\216\331\371\261\336\005:\215\361c\034\262\335W\324\005\212\032\333\205\202:\341c\004m\006\031\n\265\254\002\360\r\037\333b\014z\tP`\330\236\372\264\177\247\205\373,\220\022Cquq\233.\230\342O'\310\215\005\353\320\362\367\340;\2178^F \261\325a\220\210\210\rp2\320h8+$\266z\031dq\314\005\227\215M\307\232\240\262\361\263Tk8`\263\241\277\0358%\010\370t\361\226\276&\036\2469\025\243\332\315)\003c\243\253\027G4\033\033 \263\304\031\247\3370\266\016\243\030A\264G\372i#|\321T\327\277U\246f\237\330\220V\346\211\357\353\266T\246\345\256ri\2037$\241=Z\355\252\326$\272\022\323\201<\016\002H\245\327|\373\233B\3337\202\305\252\232\214fS\245\356\216o\310'V\341\243\234\355f\240\300%\255A\226\210\301(3fu\365\366\221H\014n5\303\026v\260\214\343\305xNK4\245\216\307>1K\343\324\207\033\267\343\224f\2503&\241'\231\325*\260>\362\333\\\372\272UuF\254\217\343\004\314\352[\256\341a\353\337}\370\010\253bc\022mW\2740\310)D\222\215 \245a\n\370\256\274.Wb2\031B\021)`\0071\211\263\211\332\020J\035Z\010L\226\224\2508\311\223\201\364Xl\001N\350J\035\r\347\216ao\014\2443h\271\203<\211*>\2333_\361\2407\355X\"_\036\033y\266\353\247a\007}7z\215\0248\322|\010\010\345#\317\303\246\273\024\241\213\335c\347\303]\032\032\333\236\252\341\247JX\251\246\310\330\200\336{\214""\310\212\232a\001v\220\331\320Y\245\231e\304\261%\300H%\271r\230%QB\344\231\031!\267\023\031\034\035\2614\376#\356a!\260\274AI\202Rl`P\364_\\\361\316\205\356\3642\031\245CJ\005X\241\222\267{e\212f&]1\2468\210\271y@\266$R\373`\253\246\230nH\321\2000\233%S\021Y\264\320\300ombF]\325\314\351\245\004\3452TSf\340\036V-\013\305\256\221KY\027\234SF\342D\225Kp\224\342\304\024\360Q\225pM+R\215\224\211\232\222\342\370\321\0276\316Km\010\301\373\014\203\010/\331\232Z$M\241\331\262\354\201\2446\010\224\223EV%\244~\206\233\2672\230\027\367\331\342k\255\250dg\256\357(\247\034\367\303:L\222\321F#\312\"\222\271>=P[\311\247\300\303h\207~\\\363\016O.v7\264\307\244@\231\330\007WMDe\347\016\013\313\251\177\240\320Y\234\306\207\257\006\370\002vP\301Y2\030\366/\0311/>)\262+d\241\000\010\006B\205\005\314\026\227\206\213\222\301!jb\332\332t\3007\211\265\2037\263pxy\361\317\253X\251(\320W\024{\\y\367\034:\374\354\205\333\024\315\"\325\0162\036\256\243\213\341\335\263,_VKO\036\254\2721CC\335\\\375]jW\362\001\256\251\035;z\370f\0358u%-\2661\251\"\023]D\020\332i6\230\322M\314@\242\201\31033B\255\226\023\264A\333\007\341b4\335\213\342\217\t\216f\250\023KM\223$\336!Q\006=\311\004\211(\262\313m{%a\201\217\032\354\246m\351\352\221\243cM\212\2206\375\2164\240\263 \032C\361<\315wO\026\276\026\035\315\214\243\305\304A\030\336J2l\346\362w\355v\304i4\324y\343\014b\271R\215\221I\231)3=f\375\021\243\373\312\231Z4+\313\253\343\206\333)nC\215KX\315@\311\317@Df\263v\363\204y\263\206\225\322\220\2343\216\250{\351g\230\347L\303\234M\000\354\332\332!\020fO\342\227h[\232\031\250\210\014\321k\334\242\235\250\244\310(\30127nM\374\327\266\313\\\177Mm\256\360\301\032\366!\007]jn\306\222\300m\264\017\010N\221/\224*\331\341\\\025\332\253\032<\225\255+T\020\r\215\203T\362uM@`R\327\250\335$NA\221\235% \220\353\200\307:\t\007\302\3213\005\016\030\342\312\224%\205I\2469U\025,\335\235\001\335\304@\007\016+[\244ffq\300\311\326\00729\211\340\233_Q\242\364K<\255\272\231\"\315\266\331\202m\276\234s\335\241\251\205\252\2538""\340\351T\270\260()\304\036\311l\307\t\317\024\213\344i;Yf\331\263\004fn\205\t\274\361\353\364\311\021\232E\030\227\232\205.]\222QHe-e{\262q\033\216\031m\020\267@\221X\322S:\306\260\026 \322lk\315\t\034\375\2352\313\213\2718\034\267\370\016\324\325\255\274)\351\277\232\373\327$\307\013`\254\3132#\0213\355\016\227\201,\307\017!;\003\306`3]\321\030fs\211\217pH(\374W\2454\246j\340\020#\006\005\356\354\216\305\354\325\036\242\022rP\224\222\257\235\001\366\247w6\256r\376\212\267\320\311\221:\373j\223\234\324\336\301\302\234\nq%\233\237\023G\020\242q\373|\330i\252\276|\330j\315\342\311\213p\324(\177\310\345N\306\255*fp\357Z\2722 \243\255\221^j\366\371K\305\257o\376.\344\212p\241 \326zQ\230"; + PyObject *data = __Pyx_DecompressString(cstring, 2357, 2); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2150 bytes) */ +const char* const cstring = "x\332\305WKo\033\307\035g\200\024P\021\247M\372@zp\213QQAR \313\246,\010\252\321\242\260-\033\010Z\270rl\313E/\203\341\356\220\234jwf\2753Kju(z\324QG\035\365\021z\314G\350\221G\035\375\021\372\021\372\373\317\354\213\014%\307F\203\010\324\356<\376\357\367n>6I\221j\226\210\201L,K\013\353\330@2\353r\245G\366\231\321\254\320\352M!Y\024\340\264H\245e\261t2r2fJ37\226,\026N\014s\\\255\002C>3N\342X8\366\270tc\220P\204\221\250\201\314\205\223I\351\251\003=' \315\016\237\034\336\331\335\337eB\307,\227\377\000a\313l1\210\022a-x\231!\033\024*q\304\252\314\244\335f_\rYi\n\246%\004p\206e\200\353\"@ \315\254t^\262u\241\265q\302)\2439\320\241\324:\213U\016&j\"\t\373\251H\254\334~\245\217\265\231j\257\010\033\232<\205\360\270T\332\312\334\325\227Y9\315\025\211=\021\271\022\203DV\220G2\267\240\317\300\010rd\231\311\3114\333\177\022q\314q&E\242F:\225\332\021|\213\354\025V\256ks\266\341i8\221C\335\021\233*7f\272Ha8\273\272\031\215E.\274\331Re-\356y.\364\010\nOD\002\007\215\240\220\366\0344di\201\033~k6\370\220/\370Z\202\013\340\022\205-\260c\270f52i\226K\330\325;\305Lys\020y\203\022\336\300@\272\227y!\033\3577$3\240\tK\3242\223\210\334\266\001B\324a+\310\004\301\341\322\005U<\201\261 \327\300y\307\262\264l\254\274\020\211a\261\001\0041\227'\220uu\250\022\342\004!\"S$1\253\304\222:21\354\357\215\267f\331t\254\2421\205 \205\004\204B\350\344\314\226\326\3114\300\202\375\026syI\026\207\317\003>9\006\300\205\033\336\331\337f\207\211\024Vz\n\313\320!@N!\225\224\333\244S\353a\304\017\334\037\257\023{\3041\305/K\244\036A2l\243\245\251G\212[2&\330\007\337\267\2606\205\034E.\347\003i\336\206\017:\026\363\221\321\222\366\036k\350\023\215\220\347^\260\367\243R\005\r$\203\214\022\351\314n\246\226\212\023\326Gl\331(G\355h\220B\350*\322/\035(]\273\255\317<^u\235u\243X$\211\231\312x9\375\017\301\272\177\215T\366=(T\212\277\007\336\225\215\177(\221\257A\370 \027\026\250\201\274\"@\302U\032\371\370YZf\226!Vu\321\326\222\010J\265SO\343\205\243\242K""\261\366\220\016\377\356\227<\\=|\261\305F\340\271f\353\\ZB\374;\330\243\243\271A.kR\025\273>\275\3575\227\204\034\370-\026GmR\245E\262\005\3708,l$\240,\320\213\252;,C\313\325h\014\212\021j\277\314\267\340\346\241\273\026E\351V\312\332!\363\3558l\321p\242\220\305\276\234PY\0317\355Y\351\266\324z;\016dSxp!\267\374\323\251\324\213NojP\314\216}\005m\005\247^dBO\010\006i$zw\353i\263\250\211\210u\266Q\031.\024\354\0053U\334\006\245\2236+sx\031-\320m\363z\3053\364\020\231\267Ww\333\253\320\222\267\263\362\244\203Y+\3319BHL\307\350\365\333\330A\250\355\311N\367\262H\263\262\2637]1P\354;\273\251\3105\215F\353\241M\333P\260\020Q*I\344\010\n\242\205\353;\"\311\306(\353NE\233m\216<`\353~X\222\026\335\335\217$\260Y\022\3136 |K\013C\205\357<\215\ti\354b\353\013[\262kd\264\023H\r$\224\315D\004\0077\375\256\223\253s\210m\031 Ie\232\271\262\236\367\266\330\265\363GM\"\344\\5C=\367\360\270\277\203\207?\334\377\353\200f\315\303\306\265O\362\334\344\234\037\226'\370?@)\340\317\344\211\373Z\016\277\356\002\274\360\226z\t\216\257\002e\377\332{\345i\277\362\304\351\271\317\205-u\244\3146f\003S\300\234\022\025\303\272\010\331\353\253\001\347~^\345#H\217Y\202\266\200\341\nc*\242E\016Dt\034%\030\246\347f\266j\n\250\232e=\223Q\264\327\021_\277\367vcQ\332x\210Y\227|\036\347&\343\272H\022\013M8\345`\354DL~\221\002m\206\033\235\224a\360\221'4\274Qu\245`\344\301\364|\022F\\\177\344E\301\nJ\014s\223r\n\345\211\034\332X\022\376\320\006:\234\017\013\035q\322\017?\036U^\223\226v\001\205\373h\244\250\305\031\221\016cU=U\215\225J\263\204\366\325\374\256,o\214\211\265\322x\204I\223\026~\320T\326g\236\262\320[Y-\310\264\226b\210W\246\363k\014\264\226fK\252\307\211\341\2446\274\2347\n\373\1776\315f\217\200\250\246sg\270\037k{\241\355\205.Q\325\031\357n\333\233\000\007\235\361T\3068\327(O\216\327]\234\320\303\374u\035\324\315\020\0134\274\026\035yj6\211:n:=^\215\332\275Ey<`K\317dR{{ get\214\342N\r\036E\033u\236zC\320//t\260\337\274\r0r\326\010\370\210\346\341\023\270\207\231\307\312@\023\375\335)\264\014O\333\266\326\355-\3745N\n\202ee\305\327\212 JP,\354\275\311\026\017\274\225\272\207\260\342Hi\277\234\277\313\354\002I:\230\247Y\237|\033\261\246J\353\371[\372\000\236\247\353O\346\t7GKpk\322~\323\275\237\365\326fk\177\374\346\371\325\027\277\362\277\235\331\316\243\331\243\243\331\321\353\253\317\372\263\376\237\377\323\277\372\354\363\346\367\337\225\336\217~w\331\277\372\230]~D\353\225\177\375\363\374\305\305GW+\277\276x~\265\362\233\013q\265\362\311\331\357\317\017pt\353g\347w/?\277\\\245\223\376\325\255\3376+\202\372\361\027\347\366b\265B\373\344l\377\374\376\271\0100\237\376\322\023|\327\372\345\305/\200\332\356~~\361\320\357\336\266l\177z\366f\236\317\002\343\267+?93\027\317/\304\333\217?={~\026\237\1779\273}\357\337\267\276yH\267G\227\177\230\335}:{\352\r\261r{v{w""\266\213\355\353\331\353\277\205\222\321\304\224\364\037\005n\263\212py\242\034\247\213\302\376\01719\275\302"; + PyObject *data = __Pyx_DecompressString(cstring, 2150, 1); + if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) + const char* const bytes = __Pyx_PyBytes_AsString(data); + #if !CYTHON_ASSUME_SAFE_MACROS + if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } + #endif + #else /* compression: none (5946 bytes) */ +const char* const bytes = ")Column labels must be stringsNon unique column names detected in the dataframe!NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Unknown data format to insertUnknown pywriter variable formatVersion not supported .?add_notealignment for variable and it must be str (not starting with numbers!)character missing_ranges value given for non character variable %scolumn_labels must be either list or dict!compress and row_compress cannot be both Truedataframe must be pandas or polars dataframedictionaries in missing_ranges must have the keys hi and lo does not exist!file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly. in variable instead' is of type length of column labels must be the same as number of columnsmeasure for variable missing_ranges: hi and lo values must be both the same for string typemissing_ranges: hi and lo values must be both either of numeric or string typemissing_ranges: max 1 discrete numeric value if combined with 1 range value per variable allowedmissing_ranges: max 1 range value per variable allowedmissing_ranges: max 3 discrete numeric values per variable allowedmissing_ranges: max 3 string values per variable allowedmissing_ranges: string values length must not be larger than 8missing_ranges: values in dictionary must be listmissing_ranges: values must be both either of numeric or string typemissing_user_values not allowed for character variable %smissing_user_values supports values a to z for Stata and A to Z and _ for SAS, got %s insteadmissing_user_values: values in dictionary must be list must be boolean or be 1 or 0 must be dict, got must be either nominal, ordinal, scale or unknown got must be either right, center, left or unknown got must be int must be numeric must be string must match the type of the column i""n dataframe and be of type date, datetime or timenote should be either str or list, got numeric missing_ranges value given for non numeric variable %s' (ordinal path must be either str or bytespyreadstat._readstat_parserpyreadstat/_readstat_writer.pyxpyreadstat.datetimepyreadstat.narwhals.stable.v2pyreadstat.numpypyreadstat.ospyreadstat.syspyreadstat.warnings' starts with an illegal (non-alphabetic) character: 'the destination folder unknown file formatutf-8variable name 'variable name '%s' contains a space, which is not allowedvariable names must be non-empty strings, not starting with numbersvariable_value_labels: type of Label variable_value_labels: type of Value variable_value_labels: value for key wrong writer formatBooleanCategoricalDateDatetimeDecimalEnumFloat32Float64Int128Int16Int32Int64Int8ObjectPyreadstatError__Pyx_PyDict_NextRefReadstatErrorStringTimeUInt128UInt16UInt32UInt64UInt8_asyncio.coroutinescastcatcenter__class_getitem__cline_in_tracebackclonecolumn_labelscolumnscombinecompressdatedatetimedatetime64daysdfdirnamedrop_nullsdst_pathdtadtypeeager_onlyencodeexpanduserfile_format_versionfile_labelfilterfrom_nativefsdecodefsencode__func__getget_categoriesget_native_namespacegetfilesystemencodinghiimplementation_is_coroutineis_inis_pandasis_polarsisalphaisdirisnaitemsiter_columnsiter_rowskeysleftlo__main__minmissing_rangesmissing_user_values__module__msname__name__narwhals.stable.v2nominalnotenpnsntnthnull_countnumpynwordinalospathpopporpyreadstat._readstat_writer__pyx_capi____qualname___readstat_parserreplacerightroundrow_compressrow_compressionsavscale__set_name__setdefaultstablesurrogateescapesystable_name__test__thentimetime_unittimestamptimezonetotal_secondstzinfounknownupperusutcv2valuesvariable_alignmentvariable_display_widthvariable_formatvariable_measurevariable_value_labelsversionwarnwarningswhenwith_columnswriter_entry_pointwriter_file_formatwriter_formatxxportzipPyObject *(PyObject *)\000PyObject *(PyObject *, PyObject *, PyObject *, int)""\000PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *, int)\000PyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, int)\000\000Py_ssize_t (void const *, size_t, void *)\000char *(__pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type)\000double (__pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, PyObject *)\000int (PyObject *)\000int (PyObject *, PyObject *)\000int (PyObject *, PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int)\000int (PyObject *, PyObject *, int)\000int (int)\000void (int, int, PyObject *, PyObject *, __pyx_t_10pyreadstat_16_readstat_writer_dst_file_format, PyObject *, PyObject *)\000filepath_to_bytes\000get_narwhals_column_types\000vectorized_convert_datetime_to_number\000vectorized_convert_date_to_number\000vectorized_convert_time_to_number\000write_bytes\000get_datetimelike_format_for_readstat\000convert_datetimelike_to_number\000open_file\000check_series_all_same_types\000run_write\000get_narwhals_str_series_max_length\000close_file\000initial_checksPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000readstat_to_numpy_types\000sas_all_formats\000sas_date_formats\000sas_datetime_formats\000sas_origin\000sas_time_formats\000spss_all_formats\000spss_date_formats\000spss_datetime_formats\000spss_origin\000spss_time_formats\000stata_all_formats\000stata_date_formats\000stata_datetime_formats\000stata_origin\000stata_time_formats\320\000%\320%=\270Q\330\027\030\330\027\030\330\0272\3202B\320BV\320VW\330\0201\3201K\3101\330\020\021\330\020\021\330\020\021\330\020\021\360\010\000\005$\2401\330\004 \240\001\360\010\000\005\010\200~\220S\230\001\330""\010\035\230Q\330\010\036\230a\330\010\013\2109\220D\230\001\330\014\022\220/\240\021\240!\330\010\013\2101\330\014\"\240!\330\010\013\2101\330\014\036\230a\330\t\027\220s\230!\330\010\035\230Q\330\010\013\2108\2203\220a\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220S\230\001\330\014\"\240!\330\r\025\220T\230\024\230Q\330\014\"\240!\330\r\025\220T\230\023\230A\330\014\"\240!\340\014\022\220/\240\021\240!\330\010\017\210q\330\t\027\220s\230!\330\010\035\230Q\330\010\036\230a\330\t\027\220s\230!\330\010\035\230Q\340\010\016\210o\230Q\230a\340\004\r\210Q\210d\220*\320\0340\260\014\270A\330\010\035\230V\240<\320/F\320FV\320VW\330\010\034\320\0344\3204F\320FW\320WXvoid (readstat_error_t)\000check_exit_status"; + PyObject *data = NULL; + CYTHON_UNUSED_VAR(__Pyx_DecompressString); + #endif + PyObject **stringtab = __pyx_mstate->__pyx_string_tab; + Py_ssize_t pos = 0; + for (int i = 0; i < 215; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); + if (likely(string) && i >= 70) PyUnicode_InternInPlace(&string); + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + stringtab[i] = string; + pos += bytes_length; + } + for (int i = 215; i < 219; i++) { + Py_ssize_t bytes_length = index[i].length; + PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); + stringtab[i] = string; + pos += bytes_length; + if (unlikely(!string)) { + Py_XDECREF(data); + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + Py_XDECREF(data); + for (Py_ssize_t i = 0; i < 219; i++) { + if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { + __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = stringtab + 215; + for (Py_ssize_t i=0; i<4; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {1e3,1e6,1e9}; + for (int i = 0; i < 3; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 3; + int8_t const cint_constants_1[] = {0,1,65,97}; + int16_t const cint_constants_2[] = {1970}; + for (int i = 0; i < 5; i++) { + numbertab[i] = PyLong_FromLong((i < 4 ? cint_constants_1[i - 0] : cint_constants_2[i - 4])); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 8; + const char* c_constant = "-8000000000000"; + for (int i = 0; i < 1; i++) { + char *end_pos; + numbertab[i] = PyLong_FromString(c_constant, &end_pos, 32); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + c_constant = end_pos + 1; + } + } + #if CYTHON_IMMORTAL_CONSTANTS + { + PyObject **table = __pyx_mstate->__pyx_number_tab; + for (Py_ssize_t i=0; i<9; ++i) { + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX < 0x030E0000 + if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) + #else + if (PyUnstable_Object_IsUniquelyReferenced(table[i])) + #endif + { + Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + } + #else + Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); + #endif + } + } + #endif return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_codeobjects ### */ -\ - typedef struct { - unsigned int argcount : 5; - unsigned int num_posonly_args : 1; - unsigned int num_kwonly_args : 1; - unsigned int nlocals : 5; - unsigned int flags : 10; - unsigned int first_line : 10; - unsigned int line_table_length : 13; - } __Pyx_PyCode_New_function_description; +typedef struct { + unsigned int argcount : 5; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 5; + unsigned int flags : 10; + unsigned int first_line : 10; +} __Pyx_PyCode_New_function_description; /* NewCodeObj.proto */ static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, - const char *line_table, + PyObject *line_table, PyObject *tuple_dedup_map ); @@ -19910,9 +19641,9 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {17, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 995, 306}; + const __Pyx_PyCode_New_function_description descr = {17, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 995}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_df, __pyx_mstate->__pyx_n_u_dst_path, __pyx_mstate->__pyx_n_u_writer_format, __pyx_mstate->__pyx_n_u_file_label, __pyx_mstate->__pyx_n_u_version, __pyx_mstate->__pyx_n_u_table_name, __pyx_mstate->__pyx_n_u_column_labels, __pyx_mstate->__pyx_n_u_compress, __pyx_mstate->__pyx_n_u_row_compress, __pyx_mstate->__pyx_n_u_note, __pyx_mstate->__pyx_n_u_variable_value_labels, __pyx_mstate->__pyx_n_u_missing_ranges, __pyx_mstate->__pyx_n_u_variable_display_width, __pyx_mstate->__pyx_n_u_variable_measure, __pyx_mstate->__pyx_n_u_missing_user_values, __pyx_mstate->__pyx_n_u_variable_format, __pyx_mstate->__pyx_n_u_variable_alignment, __pyx_mstate->__pyx_n_u_file_format_version, __pyx_mstate->__pyx_n_u_row_compression, __pyx_mstate->__pyx_n_u_writer_file_format}; - __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyreadstat__readstat_writer_pyx, __pyx_mstate->__pyx_n_u_writer_entry_point, __pyx_k_Q_22BBVVW_11K1_1_S_Q_a_9D_1_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyreadstat__readstat_writer_pyx, __pyx_mstate->__pyx_n_u_writer_entry_point, __pyx_mstate->__pyx_kp_b_iso88591_Q_22BBVVW_11K1_1_S_Q_a_9D_1_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; @@ -19925,22 +19656,32 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitGlobals(void) { /* PythonCompatibility.init */ if (likely(__Pyx_init_co_variables() == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + /* CommonTypesMetaclass.init */ + if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CachedMethodType.init */ #if CYTHON_COMPILING_IN_LIMITED_API -{ - PyObject *typesModule=NULL; - typesModule = PyImport_ImportModule("types"); - if (typesModule) { - __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); - Py_DECREF(typesModule); - } -} // error handling follows -#endif + { + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } + } // error handling follows + #endif + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) -if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + /* CythonFunctionShared.init */ + if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else + + if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -19981,7 +19722,7 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #endif -/* PyErrExceptionMatches */ +/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; @@ -20022,7 +19763,7 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta } #endif -/* PyErrFetchRestore */ +/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 @@ -20081,7 +19822,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject } #endif -/* PyObjectGetAttrStr */ +/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); @@ -20091,7 +19832,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject } #endif -/* PyObjectGetAttrStrNoError */ +/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare @@ -20139,69 +19880,77 @@ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { + return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); + } else if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else + (void)wraparound; + (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else + (void)wraparound; + (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + int wraparound, int boundscheck, int unsafe_shared) { + CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { - return __Pyx_PyList_GetItemRef(o, n); + if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { + return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); + } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_NewRef(PyList_GET_ITEM(o, n)); } - } - else if (PyTuple_CheckExact(o)) { + } else + #if !CYTHON_AVOID_BORROWED_REFS + if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; + return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); } - } else { + } else + #endif +#endif +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; - if (mm && mm->mp_subscript) { + if (!is_list && mm && mm->mp_subscript) { PyObject *r, *key = PyLong_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } - if (likely(sm && sm->sq_item)) { + if (is_list || likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { @@ -20220,10 +19969,12 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, return PySequence_GetItem(o, i); } #endif + (void)wraparound; + (void)boundscheck; return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); } -/* PyDictVersioning */ +/* PyDictVersioning (used by GetModuleGlobalName) */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; @@ -20285,111 +20036,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) return __Pyx_GetBuiltinName(name); } -/* PyFunctionFastCall */ -#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL -static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, - PyObject *globals) { - PyFrameObject *f; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject **fastlocals; - Py_ssize_t i; - PyObject *result; - assert(globals != NULL); - /* XXX Perhaps we should create a specialized - PyFrame_New() that doesn't take locals, but does - take builtins without sanity checking them. - */ - assert(tstate != NULL); - f = PyFrame_New(tstate, co, globals, NULL); - if (f == NULL) { - return NULL; - } - fastlocals = __Pyx_PyFrame_GetLocalsplus(f); - for (i = 0; i < na; i++) { - Py_INCREF(*args); - fastlocals[i] = *args++; - } - result = PyEval_EvalFrameEx(f,0); - ++tstate->recursion_depth; - Py_DECREF(f); - --tstate->recursion_depth; - return result; -} -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { - PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); - PyObject *argdefs = PyFunction_GET_DEFAULTS(func); - PyObject *closure; - PyObject *kwdefs; - PyObject *kwtuple, **k; - PyObject **d; - Py_ssize_t nd; - Py_ssize_t nk; - PyObject *result; - assert(kwargs == NULL || PyDict_Check(kwargs)); - nk = kwargs ? PyDict_Size(kwargs) : 0; - if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { - return NULL; - } - if ( - co->co_kwonlyargcount == 0 && - likely(kwargs == NULL || nk == 0) && - co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { - if (argdefs == NULL && co->co_argcount == nargs) { - result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); - goto done; - } - else if (nargs == 0 && argdefs != NULL - && co->co_argcount == Py_SIZE(argdefs)) { - /* function called with no arguments, but all parameters have - a default value: use default values as arguments .*/ - args = &PyTuple_GET_ITEM(argdefs, 0); - result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); - goto done; - } - } - if (kwargs != NULL) { - Py_ssize_t pos, i; - kwtuple = PyTuple_New(2 * nk); - if (kwtuple == NULL) { - result = NULL; - goto done; - } - k = &PyTuple_GET_ITEM(kwtuple, 0); - pos = i = 0; - while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { - Py_INCREF(k[i]); - Py_INCREF(k[i+1]); - i += 2; - } - nk = i / 2; - } - else { - kwtuple = NULL; - k = NULL; - } - closure = PyFunction_GET_CLOSURE(func); - kwdefs = PyFunction_GET_KW_DEFAULTS(func); - if (argdefs != NULL) { - d = &PyTuple_GET_ITEM(argdefs, 0); - nd = Py_SIZE(argdefs); - } - else { - d = NULL; - nd = 0; - } - result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); - Py_XDECREF(kwtuple); -done: - Py_LeaveRecursiveCall(); - return result; -} -#endif - -/* PyObjectCall */ +/* PyObjectCall (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; @@ -20409,7 +20056,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif -/* PyObjectCallMethO */ +/* PyObjectCallMethO (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; @@ -20484,38 +20131,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj return __Pyx_PyObject_CallMethO(func, args[0]); } #endif - #if PY_VERSION_HEX < 0x030800B1 - #if CYTHON_FAST_PYCCALL - if (PyCFunction_Check(func)) { - if (kwargs) { - return _PyCFunction_FastCallDict(func, args, nargs, kwargs); - } else { - return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); - } - } - if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { - return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); - } - #endif - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); - } - #endif - #endif if (kwargs == NULL) { - #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API - vectorcallfunc f = __Pyx_PyVectorcall_Function(func); - if (f) { - return f(func, args, _nargs, NULL); - } - #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL - if (__Pyx_CyFunction_CheckExact(func)) { - __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); - if (f) return f(func, args, _nargs, NULL); - } - #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL - return PyObject_Vectorcall(func, args, _nargs, NULL); + #if CYTHON_VECTORCALL + #if CYTHON_COMPILING_IN_LIMITED_API + return PyObject_Vectorcall(func, args, _nargs, NULL); + #else + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #endif #endif } if (nargs == 0) { @@ -20631,7 +20256,7 @@ static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double f } #endif -/* PyObjectVectorCallKwBuilder */ +/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */ #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; @@ -20795,13 +20420,13 @@ __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) return 0; } -/* PyObjectCallOneArg */ +/* PyObjectCallOneArg (used by CallUnboundCMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } -/* UnpackUnboundCMethod */ +/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { PyObject *result; @@ -20932,7 +20557,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_keys, d); } -/* PyObjectCall2Args */ +/* PyObjectCall2Args (used by CallUnboundCMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); @@ -21075,13 +20700,13 @@ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObjec return value; } -/* PyObjectCallNoArg */ +/* PyObjectCallNoArg (used by pyfrozenset_new) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } -/* pyfrozenset_new */ +/* pyfrozenset_new (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { PyObject* result; @@ -21146,7 +20771,7 @@ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, in return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* BytesEquals */ +/* BytesEquals (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) @@ -21396,7 +21021,7 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, #endif } -/* UnicodeAsUCS4 */ +/* UnicodeAsUCS4 (used by object_ord) */ static void __Pyx_PyUnicode_AsPy_UCS4_error(Py_ssize_t length) { if (likely(length >= 0)) { PyErr_Format(PyExc_ValueError, @@ -21573,7 +21198,7 @@ static void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } -/* CIntToDigits */ +/* CIntToDigits (used by CIntToPyUnicode) */ static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" @@ -21601,7 +21226,7 @@ static const char DIGITS_HEX[2*16+1] = { "0123456789ABCDEF" }; -/* BuildPyUnicode */ +/* BuildPyUnicode (used by COrdinalToPyUnicode) */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; @@ -21664,15 +21289,16 @@ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* return uval; } -/* COrdinalToPyUnicode */ +/* COrdinalToPyUnicode (used by CIntToPyUnicode) */ static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { return value <= 1114111; } static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { - if (likely(ulength <= 250)) { + Py_ssize_t padding_length = ulength - 1; + if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { char chars[256]; if (value <= 255) { - memset(chars, padding_char, (size_t) (ulength - 1)); + memset(chars, padding_char, (size_t) padding_length); chars[ulength-1] = (char) value; return PyUnicode_DecodeLatin1(chars, ulength, NULL); } @@ -21696,8 +21322,8 @@ static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulengt value >>= 6; *--cpos = (char) (0xf0 | (value & 0x07)); } - cpos -= ulength; - memset(cpos, padding_char, (size_t) (ulength - 1)); + cpos -= padding_length; + memset(cpos, padding_char, (size_t) padding_length); return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); } if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { @@ -21708,7 +21334,7 @@ static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulengt PyObject *uchar, *padding_uchar, *padding, *result; padding_uchar = PyUnicode_FromOrdinal(padding_char); if (unlikely(!padding_uchar)) return NULL; - padding = PySequence_Repeat(padding_uchar, ulength - 1); + padding = PySequence_Repeat(padding_uchar, padding_length); Py_DECREF(padding_uchar); if (unlikely(!padding)) return NULL; uchar = PyUnicode_FromOrdinal(value); @@ -21724,7 +21350,27 @@ static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulengt } /* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) { +static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (long) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); +} +static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(long)*3+2]; char *dpos, *end = digits + sizeof(long)*3+2; const char *hex_digits = DIGITS_HEX; @@ -21740,17 +21386,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; - if (format_char == 'c') { - if (unlikely(!(is_unsigned || value == 0 || value > 0) || - !(sizeof(value) <= 2 || value & ~ (long) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { - PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); - return NULL; - } - if (width <= 1) { - return PyUnicode_FromOrdinal((int) value); - } - return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); - } if (format_char == 'X') { hex_digits += 16; format_char = 'x'; @@ -21826,7 +21461,7 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { } #endif -/* GetTopmostException */ +/* GetTopmostException (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) @@ -22018,7 +21653,7 @@ static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { - return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); @@ -22071,98 +21706,68 @@ static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); const long b = intval; - long a, x; -#ifdef HAVE_LONG_LONG + long a; const PY_LONG_LONG llb = intval; - PY_LONG_LONG lla, llx; -#endif + PY_LONG_LONG lla; if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op2); } - if (likely(__Pyx_PyLong_IsCompact(op1))) { - a = __Pyx_PyLong_CompactValue(op1); + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; } else { - const digit* digits = __Pyx_PyLong_Digits(op1); - const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG + if (!is_positive) a *= -1; + goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif + if (!is_positive) lla *= -1; + goto calculate_long_long; } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; + break; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG + if (!is_positive) a *= -1; + goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif + if (!is_positive) lla *= -1; + goto calculate_long_long; } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { - lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif - } - CYTHON_FALLTHROUGH; + break; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - #ifdef HAVE_LONG_LONG + if (!is_positive) a *= -1; + goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); - goto long_long; - #endif + if (!is_positive) lla *= -1; + goto calculate_long_long; } - CYTHON_FALLTHROUGH; - default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + break; } + return PyLong_Type.tp_as_number->nb_add(op1, op2); } + calculate_long: + { + long x; x = a + b; - return PyLong_FromLong(x); -#ifdef HAVE_LONG_LONG - long_long: + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx; llx = lla + llb; - return PyLong_FromLongLong(llx); -#endif - return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); - + return PyLong_FromLongLong(llx); + } } #endif @@ -22244,7 +21849,7 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, } #endif -/* TupleAndListFromArray */ +/* TupleAndListFromArray (used by fastcall) */ #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) @@ -22257,7 +21862,7 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { - if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < 0)) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } @@ -22348,20 +21953,80 @@ CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, Py PyObject *key = PyTuple_GetItem(kwnames, i); if (!key) goto bad; #else - PyObject *key = PyTuple_GET_ITEM(kwnames, i); + PyObject *key = PyTuple_GET_ITEM(kwnames, i); +#endif + if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0)) + goto bad; + } + return dict; +bad: + Py_DECREF(dict); + return NULL; +} +#endif +#endif + +/* py_dict_values (used by OwnedDictNext) */ +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); +} + +/* OwnedDictNext (used by ParseKeywordsImpl) */ +#if CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { + PyObject *next = NULL; + if (!*ppos) { + if (pvalue) { + PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); + if (unlikely(!dictview)) goto bad; + *ppos = PyObject_GetIter(dictview); + Py_DECREF(dictview); + } else { + *ppos = PyObject_GetIter(p); + } + if (unlikely(!*ppos)) goto bad; + } + next = PyIter_Next(*ppos); + if (!next) { + if (PyErr_Occurred()) goto bad; + return 0; + } + if (pkey && pvalue) { + *pkey = __Pyx_PySequence_ITEM(next, 0); + if (unlikely(*pkey)) goto bad; + *pvalue = __Pyx_PySequence_ITEM(next, 1); + if (unlikely(*pvalue)) goto bad; + Py_DECREF(next); + } else if (pkey) { + *pkey = next; + } else { + assert(pvalue); + *pvalue = next; + } + return 1; + bad: + Py_XDECREF(next); +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 + PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); +#else + PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); #endif - if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0)) - goto bad; + if (pkey) *pkey = NULL; + if (pvalue) *pvalue = NULL; + return 0; +} +#else // !CYTHON_AVOID_BORROWED_REFS +static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { + int result = PyDict_Next(p, ppos, pkey, pvalue); + if (likely(result == 1)) { + if (pkey) Py_INCREF(*pkey); + if (pvalue) Py_INCREF(*pvalue); } - return dict; -bad: - Py_DECREF(dict); - return NULL; + return result; } #endif -#endif -/* RaiseDoubleKeywords */ +/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) @@ -22370,7 +22035,7 @@ static void __Pyx_RaiseDoubleKeywordsError( "%s() got multiple values for keyword argument '%U'", func_name, kw_name); } -/* ParseKeywords */ +/* ParseKeywordsImpl (used by ParseKeywords) */ static int __Pyx_ValidateDuplicatePosArgs( PyObject *kwds, PyObject ** const argnames[], @@ -22526,16 +22191,23 @@ static void __Pyx_RejectUnknownKeyword( PyObject ** const *first_kw_arg, const char *function_name) { + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos = NULL; + #else Py_ssize_t pos = 0; + #endif PyObject *key = NULL; __Pyx_BEGIN_CRITICAL_SECTION(kwds); - while (PyDict_Next(kwds, &pos, &key, NULL)) { + while ( + #if CYTHON_AVOID_BORROWED_REFS + __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) + #else + PyDict_Next(kwds, &pos, &key, NULL) + #endif + ) { PyObject** const *name = first_kw_arg; while (*name && (**name != key)) name++; if (!*name) { - #if CYTHON_AVOID_BORROWED_REFS - Py_INCREF(key); - #endif size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp != 1) { @@ -22549,12 +22221,15 @@ static void __Pyx_RejectUnknownKeyword( #endif break; } - #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(key); - #endif } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif } __Pyx_END_CRITICAL_SECTION(); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(pos); + #endif assert(PyErr_Occurred()); } static int __Pyx_ParseKeywordDict( @@ -22726,6 +22401,8 @@ static int __Pyx_ParseKeywordsTuple( #endif return -1; } + +/* ParseKeywords */ static int __Pyx_ParseKeywords( PyObject *kwds, PyObject * const *kwvalues, @@ -22771,7 +22448,7 @@ static void __Pyx_RaiseArgtupleInvalid( (num_expected == 1) ? "" : "s", num_found); } -/* ArgTypeTest */ +/* ArgTypeTestFunc (used by ArgTypeTest) */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; @@ -22819,16 +22496,54 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam return 0; } +/* FunctionExport */ +static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { + PyObject *cobj; + union { + void (*fp)(void); + void *p; + } tmp; + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(api_dict, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(cobj); + return -1; +} + +/* GetApiDict */ +static PyObject *__Pyx_ApiExport_GetApiDict(void) { + PyObject *d; + if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) + return NULL; + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) + goto bad; + } + return d; +bad: + Py_XDECREF(d); + return NULL; +} + /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_1_2 -#define __PYX_HAVE_RT_ImportType_3_1_2 -static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_2 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_2_4 +#define __PYX_HAVE_RT_ImportType_3_2_4 +static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size) { PyObject *result = 0; Py_ssize_t basicsize; Py_ssize_t itemsize; -#if CYTHON_COMPILING_IN_LIMITED_API +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) PyObject *py_basicsize; PyObject *py_itemsize; #endif @@ -22841,7 +22556,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name); goto bad; } -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) basicsize = ((PyTypeObject *)result)->tp_basicsize; itemsize = ((PyTypeObject *)result)->tp_itemsize; #else @@ -22879,7 +22594,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_2 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_4 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -22887,7 +22602,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_2 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_4 && (size_t)basicsize > size) { if (PyErr_WarnFormat(NULL, 0, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -22902,186 +22617,187 @@ static PyTypeObject *__Pyx_ImportType_3_1_2(PyObject *module, const char *module } #endif -/* Import */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *module = 0; - PyObject *empty_dict = 0; - PyObject *empty_list = 0; - empty_dict = PyDict_New(); - if (unlikely(!empty_dict)) +/* PxdImportShared (used by VoidPtrImport) */ +#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4 +#define __PYX_HAVE_RT_ImportFromPxd_3_2_4 +static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) { + PyObject *d = 0; + PyObject *cobj = 0; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, name, &cobj); +#else + cobj = PyDict_GetItemString(d, name); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C %.8s %.200s", + PyModule_GetName(module), what, name); goto bad; - if (level == -1) { - const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); - if (package_sep != (0)) { - module = PyImport_ImportModuleLevelObject( - name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); - if (unlikely(!module)) { - if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) - goto bad; - PyErr_Clear(); - } - } - level = 0; } - if (!module) { - module = PyImport_ImportModuleLevelObject( - name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; } + *p = PyCapsule_GetPointer(cobj, sig); + if (!(*p)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; bad: - Py_XDECREF(empty_dict); - Py_XDECREF(empty_list); - return module; + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; } +#endif -/* ImportDottedModule */ -static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { - PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; - Py_ssize_t size; - if (unlikely(PyErr_Occurred())) { - PyErr_Clear(); - } -#if CYTHON_ASSUME_SAFE_SIZE - size = PyTuple_GET_SIZE(parts_tuple); -#else - size = PyTuple_Size(parts_tuple); - if (size < 0) goto bad; +/* VoidPtrImport */ +#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4 +static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) { + return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable"); +} #endif - if (likely(size == count)) { - partial_name = name; - } else { - slice = PySequence_GetSlice(parts_tuple, 0, count); - if (unlikely(!slice)) - goto bad; - sep = PyUnicode_FromStringAndSize(".", 1); - if (unlikely(!sep)) - goto bad; - partial_name = PyUnicode_Join(sep, slice); + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_2_4 +#define __PYX_HAVE_RT_ImportFunction_3_2_4 +static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + union { + void (*fp)(void); + void *p; + } tmp; + int result = __Pyx_ImportFromPxd_3_2_4(module, funcname, &tmp.p, sig, "function"); + if (result == 0) { + *f = tmp.fp; } - PyErr_Format( - PyExc_ModuleNotFoundError, - "No module named '%U'", partial_name); -bad: - Py_XDECREF(sep); - Py_XDECREF(slice); - Py_XDECREF(partial_name); - return NULL; + return result; } -static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { - PyObject *imported_module; -#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ - CYTHON_COMPILING_IN_GRAAL - PyObject *modules = PyImport_GetModuleDict(); - if (unlikely(!modules)) - return NULL; - imported_module = __Pyx_PyDict_GetItemStr(modules, name); - Py_XINCREF(imported_module); -#else - imported_module = PyImport_GetModule(name); #endif - return imported_module; + +/* ImportImpl (used by Import) */ +static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { + PyObject *imported_module = PyImport_GetModule(qualname); + if (unlikely(!imported_module)) { + *module = NULL; + if (PyErr_Occurred()) { + return -1; + } + return 0; + } + *module = imported_module; + return 1; } -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { - Py_ssize_t i, nparts; -#if CYTHON_ASSUME_SAFE_SIZE - nparts = PyTuple_GET_SIZE(parts_tuple); -#else - nparts = PyTuple_Size(parts_tuple); - if (nparts < 0) return NULL; -#endif - for (i=1; i < nparts && module; i++) { - PyObject *part, *submodule; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - part = PyTuple_GET_ITEM(parts_tuple, i); +static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { + PyObject *imported_module; + PyObject *top_level_package_name; + Py_ssize_t i; + int status, module_found; + Py_ssize_t dot_index; + module_found = __Pyx__Import_GetModule(qualname, &imported_module); + if (unlikely(!module_found || module_found == -1)) { + *module = NULL; + return module_found; + } + if (imported_names) { + for (i = 0; i < len_imported_names; i++) { + PyObject *imported_name = imported_names[i]; +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 + int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); #else - part = __Pyx_PySequence_ITEM(parts_tuple, i); - if (!part) return NULL; + int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); + if (unlikely(has_imported_attribute == -1)) goto error; #endif - submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(part); -#endif - Py_DECREF(module); - module = submodule; + if (!has_imported_attribute) { + goto not_found; + } + } + *module = imported_module; + return 1; } - if (unlikely(!module)) { - return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); + if (dot_index == -1) { + *module = imported_module; + return 1; } - return module; + if (unlikely(dot_index == -2)) goto error; + top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); + if (unlikely(!top_level_package_name)) goto error; + Py_DECREF(imported_module); + status = __Pyx__Import_GetModule(top_level_package_name, module); + Py_DECREF(top_level_package_name); + return status; +error: + Py_DECREF(imported_module); + *module = NULL; + return -1; +not_found: + Py_DECREF(imported_module); + *module = NULL; + return 0; } -static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { - PyObject *imported_module; - PyObject *module = __Pyx_Import(name, NULL, 0); - if (!parts_tuple || unlikely(!module)) +static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *from_list = 0; + int module_found; + if (!qualname) { + qualname = name; + } + module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); + if (likely(module_found == 1)) { return module; - imported_module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(imported_module)) { - Py_DECREF(module); - return imported_module; + } else if (unlikely(module_found == -1)) { + return NULL; } - PyErr_Clear(); - return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); -} -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (imported_names) { #if CYTHON_COMPILING_IN_CPYTHON - PyObject *module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(module)) { - PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); - if (likely(spec)) { - PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); - if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { - Py_DECREF(spec); - spec = NULL; - } - Py_XDECREF(unsafe); - } - if (likely(!spec)) { - PyErr_Clear(); - return module; + from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); + if (unlikely(!from_list)) + goto bad; +#else + from_list = PyList_New(len_imported_names); + if (unlikely(!from_list)) goto bad; + for (Py_ssize_t i=0; i__pyx_d, level); } /* ImportFrom */ @@ -23123,7 +22839,44 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { return value; } -/* LimitedApiGetTypeDict */ +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) + PyDict_SetDefaultRef(d, key, default_value, &value); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + PyObject *args[] = {d, key, default_value}; + value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#elif CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static Py_ssize_t __Pyx_GetTypeDictOffset(void) { PyObject *tp_dictoffset_o; @@ -23159,7 +22912,7 @@ static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { } #endif -/* SetItemOnTypeDict */ +/* SetItemOnTypeDict (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { int result; PyObject *tp_dict; @@ -23181,7 +22934,7 @@ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) return result; } -/* FixUpExtensionType */ +/* FixUpExtensionType (used by FetchCommonType) */ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if __PYX_LIMITED_VERSION_HEX > 0x030900B1 CYTHON_UNUSED_VAR(spec); @@ -23216,14 +22969,11 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); -#if PY_VERSION_HEX >= 0x030800b4 type->tp_vectorcall_offset = memb->offset; -#else - type->tp_print = (printfunc) memb->offset; -#endif changed = 1; } #endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); @@ -23238,11 +22988,13 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject } changed = 1; } +#endif // !CYTHON_COMPILING_IN_PYPY } memb++; } } #endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_getset) slot++; @@ -23274,35 +23026,66 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject ++getset; } } +#else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#endif // !CYTHON_COMPILING_IN_PYPY if (changed) - PyType_Modified(type); -#endif // PY_VERSION_HEX > 0x030900B1 - return 0; -} - -/* FetchSharedCythonModule */ -static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; } -/* dict_setdefault */ -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, - int is_safe_type) { - PyObject* value; - CYTHON_MAYBE_UNUSED_VAR(is_safe_type); -#if CYTHON_COMPILING_IN_LIMITED_API - value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); -#elif PY_VERSION_HEX >= 0x030d0000 - PyDict_SetDefaultRef(d, key, default_value, &value); +/* AddModuleRef (used by FetchSharedCythonModule) */ +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { + PyObject *module_dict = PyImport_GetModuleDict(); + PyObject *m; + if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { + return NULL; + } + if (m != NULL && PyModule_Check(m)) { + return m; + } + Py_XDECREF(m); + m = PyModule_NewObject(name); + if (m == NULL) + return NULL; + if (PyDict_CheckExact(module_dict)) { + PyObject *new_m; + (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); + Py_DECREF(m); + return new_m; + } else { + if (PyObject_SetItem(module_dict, name, m) != 0) { + Py_DECREF(m); + return NULL; + } + return m; + } + } + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *py_name = PyUnicode_FromString(name); + if (!py_name) return NULL; + PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); + Py_DECREF(py_name); + return module; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else - value = PyDict_SetDefault(d, key, default_value); - if (unlikely(!value)) return NULL; - Py_INCREF(value); + static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } #endif - return value; + +/* FetchSharedCythonModule (used by FetchCommonType) */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); } -/* FetchCommonType */ +/* FetchCommonType (used by CommonTypesMetaclass) */ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); @@ -23375,11 +23158,13 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyOb } else if (unlikely(get_item_ref_result == -1)) { goto bad; } - CYTHON_UNUSED_VAR(module); - cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + cached_type = __Pyx_PyType_FromMetaclass( + metaclass, + CYTHON_USE_MODULE_STATE ? module : abi_module, + spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; - new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); if (unlikely(new_cached_type != cached_type)) { if (unlikely(!new_cached_type)) goto bad; Py_DECREF(cached_type); @@ -23405,26 +23190,39 @@ static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyOb goto done; } -/* CommonTypesMetaclass */ -PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { +/* CommonTypesMetaclass (used by CythonFunctionShared) */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); } +#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { + PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); + return NULL; +} +static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { + PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); + return -1; +} +#endif static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, {0, 0, 0, 0, 0} }; static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, + {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, + #endif {0, 0} }; static PyType_Spec __pyx_CommonTypesMetaclass_spec = { __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", 0, 0, -#if PY_VERSION_HEX >= 0x030A0000 Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | -#endif Py_TPFLAGS_DEFAULT, __pyx_CommonTypesMetaclass_slots }; @@ -23435,13 +23233,14 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) { return -1; } mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { return -1; } return 0; } -/* CallTypeTraverse */ +/* CallTypeTraverse (used by CythonFunctionShared) */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { @@ -23460,7 +23259,7 @@ static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visi } #endif -/* PyMethodNew */ +/* PyMethodNew (used by CythonFunctionShared) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *result; @@ -23486,15 +23285,20 @@ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *ty } #endif -/* PyVectorcallFastCallDict */ -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +/* PyVectorcallFastCallDict (used by CythonFunctionShared) */ +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; - Py_ssize_t i, pos; + Py_ssize_t i; + #if CYTHON_AVOID_BORROWED_REFS + PyObject *pos; + #else + Py_ssize_t pos; + #endif size_t j; PyObject *key, *value; unsigned long keys_are_strings; @@ -23516,17 +23320,16 @@ static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vector return NULL; } kwvalues = newargs + nargs; - pos = i = 0; + pos = 0; + i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; - while (PyDict_Next(kw, &pos, &key, &value)) { + while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { keys_are_strings &= #if CYTHON_COMPILING_IN_LIMITED_API PyType_GetFlags(Py_TYPE(key)); #else Py_TYPE(key)->tp_flags; #endif - Py_INCREF(key); - Py_INCREF(value); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; #else @@ -23541,6 +23344,9 @@ static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vector } res = vc(func, newargs, nargs, kwnames); cleanup: + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(pos); + #endif Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); @@ -23569,7 +23375,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, _ } #endif -/* CythonFunctionShared */ +/* CythonFunctionShared (used by CythonFunction) */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { if (__Pyx_CyFunction_Check(func)) { @@ -23721,9 +23527,11 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void __Pyx_END_CRITICAL_SECTION(); return 0; } +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject * -__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) @@ -23732,36 +23540,7 @@ __Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) Py_INCREF(op->func_dict); return op->func_dict; } -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - PyObject *result; - __Pyx_BEGIN_CRITICAL_SECTION(op); - result = __Pyx_CyFunction_get_dict_locked(op); - __Pyx_END_CRITICAL_SECTION(); - return result; -} -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) -{ - CYTHON_UNUSED_VAR(context); - if (unlikely(value == NULL)) { - PyErr_SetString(PyExc_TypeError, - "function's dictionary may not be deleted"); - return -1; - } - if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "setting function's dictionary to a non-dict"); - return -1; - } - Py_INCREF(value); - __Pyx_BEGIN_CRITICAL_SECTION(op); - __Pyx_Py_XDECREF_SET(op->func_dict, value); - __Pyx_END_CRITICAL_SECTION(); - return 0; -} +#endif static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { @@ -24023,8 +23802,13 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, - {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, +#else + {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, + {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, +#endif {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, @@ -24045,9 +23829,11 @@ static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#endif #if CYTHON_METH_FASTCALL -#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#if CYTHON_COMPILING_IN_LIMITED_API {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, @@ -24103,7 +23889,9 @@ static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef * Py_XINCREF(module); cf->m_module = module; #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API op->func_dict = NULL; +#endif op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; @@ -24157,7 +23945,13 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func_dict); +#elif PY_VERSION_HEX < 0x030d0000 + _PyObject_ClearManagedDict((PyObject*)m); +#else + PyObject_ClearManagedDict((PyObject*)m); +#endif Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); @@ -24205,7 +23999,20 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif +#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func_dict); +#else + { + int e = +#if PY_VERSION_HEX < 0x030d0000 + _PyObject_VisitManagedDict +#else + PyObject_VisitManagedDict +#endif + ((PyObject*)m, visit, arg); + if (e != 0) return e; + } +#endif __Pyx_VISIT_CONST(m->func_name); __Pyx_VISIT_CONST(m->func_qualname); Py_VISIT(m->func_doc); @@ -24317,7 +24124,7 @@ static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *a static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE @@ -24356,7 +24163,7 @@ static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, P } return result; } -#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; @@ -24378,11 +24185,7 @@ static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionO static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -24417,11 +24220,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *c static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -24456,11 +24255,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -24491,11 +24286,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); @@ -24520,7 +24311,12 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject default: return NULL; } - return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); + #if PY_VERSION_HEX < 0x030e00A6 + size_t nargs_value = (size_t) nargs; + #else + Py_ssize_t nargs_value = nargs; + #endif + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); } #endif static PyType_Slot __pyx_CyFunctionType_slots[] = { @@ -24549,9 +24345,10 @@ static PyType_Spec __pyx_CyFunctionType_spec = { _Py_TPFLAGS_HAVE_VECTORCALL | #endif #endif // CYTHON_METH_FASTCALL -#if PY_VERSION_HEX >= 0x030A0000 - Py_TPFLAGS_IMMUTABLETYPE | +#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_TPFLAGS_MANAGED_DICT | #endif + Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; @@ -24600,55 +24397,44 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qual return op; } -/* CLineInTraceback */ +/* CLineInTraceback (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) +#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); +#else +PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { + PyObject **dict_ptr = _PyObject_GetDictPtr(o); + return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; +} +#endif static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - PyObject *use_cline; + PyObject *use_cline = NULL; PyObject *ptype, *pvalue, *ptraceback; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject **cython_runtime_dict; -#endif + PyObject *cython_runtime_dict; CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); -#if CYTHON_COMPILING_IN_CPYTHON - cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); __PYX_PY_DICT_LOOKUP_IF_MODIFIED( - use_cline, *cython_runtime_dict, - __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) - Py_XINCREF(use_cline); - __Pyx_END_CRITICAL_SECTION(); - } else -#endif - { - PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); - if (use_cline_obj) { - use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; - Py_INCREF(use_cline); - Py_DECREF(use_cline_obj); - } else { - PyErr_Clear(); - use_cline = NULL; - } - } - if (!use_cline) { - c_line = 0; - (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + use_cline, cython_runtime_dict, + __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } Py_XDECREF(use_cline); + Py_XDECREF(cython_runtime_dict); __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif -/* CodeObjectCache */ +/* CodeObjectCache (used by AddTraceback) */ 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) { @@ -24800,8 +24586,7 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { - (void) __pyx_cfilenm; - (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = __pyx_find_code_object(c_line ? -c_line : py_line); @@ -24810,7 +24595,11 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; - py_funcname = PyUnicode_FromString(funcname); + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + } else { + py_funcname = PyUnicode_FromString(funcname); + } if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; @@ -24940,7 +24729,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readsta return PyLong_FromLong((long) value); } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -24948,10 +24737,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readsta } else { if (sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -25011,7 +24798,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_readstat_type_t(readstat_type_t return PyLong_FromLong((long) value); } else if (sizeof(readstat_type_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(readstat_type_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -25019,10 +24806,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_readstat_type_t(readstat_type_t } else { if (sizeof(readstat_type_t) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(readstat_type_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -25082,7 +24867,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { return PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -25090,10 +24875,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { } else { if (sizeof(long) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -25211,10 +24994,8 @@ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -25283,10 +25064,8 @@ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -25407,7 +25186,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { return PyLong_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); -#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif @@ -25415,10 +25194,8 @@ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { } else { if (sizeof(int) <= sizeof(long)) { return PyLong_FromLong((long) value); -#ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif } } { @@ -25536,10 +25313,8 @@ static CYTHON_INLINE readstat_type_t __Pyx_PyLong_As_readstat_type_t(PyObject *x #endif if ((sizeof(readstat_type_t) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(readstat_type_t) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -25608,10 +25383,8 @@ static CYTHON_INLINE readstat_type_t __Pyx_PyLong_As_readstat_type_t(PyObject *x #endif if ((sizeof(readstat_type_t) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(readstat_type_t) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(readstat_type_t, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -25725,10 +25498,8 @@ static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { #endif if ((sizeof(int32_t) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -25797,10 +25568,8 @@ static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { #endif if ((sizeof(int32_t) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -25979,10 +25748,8 @@ static CYTHON_INLINE __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_t #endif if ((sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -26051,10 +25818,8 @@ static CYTHON_INLINE __pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_t #endif if ((sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(__pyx_t_10pyreadstat_16_readstat_writer_pywriter_variable_type, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -26207,10 +25972,8 @@ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif } } else { #if CYTHON_USE_PYLONG_INTERNALS @@ -26279,10 +26042,8 @@ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif } } { @@ -26475,11 +26236,8 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* GetRuntimeVersion */ -static unsigned long __Pyx_get_runtime_version(void) { -#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 - return Py_Version & ~0xFFUL; -#else - static unsigned long __Pyx_cached_runtime_version = 0; +#if __PYX_LIMITED_VERSION_HEX < 0x030b0000 +void __Pyx_init_runtime_version(void) { if (__Pyx_cached_runtime_version == 0) { const char* rt_version = Py_GetVersion(); unsigned long version = 0; @@ -26500,6 +26258,12 @@ static unsigned long __Pyx_get_runtime_version(void) { } __Pyx_cached_runtime_version = version; } +} +#endif +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else return __Pyx_cached_runtime_version; #endif } @@ -26527,124 +26291,6 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt } } -/* FunctionExport */ -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); - if (!d) { - PyErr_Clear(); - d = PyDict_New(); - if (!d) - goto bad; - Py_INCREF(d); - if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) - goto bad; - } - tmp.fp = f; - cobj = PyCapsule_New(tmp.p, sig, 0); - if (!cobj) - goto bad; - if (PyDict_SetItemString(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - -/* VoidPtrImport */ -#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_1_2 -#define __PYX_HAVE_RT_ImportVoidPtr_3_1_2 -static int __Pyx_ImportVoidPtr_3_1_2(PyObject *module, const char *name, void **p, const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - d = PyObject_GetAttrString(module, "__pyx_capi__"); - if (!d) - goto bad; -#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) - PyDict_GetItemStringRef(d, name, &cobj); -#else - cobj = PyDict_GetItemString(d, name); - Py_XINCREF(cobj); -#endif - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C variable %.200s", - PyModule_GetName(module), name); - goto bad; - } - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); - goto bad; - } - *p = PyCapsule_GetPointer(cobj, sig); - if (!(*p)) - goto bad; - Py_DECREF(d); - Py_DECREF(cobj); - return 0; -bad: - Py_XDECREF(d); - Py_XDECREF(cobj); - return -1; -} -#endif - -/* FunctionImport */ -#ifndef __PYX_HAVE_RT_ImportFunction_3_1_2 -#define __PYX_HAVE_RT_ImportFunction_3_1_2 -static int __Pyx_ImportFunction_3_1_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - d = PyObject_GetAttrString(module, "__pyx_capi__"); - if (!d) - goto bad; -#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) - PyDict_GetItemStringRef(d, funcname, &cobj); -#else - cobj = PyDict_GetItemString(d, funcname); - Py_XINCREF(cobj); -#endif - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C function %.200s", - PyModule_GetName(module), funcname); - goto bad; - } - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); - goto bad; - } - tmp.p = PyCapsule_GetPointer(cobj, sig); - *f = tmp.fp; - if (!(*f)) - goto bad; - Py_DECREF(d); - Py_DECREF(cobj); - return 0; -bad: - Py_XDECREF(d); - Py_XDECREF(cobj); - return -1; -} -#endif - /* NewCodeObj */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, @@ -26705,9 +26351,13 @@ static int __Pyx_ImportFunction_3_1_2(PyObject *module, const char *funcname, vo PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif return result; } -#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY +#elif !CYTHON_COMPILING_IN_PYPY #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else @@ -26719,10 +26369,10 @@ static PyObject* __Pyx_PyCode_New( PyObject * const *varnames, PyObject *filename, PyObject *funcname, - const char *line_table, + PyObject *line_table, PyObject *tuple_dedup_map ) { - PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; PyObject *varnames_tuple = PyTuple_New(var_count); if (unlikely(!varnames_tuple)) return NULL; @@ -26743,11 +26393,12 @@ static PyObject* __Pyx_PyCode_New( #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(varnames_tuple_dedup); #endif - if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL - && !CYTHON_COMPILING_IN_GRAAL) { - line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); - if (unlikely(!line_table_bytes)) goto done; - Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { + Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(line_table_length == -1)) goto done; + #endif + Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; code_bytes = PyBytes_FromStringAndSize(NULL, code_len); if (unlikely(!code_bytes)) goto done; char* c_code_bytes = PyBytes_AsString(code_bytes); @@ -26770,11 +26421,10 @@ static PyObject* __Pyx_PyCode_New( filename, funcname, (int) descr.first_line, - (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes ); done: Py_XDECREF(code_bytes); - Py_XDECREF(line_table_bytes); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(varnames_tuple_dedup); #endif @@ -26782,30 +26432,68 @@ static PyObject* __Pyx_PyCode_New( return code_obj; } -/* InitStrings */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { - while (t->s) { - PyObject *str; - if (t->is_unicode) { - if (t->intern) { - str = PyUnicode_InternFromString(t->s); - } else if (t->encoding) { - str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); - } else { - str = PyUnicode_FromStringAndSize(t->s, t->n - 1); - } - } else { - str = PyBytes_FromStringAndSize(t->s, t->n - 1); - } - if (!str) - return -1; - *target = str; - if (PyObject_Hash(str) == -1) - return -1; - ++t; - ++target; +/* DecompressString */ +static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { + PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; + const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; + PyObject *methodname = PyUnicode_FromString("decompress"); + if (unlikely(!methodname)) return NULL; + #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 + if (algo == 3) { + PyObject *fromlist = Py_BuildValue("[O]", methodname); + if (unlikely(!fromlist)) goto bad; + module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + } else + #endif + module = PyImport_ImportModule(module_name); + if (unlikely(!module)) goto import_failed; + decompress = PyObject_GetAttr(module, methodname); + if (unlikely(!decompress)) goto import_failed; + { + #ifdef __cplusplus + char *memview_bytes = const_cast(s); + #else + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wcast-qual" + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-qual" + #endif + char *memview_bytes = (char*) s; + #if defined(__clang__) + #pragma clang diagnostic pop + #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) + #pragma GCC diagnostic pop + #endif + #endif + #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) + int memview_flags = 0x100; + #else + int memview_flags = PyBUF_READ; + #endif + compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); } - return 0; + if (unlikely(!compressed_bytes)) { + Py_DECREF(decompress); + goto bad; + } + decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); + Py_DECREF(compressed_bytes); + Py_DECREF(decompress); + Py_DECREF(module); + Py_DECREF(methodname); + return decompressed; +import_failed: + PyErr_Format(PyExc_ImportError, + "Failed to import '%.20s.decompress' - cannot initialise module strings. " + "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", + module_name, algo); +bad: + Py_XDECREF(module); + Py_DECREF(methodname); + return NULL; } #include @@ -27027,7 +26715,7 @@ static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { return __Pyx_NewRef(Py_None); } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); + return __Pyx_NewRef(b ? Py_True: Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { return PyLong_FromSize_t(ival); diff --git a/setup.py b/setup.py index baa9f16..bc9434a 100644 --- a/setup.py +++ b/setup.py @@ -129,7 +129,7 @@ def is_conda(): setup( name='pyreadstat', - version='1.3.4', + version='1.3.5', description=short_description, author="Otto Fajardo", author_email="pleasecontactviagithub@notvalid.com", diff --git a/src/sas/readstat_sas.h b/src/sas/readstat_sas.h index 6b80c2f..5f4f286 100644 --- a/src/sas/readstat_sas.h +++ b/src/sas/readstat_sas.h @@ -64,6 +64,19 @@ typedef struct sas_text_ref_s { uint16_t length; } sas_text_ref_t; +typedef enum sas_subheader_type_e { + SAS_SUBHEADER_TYPE_DATA, + SAS_SUBHEADER_TYPE_ROW_SIZE, + SAS_SUBHEADER_TYPE_COLUMN_SIZE, + SAS_SUBHEADER_TYPE_COUNTS, + SAS_SUBHEADER_TYPE_COLUMN_FORMAT, + SAS_SUBHEADER_TYPE_COLUMN_ATTRS, + SAS_SUBHEADER_TYPE_COLUMN_TEXT, + SAS_SUBHEADER_TYPE_COLUMN_LIST, + SAS_SUBHEADER_TYPE_COLUMN_NAME, + SAS_SUBHEADER_TYPE_UNKNOWN +} sas_subheader_type_t; + #define SAS_ENDIAN_BIG 0x00 #define SAS_ENDIAN_LITTLE 0x01 @@ -89,6 +102,9 @@ typedef struct sas_text_ref_s { #define SAS_SUBHEADER_SIGNATURE_COLUMN_LIST 0xFFFFFFFE #define SAS_SUBHEADER_SIGNATURE_COLUMN_NAME 0xFFFFFFFF +#define SAS_SUBHEADER_SIGNATURE_64BIT_MASK 0xFFFFFFFF00000000 +#define SAS_SUBHEADER_SIGNATURE_32BIT_MASK 0x00000000FFFFFFFF + #define SAS_PAGE_TYPE_META 0x0000 #define SAS_PAGE_TYPE_DATA 0x0100 #define SAS_PAGE_TYPE_MIX 0x0200 diff --git a/src/sas/readstat_sas7bdat_read.c b/src/sas/readstat_sas7bdat_read.c index b7f0296..5fc8444 100644 --- a/src/sas/readstat_sas7bdat_read.c +++ b/src/sas/readstat_sas7bdat_read.c @@ -380,6 +380,9 @@ static readstat_error_t sas7bdat_parse_column_format_subheader(const char *subhe if (ctx->u64) { ctx->col_info[ctx->col_formats_count-1].format_width = sas_read2(&subheader[24], ctx->bswap); ctx->col_info[ctx->col_formats_count-1].format_digits = sas_read2(&subheader[26], ctx->bswap); + } else { + ctx->col_info[ctx->col_formats_count-1].format_width = sas_read2(&subheader[12], ctx->bswap); + ctx->col_info[ctx->col_formats_count-1].format_digits = sas_read2(&subheader[14], ctx->bswap); } ctx->col_info[ctx->col_formats_count-1].format_ref = sas7bdat_parse_text_ref( ctx->u64 ? &subheader[46] : &subheader[34], ctx); @@ -626,30 +629,31 @@ static readstat_error_t sas7bdat_parse_subheader_compressed(const char *subheade return sas7bdat_parse_subheader_rle(subheader, len, ctx); } -static readstat_error_t sas7bdat_parse_subheader(uint32_t signature, const char *subheader, size_t len, sas7bdat_ctx_t *ctx) { +static readstat_error_t sas7bdat_parse_subheader(sas_subheader_type_t subheader_type, const char *subheader, + size_t len, sas7bdat_ctx_t *ctx) { readstat_error_t retval = READSTAT_OK; if (len < 2 + ctx->subheader_signature_size) { retval = READSTAT_ERROR_PARSE; goto cleanup; } - if (signature == SAS_SUBHEADER_SIGNATURE_ROW_SIZE) { + if (subheader_type == SAS_SUBHEADER_TYPE_ROW_SIZE) { retval = sas7bdat_parse_row_size_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_SIZE) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_SIZE) { retval = sas7bdat_parse_column_size_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COUNTS) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COUNTS) { /* void */ - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_TEXT) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_TEXT) { retval = sas7bdat_parse_column_text_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_NAME) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_NAME) { retval = sas7bdat_parse_column_name_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_ATTRS) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_ATTRS) { retval = sas7bdat_parse_column_attributes_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_FORMAT) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_FORMAT) { retval = sas7bdat_parse_column_format_subheader(subheader, len, ctx); - } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_LIST) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_LIST) { /* void */ - } else if ((signature & SAS_SUBHEADER_SIGNATURE_COLUMN_MASK) == SAS_SUBHEADER_SIGNATURE_COLUMN_MASK) { + } else if (subheader_type == SAS_SUBHEADER_TYPE_UNKNOWN) { /* void */ } else { retval = READSTAT_ERROR_PARSE; @@ -696,7 +700,7 @@ static readstat_variable_t *sas7bdat_init_variable(sas7bdat_ctx_t *ctx, int i, goto cleanup; } size_t len = strlen(variable->format); - if (len && ctx->col_info[i].format_width) { + if (ctx->col_info[i].format_width) { len += snprintf(variable->format + len, sizeof(variable->format) - len, "%d", ctx->col_info[i].format_width); } @@ -804,12 +808,49 @@ static readstat_error_t sas7bdat_submit_columns_if_needed(sas7bdat_ctx_t *ctx, i return retval; } -static int sas7bdat_signature_is_recognized(uint32_t signature) { - return (signature == SAS_SUBHEADER_SIGNATURE_ROW_SIZE || - signature == SAS_SUBHEADER_SIGNATURE_COLUMN_SIZE || - signature == SAS_SUBHEADER_SIGNATURE_COUNTS || - signature == SAS_SUBHEADER_SIGNATURE_COLUMN_FORMAT || - (signature & SAS_SUBHEADER_SIGNATURE_COLUMN_MASK) == SAS_SUBHEADER_SIGNATURE_COLUMN_MASK); +static sas_subheader_type_t sas7bdat_parse_subheader_type_32(uint32_t signature) { + switch (signature) { + case SAS_SUBHEADER_SIGNATURE_ROW_SIZE: + return SAS_SUBHEADER_TYPE_ROW_SIZE; + case SAS_SUBHEADER_SIGNATURE_COLUMN_SIZE: + return SAS_SUBHEADER_TYPE_COLUMN_SIZE; + case SAS_SUBHEADER_SIGNATURE_COUNTS: + return SAS_SUBHEADER_TYPE_COUNTS; + case SAS_SUBHEADER_SIGNATURE_COLUMN_FORMAT: + return SAS_SUBHEADER_TYPE_COLUMN_FORMAT; + case SAS_SUBHEADER_SIGNATURE_COLUMN_ATTRS: + return SAS_SUBHEADER_TYPE_COLUMN_ATTRS; + case SAS_SUBHEADER_SIGNATURE_COLUMN_TEXT: + return SAS_SUBHEADER_TYPE_COLUMN_TEXT; + case SAS_SUBHEADER_SIGNATURE_COLUMN_LIST: + return SAS_SUBHEADER_TYPE_COLUMN_LIST; + case SAS_SUBHEADER_SIGNATURE_COLUMN_NAME: + return SAS_SUBHEADER_TYPE_COLUMN_NAME; + default: + if ((signature & SAS_SUBHEADER_SIGNATURE_COLUMN_MASK) == SAS_SUBHEADER_SIGNATURE_COLUMN_MASK) { + return SAS_SUBHEADER_TYPE_UNKNOWN; + } + return SAS_SUBHEADER_TYPE_DATA; + } +} + +static sas_subheader_type_t sas7bdat_parse_subheader_type(const char* subheader, sas7bdat_ctx_t* ctx) { + if (!ctx->u64) { + uint32_t signature_32 = sas_read4(subheader, ctx->bswap); + return sas7bdat_parse_subheader_type_32(signature_32); + } + + uint64_t signature = sas_read8(subheader, ctx->bswap); + if (signature == SAS_SUBHEADER_SIGNATURE_ROW_SIZE) { + return SAS_SUBHEADER_TYPE_ROW_SIZE; + } else if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_SIZE) { + return SAS_SUBHEADER_TYPE_COLUMN_SIZE; + } else if ((signature & SAS_SUBHEADER_SIGNATURE_64BIT_MASK) != SAS_SUBHEADER_SIGNATURE_64BIT_MASK) { + return SAS_SUBHEADER_TYPE_DATA; + } + + uint32_t lower_bytes = (uint32_t)(signature & SAS_SUBHEADER_SIGNATURE_32BIT_MASK); + return sas7bdat_parse_subheader_type_32(lower_bytes); } static readstat_error_t sas7bdat_parse_subheader_pointer(const char *shp, size_t shp_size, @@ -875,8 +916,6 @@ static readstat_error_t sas7bdat_parse_page_pass1(const char *page, size_t page_ for (i=0; isubheader_signature_size; if ((retval = sas7bdat_parse_subheader_pointer(shp, page + page_size - shp, &shp_info, ctx)) != READSTAT_OK) { goto cleanup; } @@ -885,12 +924,9 @@ static readstat_error_t sas7bdat_parse_page_pass1(const char *page, size_t page_ goto cleanup; } if (shp_info.compression == SAS_COMPRESSION_NONE) { - signature = sas_read4(page + shp_info.offset, ctx->bswap); - if (!ctx->little_endian && signature == -1 && signature_len == 8) { - signature = sas_read4(page + shp_info.offset + 4, ctx->bswap); - } - if (signature == SAS_SUBHEADER_SIGNATURE_COLUMN_TEXT) { - if ((retval = sas7bdat_parse_subheader(signature, page + shp_info.offset, shp_info.len, ctx)) + sas_subheader_type_t subheader_type = sas7bdat_parse_subheader_type(page + shp_info.offset, ctx); + if (subheader_type == SAS_SUBHEADER_TYPE_COLUMN_TEXT) { + if ((retval = sas7bdat_parse_subheader(subheader_type, page + shp_info.offset, shp_info.len, ctx)) != READSTAT_OK) { goto cleanup; } @@ -937,7 +973,6 @@ static readstat_error_t sas7bdat_parse_page_pass2(const char *page, size_t page_ for (i=0; ibswap); - if (!ctx->little_endian && signature == -1 && ctx->u64) { - signature = sas_read4(page + shp_info.offset + 4, ctx->bswap); - } - if (shp_info.is_compressed_data && !sas7bdat_signature_is_recognized(signature)) { + sas_subheader_type_t subheader_type = sas7bdat_parse_subheader_type(page + shp_info.offset, ctx); + if (shp_info.is_compressed_data && subheader_type == SAS_SUBHEADER_TYPE_DATA) { if (shp_info.len != ctx->row_length) { retval = READSTAT_ERROR_ROW_WIDTH_MISMATCH; goto cleanup; @@ -962,8 +994,8 @@ static readstat_error_t sas7bdat_parse_page_pass2(const char *page, size_t page_ goto cleanup; } } else { - if (signature != SAS_SUBHEADER_SIGNATURE_COLUMN_TEXT) { - if ((retval = sas7bdat_parse_subheader(signature, page + shp_info.offset, shp_info.len, ctx)) != READSTAT_OK) { + if (subheader_type != SAS_SUBHEADER_TYPE_COLUMN_TEXT) { + if ((retval = sas7bdat_parse_subheader(subheader_type, page + shp_info.offset, shp_info.len, ctx)) != READSTAT_OK) { goto cleanup; } } diff --git a/src/spss/readstat_sav_parse_mr_name.c b/src/spss/readstat_sav_parse_mr_name.c index 8bcb33f..5125065 100644 --- a/src/spss/readstat_sav_parse_mr_name.c +++ b/src/spss/readstat_sav_parse_mr_name.c @@ -1,5 +1,5 @@ -#line 1 "./readstat_sav_parse_mr_name.rl" +#line 1 "src/spss/readstat_sav_parse_mr_name.rl" #include #include #include @@ -10,7 +10,7 @@ #include "readstat_sav.h" -#line 11 "./readstat_sav_parse_mr_name.c" +#line 11 "src/spss/readstat_sav_parse_mr_name.c" static const char _mr_extractor_actions[] = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4 @@ -18,47 +18,51 @@ static const char _mr_extractor_actions[] = { static const char _mr_extractor_key_offsets[] = { 0, 0, 2, 4, 6, 9, 11, 14, - 16, 21, 26 + 19, 24, 29, 31, 36, 41 }; static const char _mr_extractor_trans_keys[] = { 32, 61, 32, 61, 67, 68, 32, 48, - 57, 48, 57, 32, 48, 57, 32, 61, - 0, 32, 61, 9, 13, 0, 32, 61, - 9, 13, 32, 61, 0 + 57, 48, 57, 32, 48, 57, 0, 32, + 61, 9, 13, 0, 32, 61, 9, 13, + 0, 32, 61, 9, 13, 32, 61, 0, + 32, 61, 9, 13, 0, 32, 61, 9, + 13, 0, 32, 9, 13, 0 }; static const char _mr_extractor_single_lengths[] = { - 0, 2, 2, 0, 1, 0, 1, 2, - 3, 3, 2 + 0, 2, 2, 0, 1, 0, 1, 3, + 3, 3, 2, 3, 3, 2 }; static const char _mr_extractor_range_lengths[] = { - 0, 0, 0, 1, 1, 1, 1, 0, - 1, 1, 0 + 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1 }; static const char _mr_extractor_index_offsets[] = { 0, 0, 3, 6, 8, 11, 13, 16, - 19, 24, 29 + 21, 26, 31, 34, 39, 44 }; static const char _mr_extractor_indicies[] = { 1, 1, 0, 1, 2, 0, 3, 1, 4, 5, 1, 6, 1, 7, 6, 1, - 9, 1, 8, 10, 11, 1, 10, 8, - 10, 11, 1, 10, 8, 1, 1, 8, + 9, 10, 1, 9, 8, 11, 12, 1, + 11, 8, 9, 10, 1, 9, 8, 1, + 1, 8, 13, 14, 1, 13, 8, 11, + 15, 1, 11, 8, 15, 15, 15, 1, 0 }; static const char _mr_extractor_trans_targs[] = { - 2, 0, 3, 4, 5, 4, 6, 7, - 8, 7, 9, 10 + 2, 0, 3, 4, 5, 4, 6, 8, + 7, 9, 10, 11, 8, 11, 12, 13 }; static const char _mr_extractor_trans_actions[] = { 0, 0, 1, 3, 5, 0, 0, 7, - 0, 0, 9, 9 + 0, 9, 9, 0, 0, 9, 9, 0 }; static const int mr_extractor_start = 1; @@ -66,7 +70,7 @@ static const int mr_extractor_start = 1; static const int mr_extractor_en_main = 1; -#line 121 "./readstat_sav_parse_mr_name.rl" +#line 121 "src/spss/readstat_sav_parse_mr_name.rl" readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t *ctx) { @@ -88,14 +92,14 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * // Execute Ragel finite state machine (FSM) -#line 85 "./readstat_sav_parse_mr_name.c" +#line 89 "src/spss/readstat_sav_parse_mr_name.c" { cs = mr_extractor_start; } -#line 142 "./readstat_sav_parse_mr_name.rl" +#line 142 "src/spss/readstat_sav_parse_mr_name.rl" -#line 88 "./readstat_sav_parse_mr_name.c" +#line 92 "src/spss/readstat_sav_parse_mr_name.c" { int _klen; unsigned int _trans; @@ -170,7 +174,7 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * switch ( *_acts++ ) { case 0: -#line 13 "./readstat_sav_parse_mr_name.rl" +#line 13 "src/spss/readstat_sav_parse_mr_name.rl" { size_t src_len = p - start; size_t dst_len = 4 * src_len + 1; // UTF-8 expansion: up to 4 bytes per char @@ -186,14 +190,14 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * } break; case 1: -#line 27 "./readstat_sav_parse_mr_name.rl" +#line 27 "src/spss/readstat_sav_parse_mr_name.rl" { mr_type = *p; start = p + 1; } break; case 2: -#line 32 "./readstat_sav_parse_mr_name.rl" +#line 32 "src/spss/readstat_sav_parse_mr_name.rl" { int n_cv_digs = p - start; char *n_dig_str = (char *)readstat_malloc(n_cv_digs + 1); @@ -224,7 +228,7 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * } break; case 3: -#line 61 "./readstat_sav_parse_mr_name.rl" +#line 61 "src/spss/readstat_sav_parse_mr_name.rl" { char *lbl_len_str = (char *)readstat_malloc(p - start + 1); if (lbl_len_str == NULL) { @@ -250,7 +254,7 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * } break; case 4: -#line 85 "./readstat_sav_parse_mr_name.rl" +#line 85 "src/spss/readstat_sav_parse_mr_name.rl" { size_t src_len = p - start; size_t dst_len = 4 * src_len + 1; // UTF-8 expansion: up to 4 bytes per char @@ -275,7 +279,7 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * mr_subvariables[mr_subvar_count++] = subvar; } break; -#line 262 "./readstat_sav_parse_mr_name.c" +#line 266 "src/spss/readstat_sav_parse_mr_name.c" } } @@ -288,10 +292,10 @@ readstat_error_t extract_mr_data(const char *line, mr_set_t *result, sav_ctx_t * _out: {} } -#line 143 "./readstat_sav_parse_mr_name.rl" +#line 143 "src/spss/readstat_sav_parse_mr_name.rl" // Check if FSM finished successfully - if (cs < 9 || p != pe) { + if (cs < 8 || p != pe) { retval = READSTAT_ERROR_BAD_MR_STRING; goto cleanup; } @@ -330,7 +334,7 @@ readstat_error_t parse_mr_line(const char *line, mr_set_t *result, sav_ctx_t *ct } -#line 313 "./readstat_sav_parse_mr_name.c" +#line 317 "src/spss/readstat_sav_parse_mr_name.c" static const char _mr_parser_actions[] = { 0, 1, 0 }; @@ -373,7 +377,7 @@ static const int mr_parser_start = 1; static const int mr_parser_en_main = 1; -#line 216 "./readstat_sav_parse_mr_name.rl" +#line 216 "src/spss/readstat_sav_parse_mr_name.rl" readstat_error_t parse_mr_string(const char *line, mr_set_t **mr_sets, size_t *n_mr_lines, sav_ctx_t *ctx) { @@ -386,14 +390,14 @@ readstat_error_t parse_mr_string(const char *line, mr_set_t **mr_sets, size_t *n *n_mr_lines = 0; -#line 365 "./readstat_sav_parse_mr_name.c" +#line 369 "src/spss/readstat_sav_parse_mr_name.c" { cs = mr_parser_start; } -#line 228 "./readstat_sav_parse_mr_name.rl" +#line 228 "src/spss/readstat_sav_parse_mr_name.rl" -#line 368 "./readstat_sav_parse_mr_name.c" +#line 372 "src/spss/readstat_sav_parse_mr_name.c" { int _klen; unsigned int _trans; @@ -468,7 +472,7 @@ readstat_error_t parse_mr_string(const char *line, mr_set_t **mr_sets, size_t *n switch ( *_acts++ ) { case 0: -#line 186 "./readstat_sav_parse_mr_name.rl" +#line 186 "src/spss/readstat_sav_parse_mr_name.rl" { char *mln = (char *)readstat_malloc(p - start); if (mln == NULL) { @@ -493,7 +497,7 @@ readstat_error_t parse_mr_string(const char *line, mr_set_t **mr_sets, size_t *n start = p + 1; } break; -#line 466 "./readstat_sav_parse_mr_name.c" +#line 470 "src/spss/readstat_sav_parse_mr_name.c" } } @@ -506,7 +510,7 @@ readstat_error_t parse_mr_string(const char *line, mr_set_t **mr_sets, size_t *n _out: {} } -#line 229 "./readstat_sav_parse_mr_name.rl" +#line 229 "src/spss/readstat_sav_parse_mr_name.rl" if (cs < 4 || p != pe) { retval = READSTAT_ERROR_BAD_MR_STRING; diff --git a/src/spss/readstat_sav_parse_mr_name.rl b/src/spss/readstat_sav_parse_mr_name.rl index 8b609e2..49fc93d 100644 --- a/src/spss/readstat_sav_parse_mr_name.rl +++ b/src/spss/readstat_sav_parse_mr_name.rl @@ -115,7 +115,7 @@ end = (space | '\0'); # subvar token terminator subvariable = (nc+ end >extract_subvar); - main := name type counted_value label subvariable+; + main := name type counted_value label (subvariable+ | end*); write data nofinal noerror; }%% From 124050159975861005dc13db44be811f133f6b95 Mon Sep 17 00:00:00 2001 From: Julian Sikorski Date: Mon, 18 May 2026 14:15:15 +0200 Subject: [PATCH 3/7] Disregard SAS and SPSS format width and precision when identifying date, datetime or time variables (#332) * Disregard SAS and SPSS format width and precision when identifying date, datetime or time variables --- pyreadstat/_readstat_parser.pyx | 79 ++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/pyreadstat/_readstat_parser.pyx b/pyreadstat/_readstat_parser.pyx index 00be028..12dd1e3 100644 --- a/pyreadstat/_readstat_parser.pyx +++ b/pyreadstat/_readstat_parser.pyx @@ -29,6 +29,7 @@ import datetime import os import warnings import sys +import re import narwhals.stable.v2 as nw import numpy as np @@ -42,27 +43,27 @@ import_datetime() cdef object unix_origin = datetime_new(1970, 1, 1, 0, 0, 0, 0, None) -cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "DATE9", "YYMMDD10", - "DDMMYYB", "DDMMYYB10", "DDMMYYC", "DDMMYYC10", "DDMMYYD", "DDMMYYD10", - "DDMMYYN6", "DDMMYYN8", "DDMMYYP", "DDMMYYP10", "DDMMYYS", "DDMMYYS10", - "MMDDYYB", "MMDDYYB10", "MMDDYYC", "MMDDYYC10", "MMDDYYD", "MMDDYYD10", - "MMDDYYN6", "MMDDYYN8", "MMDDYYP", "MMDDYYP10", "MMDDYYS", "MMDDYYS10", +cdef object format_regex = re.compile(r"^([A-Z][A-Z0-9]+[A-Z])(\d+)?(?(2)(?:\.\d+)?$|$)") +cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "YYMMDD", + "DDMMYYB", "DDMMYYC", "DDMMYYD", + "DDMMYYN", "DDMMYYP", "DDMMYYS", + "MMDDYYB", "MMDDYYC", "MMDDYYD", + "MMDDYYN", "MMDDYYP", "MMDDYYS", #"MONNAME", "MONTH", "WEEKDAY", "QTR", "QTRR", "YEAR","DAY", "DOWNAME" # these do not print as full dates in sas "WEEKDATX", "DTDATE", "IS8601DA", "E8601DA", "B8601DA", - "YYMMDDB", "YYMMDDD", "YYMMDDN", "YYMMDDP", "YYMMDDS",] -cdef list sas_datetime_formats = ["DATETIME", "DATETIME18", "DATETIME19", "DATETIME20", "DATETIME21", "DATETIME22", - "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] -cdef list sas_time_formats = ["TIME", "HHMM", "TIME20.3", "TIME20", "TIME5", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM", ] + "YYMMDDB", "YYMMDDD", "YYMMDDN", "YYMMDDP", "YYMMDDS"] +cdef list sas_datetime_formats = ["DATETIME", "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] +cdef list sas_time_formats = ["TIME", "HHMM", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM"] # "HOUR" # these do not print as full time formats in sas #cdef list sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats cdef list sas_all_formats cdef object sas_origin = datetime_new(1960, 1, 1, 0, 0, 0, 0, None) cdef object sas_secs_from_unix = total_seconds(unix_origin - sas_origin) -cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] -cdef list spss_date_formats = ["DATE",'DATE8','DATE11', 'DATE12', "ADATE","ADATE8", "ADATE10", "EDATE", 'EDATE8','EDATE10', "JDATE", "JDATE5", "JDATE7", "SDATE", "SDATE8", "SDATE10",] -cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] +cdef list spss_datetime_formats = ["DATETIME", "YMDHMS"] +cdef list spss_date_formats = ["DATE", "ADATE", "EDATE", "JDATE", "SDATE"] +cdef list spss_time_formats = ["TIME", "DTIME"] #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats cdef list spss_all_formats cdef object spss_origin = datetime_new(1582, 10, 14, 0, 0, 0, 0, None) @@ -148,26 +149,32 @@ cdef py_datetime_format transform_variable_format(str var_format, py_file_format Transforms a readstat var_format to a date, datetime or time format label """ if file_format == FILE_FORMAT_SAS: - if var_format in sas_all_formats: - if var_format in sas_date_formats: - return DATE_FORMAT_DATE - elif var_format in sas_datetime_formats: - return DATE_FORMAT_DATETIME - elif var_format in sas_time_formats: - return DATE_FORMAT_TIME - else: - return DATE_FORMAT_NOTADATE + if var_format: + format_match = format_regex.match(var_format) + if format_match: + var_format_name = format_match.group(1) + if var_format_name in sas_all_formats: + if var_format_name in sas_date_formats: + return DATE_FORMAT_DATE + elif var_format_name in sas_datetime_formats: + return DATE_FORMAT_DATETIME + elif var_format_name in sas_time_formats: + return DATE_FORMAT_TIME + return DATE_FORMAT_NOTADATE elif file_format == FILE_FORMAT_SPSS: - if var_format in spss_all_formats: - if var_format in spss_date_formats: - return DATE_FORMAT_DATE - elif var_format in spss_datetime_formats: - return DATE_FORMAT_DATETIME - elif var_format in spss_time_formats: - return DATE_FORMAT_TIME - else: - return DATE_FORMAT_NOTADATE + if var_format: + format_match = format_regex.match(var_format) + if format_match: + var_format_name = format_match.group(1) + if var_format_name in spss_all_formats: + if var_format_name in spss_date_formats: + return DATE_FORMAT_DATE + elif var_format_name in spss_datetime_formats: + return DATE_FORMAT_DATETIME + elif var_format_name in spss_time_formats: + return DATE_FORMAT_TIME + return DATE_FORMAT_NOTADATE elif file_format == FILE_FORMAT_STATA: if var_format in stata_all_formats: @@ -1267,27 +1274,27 @@ cdef object run_conversion(object filename_path, py_file_format file_format, py_ if extra_date_formats is not None: if file_format == FILE_FORMAT_SAS: - sas_date_formats.extend(extra_date_formats) + sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) elif file_format == FILE_FORMAT_SPSS: - spss_date_formats.extend(extra_date_formats) + spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) elif file_format == FILE_FORMAT_STATA: stata_date_formats.extend(extra_date_formats) else: raise PyreadstatError("Unknown file format") if extra_datetime_formats is not None: if file_format == FILE_FORMAT_SAS: - sas_datetime_formats.extend(extra_datetime_formats) + sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) elif file_format == FILE_FORMAT_SPSS: - spss_datetime_formats.extend(extra_datetime_formats) + spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) elif file_format == FILE_FORMAT_STATA: stata_datetime_formats.extend(extra_datetime_formats) else: raise PyreadstatError("Unknown file format") if extra_time_formats is not None: if file_format == FILE_FORMAT_SAS: - sas_time_formats.extend(extra_time_formats) + sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) elif file_format == FILE_FORMAT_SPSS: - spss_time_formats.extend(extra_time_formats) + spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) elif file_format == FILE_FORMAT_STATA: stata_time_formats.extend(extra_time_formats) else: From 7b9017645944e853876244fa85cc67e9c21973bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henning=20P=C3=B6ttker?= <25299532+hpoettker@users.noreply.github.com> Date: Mon, 18 May 2026 20:08:14 +0200 Subject: [PATCH 4/7] Upgrade GitHub actions (#333) --- .github/actions/windows_actions/action.yml | 6 +++--- .github/workflows/ci.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/windows_actions/action.yml b/.github/actions/windows_actions/action.yml index ef9529f..ca83950 100644 --- a/.github/actions/windows_actions/action.yml +++ b/.github/actions/windows_actions/action.yml @@ -5,7 +5,7 @@ runs: using: "composite" steps: - name: Checkout libiconv - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: kiyolee/libiconv-win-build ref: dff1030d222ba934e0f4a9cdab9c34134f072f68 # v1.18 @@ -13,7 +13,7 @@ runs: persist-credentials: false - name: Checkout zlib - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: kiyolee/zlib-win-build ref: 30623e05e64fe4b97f2073ddaf8d3ba0e99d7249 @@ -21,7 +21,7 @@ runs: persist-credentials: false - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 + uses: microsoft/setup-msbuild@v3 - name: Build libiconv run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f922e77..c25c2fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.13" From 3cfc6eea9a6f9e64949d0eecf7fd63347426a78d Mon Sep 17 00:00:00 2001 From: Julian Sikorski Date: Tue, 19 May 2026 12:06:58 +0200 Subject: [PATCH 5/7] Retain up to microsecond precision when importing sas7bdat files (#330) * Read fractions of seconds from SAS datasets * Add a test for a SAS file with fractional seconds time * Prevent rounding errors when processing datetime to polars Datetime values in SAS, SPSS and STATA are stored as a floating point number. Any operation risks introducing a rounding error. Use integer math in order to preserve original interpretation. --- pyreadstat/_readstat_parser.pyx | 23 +++-- test_data/basic/fractional_seconds.csv | 101 ++++++++++++++++++++ test_data/basic/fractional_seconds.sas7bdat | Bin 0 -> 131072 bytes tests/test_narwhalified.py | 22 ++++- 4 files changed, 139 insertions(+), 7 deletions(-) create mode 100755 test_data/basic/fractional_seconds.csv create mode 100755 test_data/basic/fractional_seconds.sas7bdat diff --git a/pyreadstat/_readstat_parser.pyx b/pyreadstat/_readstat_parser.pyx index 12dd1e3..802fd4c 100644 --- a/pyreadstat/_readstat_parser.pyx +++ b/pyreadstat/_readstat_parser.pyx @@ -233,13 +233,13 @@ cdef object transform_datetime(py_datetime_format var_format, double tstamp, py_ return mydat.date() elif var_format == DATE_FORMAT_DATETIME: if output_format == "polars": - # we want to return seconds from unix + # we want to return timestamp in seconds if file_format == FILE_FORMAT_STATA: # tstamp is in millisecons - return (tstamp/1000) - unix_to_origin_secs + return (tstamp/1000) else: # tstamp in seconds - return tstamp - unix_to_origin_secs + return tstamp if file_format == FILE_FORMAT_STATA: # tstamp is in millisecons @@ -253,7 +253,8 @@ cdef object transform_datetime(py_datetime_format var_format, double tstamp, py_ # tstamp in seconds days = (floor(tstamp / 86400)) secs = (tstamp % 86400) - tdelta = timedelta_new(days, secs, 0) + usecs = (round(tstamp % 1 * 1e6)) + tdelta = timedelta_new(days, secs, usecs) #tdelta = timedelta(seconds=tstamp) mydat = origin + tdelta return mydat @@ -270,7 +271,8 @@ cdef object transform_datetime(py_datetime_format var_format, double tstamp, py_ # tstamp in seconds days = (floor(tstamp / 86400)) secs = (tstamp % 86400) - tdelta = timedelta_new(days, secs, 0) + usecs = (round(tstamp % 1 * 1e6)) + tdelta = timedelta_new(days, secs, usecs) #tdelta = timedelta(seconds=tstamp) mydat = origin + tdelta return mydat.time() @@ -1105,7 +1107,16 @@ cdef object dict_to_dataframe(object dict_data, data_container dc): if var_format == DATE_FORMAT_DATE: date_cols.append(column) if datetime_cols: - data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) + data_frame = data_frame.with_columns( + [ + pl.from_epoch( + (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( + pl.col(c).floor() * 1e6).cast(pl.Int64) - ( + pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), + time_unit='us') + for c in datetime_cols if data_frame[c].len() > 0 + ] + ) if date_cols: data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) diff --git a/test_data/basic/fractional_seconds.csv b/test_data/basic/fractional_seconds.csv new file mode 100755 index 0000000..512d867 --- /dev/null +++ b/test_data/basic/fractional_seconds.csv @@ -0,0 +1,101 @@ +date,dtime,time +1993-06-10,1993-06-10T02:04:01.122463,02:04:01.122463 +2147-07-18,2147-07-18T02:16:02.883684,02:16:02.883684 +1739-04-22,1739-04-22T13:32:08.170115,13:32:08.170115 +2187-12-07,2187-12-07T15:41:41.567238,15:41:41.567238 +2278-04-20,2278-04-20T12:41:18.331215,12:41:18.331215 +2181-09-03,2181-09-03T16:20:48.795826,16:20:48.795826 +1992-01-21,1992-01-21T04:27:25.154369,04:27:25.154369 +1829-09-11,1829-09-11T10:47:37.282617,10:47:37.282618 +2294-10-29,2294-10-29T14:41:18.574982,14:41:18.574982 +1920-04-17,1920-04-17T16:31:07.566722,16:31:07.566723 +1868-07-28,1868-07-28T06:16:21.620745,06:16:21.620745 +2208-03-23,2208-03-23T05:13:20.026692,05:13:20.026692 +1929-05-15,1929-05-15T18:58:37.253180,18:58:37.253180 +1998-08-26,1998-08-26T02:03:58.743517,02:03:58.743517 +2122-11-24,2122-11-24T23:01:29.367663,23:01:29.367663 +1854-08-25,1854-08-25T01:56:49.077793,01:56:49.077793 +1936-01-09,1936-01-09T15:41:42.922773,15:41:42.922773 +1967-11-09,1967-11-09T15:23:02.071943,15:23:02.071943 +1703-11-02,1703-11-02T14:27:03.782796,14:27:03.782796 +1750-11-28,1750-11-28T08:52:49.219013,08:52:49.219013 +1734-07-09,1734-07-09T23:47:14.951282,23:47:14.951282 +2157-07-31,2157-07-31T21:52:15.157284,21:52:15.157284 +1950-01-07,1950-01-07T14:53:48.730921,14:53:48.730921 +1930-05-11,1930-05-11T03:24:48.220010,03:24:48.220011 +1772-06-29,1772-06-29T11:31:57.032263,11:31:57.032263 +2207-11-02,2207-11-02T16:23:11.818488,16:23:11.818488 +2275-05-17,2275-05-17T19:13:17.300388,19:13:17.300388 +1720-01-04,1720-01-04T17:34:54.322509,17:34:54.322509 +2273-01-24,2273-01-24T14:14:38.193558,14:14:38.193558 +1834-11-01,1834-11-01T06:04:17.738995,06:04:17.738995 +2266-10-02,2266-10-02T10:05:04.330017,10:05:04.330017 +1983-11-26,1983-11-26T12:30:57.127726,12:30:57.127726 +1967-11-22,1967-11-22T19:10:31.922508,19:10:31.922508 +1772-12-29,1772-12-29T17:17:40.509609,17:17:40.509609 +1920-08-05,1920-08-05T09:14:58.541695,09:14:58.541695 +2237-04-05,2237-04-05T11:10:54.366266,11:10:54.366266 +2285-04-22,2285-04-22T07:20:52.103394,07:20:52.103394 +1790-03-02,1790-03-02T11:20:35.978824,11:20:35.978824 +2222-09-28,2222-09-28T23:32:00.371672,23:32:00.371672 +2020-06-02,2020-06-02T11:24:03.381682,11:24:03.381682 +1942-09-06,1942-09-06T22:41:22.091431,22:41:22.091431 +1734-04-01,1734-04-01T02:06:18.583556,02:06:18.583556 +1710-04-28,1710-04-28T10:05:23.561800,10:05:23.561800 +1920-02-28,1920-02-28T14:46:28.076923,14:46:28.076923 +2059-01-28,2059-01-28T10:47:03.890320,10:47:03.890320 +1739-04-24,1739-04-24T22:59:28.010889,22:59:28.010889 +1911-07-10,1911-07-10T08:28:09.542829,08:28:09.542830 +2044-05-13,2044-05-13T15:42:33.791598,15:42:33.791598 +2281-02-02,2281-02-02T05:26:26.257008,05:26:26.257008 +1968-03-27,1968-03-27T22:34:47.154648,22:34:47.154648 +2237-11-09,2237-11-09T06:38:59.895151,06:38:59.895151 +1891-11-11,1891-11-11T03:51:21.527200,03:51:21.527201 +1769-05-08,1769-05-08T22:58:51.374555,22:58:51.374555 +2011-02-23,2011-02-23T20:37:24.734829,20:37:24.734829 +2211-07-10,2211-07-10T05:06:31.123780,05:06:31.123780 +2033-03-22,2033-03-22T06:28:12.726483,06:28:12.726483 +1824-10-31,1824-10-31T20:41:51.630083,20:41:51.630083 +1742-04-02,1742-04-02T22:15:15.392728,22:15:15.392728 +2286-01-29,2286-01-29T13:07:02.468262,13:07:02.468262 +1884-03-12,1884-03-12T07:45:14.166535,07:45:14.166534 +2096-04-26,2096-04-26T22:00:08.409092,22:00:08.409092 +1923-12-02,1923-12-02T13:15:39.641922,13:15:39.641922 +1723-06-12,1723-06-12T16:43:33.592489,16:43:33.592489 +2134-11-18,2134-11-18T06:18:01.839232,06:18:01.839232 +2269-02-20,2269-02-20T00:25:17.618843,00:25:17.618843 +1854-04-22,1854-04-22T05:25:48.059167,05:25:48.059166 +1968-07-13,1968-07-13T22:57:57.493756,22:57:57.493756 +1977-01-08,1977-01-08T09:30:29.495407,09:30:29.495407 +2010-12-19,2010-12-19T11:18:26.461924,11:18:26.461924 +2163-09-13,2163-09-13T18:33:24.278122,18:33:24.278122 +1730-01-15,1730-01-15T21:39:25.275543,21:39:25.275543 +1978-09-24,1978-09-24T23:11:39.162304,23:11:39.162304 +2224-02-08,2224-02-08T15:45:01.422703,15:45:01.422703 +1787-02-04,1787-02-04T11:01:01.320380,11:01:01.320380 +1964-01-18,1964-01-18T06:23:14.746125,06:23:14.746125 +1788-12-09,1788-12-09T09:30:16.346816,09:30:16.346816 +2290-09-07,2290-09-07T01:57:16.982105,01:57:16.982105 +2035-02-14,2035-02-14T23:34:56.107008,23:34:56.107008 +1905-02-18,1905-02-18T19:29:49.899169,19:29:49.899170 +2219-10-01,2219-10-01T20:28:45.250220,20:28:45.250220 +1781-08-02,1781-08-02T22:07:25.500849,22:07:25.500849 +1820-07-20,1820-07-20T13:07:18.717742,13:07:18.717742 +2171-03-31,2171-03-31T13:50:34.930294,13:50:34.930294 +2148-06-30,2148-06-30T07:32:48.692223,07:32:48.692223 +2093-03-04,2093-03-04T14:22:35.691149,14:22:35.691149 +2219-01-17,2219-01-17T20:32:47.025956,20:32:47.025956 +2032-06-27,2032-06-27T02:51:01.604809,02:51:01.604809 +1894-04-03,1894-04-03T00:15:54.122685,00:15:54.122684 +1960-02-06,1960-02-06T14:44:53.032016,14:44:53.032016 +1955-10-09,1955-10-09T18:14:44.323325,18:14:44.323324 +2195-06-21,2195-06-21T22:32:46.631441,22:32:46.631441 +1919-12-11,1919-12-11T19:11:02.762172,19:11:02.762173 +1741-05-21,1741-05-21T18:16:05.399772,18:16:05.399772 +1971-10-11,1971-10-11T00:14:23.048366,00:14:23.048366 +1810-04-22,1810-04-22T13:43:24.608671,13:43:24.608671 +2198-05-30,2198-05-30T12:31:55.632376,12:31:55.632376 +1774-04-27,1774-04-27T07:31:02.189986,07:31:02.189986 +2205-05-18,2205-05-18T10:39:57.032547,10:39:57.032547 +1875-08-15,1875-08-15T16:15:21.807336,16:15:21.807335 +2074-07-21,2074-07-21T08:35:02.723811,08:35:02.723811 diff --git a/test_data/basic/fractional_seconds.sas7bdat b/test_data/basic/fractional_seconds.sas7bdat new file mode 100755 index 0000000000000000000000000000000000000000..981a8a00eaa24006329db5aa61eb33ed1b315853 GIT binary patch literal 131072 zcmeI!c~n)^9tZGq0TB@t<7UnbnW#B{C_!oMbCa9_0dYtZ#7GeYmCO-AjT{q2LtQyl zT27#VC@8THDWV{gf(Xjw0HGrDbT9DEaIcuF*X#Z9-s+F-6morA%GR;UX ztc&RqR(*00bZa0SG_<0uX=z z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV= z5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHaf zKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_ z009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz z00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_< z0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb z2tWV=5P$##AOHafKmY;|fB*y_@DCSAPl?{7nWFLqA8Gk9UHQ(mjbVyq(iu4)8>ovO zsTjsmoe$t+e<9BwPvqla>ez^nZPoE3Wk>!TACDIDd|UTQJn^+yIIq5i5Hd``by9d{ zm)?XG8EljFmDwge5{QttjH@Dh-X4)W$e@8`X7#r#Elm{jRcCAImy%n1)w|S@MaHwk;!<1K1rC{mqP}}7=8YDpi0g^vM^0YQQVg(mI&gE^6EW{}wU)$O zHprdVy@mDex#+9jSDuM^rZAbzOA2#KdncV$bQYovF>gAqjNYotjn(?Gl3P?Zy6ceU zQfZumRuXz3z<*|hwj%BX@ygEnUCal$q|rO^eRpP_&gLH2?>ArG<+(JDLoqEdpE{&2 z@G-Y-?4nfz-sEqwlNkMuN-uF^HUbGAwv ze@`k&*%$ftyx*xc(n}j3c$!@+ z=k7O*t1$MsERElnqhY062cFuI%*j9e^qU82H^%z}xtKHXjNi9sS=~jSPD|34JdfUO zpr==Fx?{~~7Ue7E_3U1*7 zR2Ng}ySe7vr1u-ykKgAb+gfQp>(0=5rQq|^jWYiblrN_2vDUyzRrr&uadHQ?RQ`y}FQIro0#`6+(0a>RQ7IZ9IeLtx5s9zc_be&i5%QxBFSsFTHx}sPd-!iU=^slU$_SRHJ!8>0{{rRDE zU#(U`Zy$}9n`kR63T20NbMA?GI;oN-xY3!$jkVnF3n9)Ms-$}A+ekjE>Evktu#LUt z#z&FTdNDh5$Qs|gz1tVxXZ_wyu<_BCoSE25v~@~d!>mb^8$Ks!rCGJKj_zi4lsoBW z)3&vRThRTv=e~o|{tW%Nffj0AU)^O+D>tw03#&*Z-YUbovf?&iM(5!DBVF=M28(#ctLvf|L}%G6xW zSwB8uLGlB!KIpANa?RClT<_e6thFm29g_AlJ*Faay1fx|tVl}{6Opw%)bzGk&jkHU zbVoRLyWASVdX4a3y*y8PuFT{nVn4)Wi_r{5v0;hD_uNwlR|nlO5d_;3$p5 z^s1*rzdkYb%?u@%vi@{^l$Z3~BbG172H!(*#=GiRfAf|LUk;MyUlpn(3u}EmZ@#Og z@QZ6XzdANtyl>FGQtHq*Fec_+IhSPVena~$^}5XZg`|1~){i$l$7-MVc`|dPdVfy3 zL^do=Jm{fC*|O{N^CM%W_ks@3CPPCHxvy%x%MQLPPjM(#zZXMmh~|;YA zQhx`6>!^G9yC!?|lw5xDkwtg(q~~Sg;)zG{-kdiNb1adk?T=a@-M4s0BU$)cuEhj{ zcDDbrl#sKL(!OGHD`{NO(5w)bI_}1|JISee>ihNzCsul@$=g>PX8qpSL?Z(v2O3;S zm#tV+-`2N|d#|v6@2(fr^Iz9W<`k4IQTb^r#$EbgiE^Fv-4064C*S*M%hOMmuoF5t z#LD8;4ts7>oq&*l*tC0Gvz+lPG_Mvt{f9J?GUkqj^;Z79j(o!0X_xXrSubda$|AzP zxsHn&w?;c}nR=fTmQ%CMd;MY-R&ge8{MwjnB&{#Wts(15Ben(SG_hlzHC~-Jqg))n zD!q!#GVZFMH@JcQAQ{O!uxDpc~M} zM&&wrS9O#2EmLrh?4J{@FzZ^vo;u{=eM|qUI1X8HmsY;Bs@kujkgHBeWR;ma#XQ3( z$eG@~H%FOIWCtwyMEBS;X?$kjembQhCSpa#5zhU_jA8a&r1d53b!0)GigVvZDB0v< zk3JQd>iry+M#F3!M>OVSbLmd^t$gmQ_d{SU-Fook0n_MaZh*^IpSyLF^31Jsa>bR^wSl(=QBI?E5)? zt#s`AvKP`~&UKoUYWJhPA! zdO=r+g`qS(zg1rD6+SJtmOsfg|4B|$|G(@T_@>zrjeOg##W05I8}_g?*Ae#6E9=Ma zB&i8`sZMxOhVkS#C;tdy6BGZiKj|saoBr;UgeT$|#5EM&IpNqq-TSF~@%`ZAzt{9$ rc_-x3dnR6JAjbV($^6xLI{Zvz>bI<;Zt2UVtm)q$$Z< literal 0 HcmV?d00001 diff --git a/tests/test_narwhalified.py b/tests/test_narwhalified.py index 9721a1d..01cfb0c 100644 --- a/tests/test_narwhalified.py +++ b/tests/test_narwhalified.py @@ -171,6 +171,22 @@ def _prepare_data(self): self.df_sas_dates = df_dates2.to_native() #schema = {"date": nw.Date, "dtime": nw.Datetime("ns"), "time": nw.Time()} self.df_sas_dates2 = nw.concat([df_dates2, nw.from_dict({"date":[None], "dtime":[None], "time":[None]}, backend=backend)]).to_native() #, schema=schema + + # datetime and time variables with fractional seconds as well as unusual date, time and datetime formats + sas_fractional_seconds = os.path.join(self.basic_data_folder, "fractional_seconds.csv") + if backend == "polars": + kwds["try_parse_dates"] = True + df_fractional_seconds_raw = nw.read_csv(sas_fractional_seconds,backend=backend, **kwds) + df_fractional_seconds1 = df_fractional_seconds_raw.clone() + df_fractional_seconds1 = df_fractional_seconds1.to_native() + if backend == "pandas": + df_fractional_seconds1["date"] = pd.to_datetime(df_fractional_seconds1["date"]) + df_fractional_seconds1["date"] = df_fractional_seconds1["date"].apply(lambda x: x.date()) + df_fractional_seconds1["dtime"] = pd.to_datetime(df_fractional_seconds1["dtime"]) + df_fractional_seconds1["time"] = pd.to_datetime(df_fractional_seconds1["time"], format='%H:%M:%S.%f') + df_fractional_seconds1["time"] = df_fractional_seconds1["time"].apply(lambda x: x.time()) + self.df_sas_fractional_seconds = df_fractional_seconds1 + # character column with nan and object column with nan (object pyreadstat writer doesn't know what to do with) if backend == "pandas": self.df_charnan = pd.DataFrame([[0,np.nan,np.nan],[1,"test", timedelta]], columns = ["integer", "string", "object"]) @@ -574,7 +590,11 @@ def test_sas_dates_as_pandas(self): sas_file = os.path.join(self.basic_data_folder, "dates.sas7bdat") df_sas, meta = pyreadstat.read_sas7bdat(sas_file, dates_as_pandas_datetime=True, output_format=self.backend) self.assertTrue(df_sas.equals(self.df_sas_dates_as_pandas)) - + + def test_sas_fractional_seconds(self): + sas_file = os.path.join(self.basic_data_folder, "fractional_seconds.sas7bdat") + df_sas, meta = pyreadstat.read_sas7bdat(sas_file, output_format=self.backend) + self.assertTrue(df_sas.equals(self.df_sas_fractional_seconds)) def test_sas_user_missing(self): From 2c764bd3a4e7e229636530db1df451ba613b2f4d Mon Sep 17 00:00:00 2001 From: Otto Fajardo Date: Tue, 19 May 2026 12:18:47 +0200 Subject: [PATCH 6/7] updating changelog [ci skip] --- change_log.md | 8 +- pyreadstat/_readstat_parser.c | 6256 +++++++++++++++++++-------------- 2 files changed, 3612 insertions(+), 2652 deletions(-) diff --git a/change_log.md b/change_log.md index 35be2ba..684866c 100644 --- a/change_log.md +++ b/change_log.md @@ -1,8 +1,10 @@ -# 1.3.5 (github, pypi and conda 2026.05.xx) +# 1.3.5 (github, pypi and conda 2026.05.19) * Readstat sources updated to commit 3add3a5eaac6df24d938beffb9148792e362d9ef +* date, datetime and time formats are now used without precision, decreasing the + need to add new formats manually to the list +* Reading up to microseconds for datetime - -# 1.3.4 (github, pypi and conda 2026.05.15) +# 1.3.4 (github, pypi and conda 2026.04.15) * Refactored pyreadstat.pyx to pyreadstat.py solves #299 * Added env variable PYREADSTAT_LINK_ICONV to link iconv at compiling time * Adding typing annotations solves #299 diff --git a/pyreadstat/_readstat_parser.c b/pyreadstat/_readstat_parser.c index d9a0063..dd4d4e2 100644 --- a/pyreadstat/_readstat_parser.c +++ b/pyreadstat/_readstat_parser.c @@ -1740,7 +1740,7 @@ enum __pyx_t_10pyreadstat_16_readstat_parser_py_variable_format { }; typedef enum __pyx_t_10pyreadstat_16_readstat_parser_py_variable_format __pyx_t_10pyreadstat_16_readstat_parser_py_variable_format; -/* "pyreadstat/_readstat_parser.pyx":907 +/* "pyreadstat/_readstat_parser.pyx":916 * * * cdef void run_readstat_parser(char * filename, data_container data, py_file_extension file_extension, long row_limit, long row_offset, object file_obj=None) except *: # <<<<<<<<<<<<<< @@ -2148,6 +2148,13 @@ static CYTHON_INLINE int __Pyx_ParseKeywords( int ignore_unknown_kwargs ); +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); @@ -2157,13 +2164,6 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s /* ModFloat[double].proto */ static CYTHON_INLINE double __Pyx_mod_double(double, double, int b_is_constant); -/* PyObjectFastCallMethod.proto */ -#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 -#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) -#else -static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); -#endif - /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ @@ -2442,6 +2442,21 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2)) +#endif + /* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) @@ -2475,13 +2490,6 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) #endif -/* ObjectGetItem.proto */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); -#else -#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) -#endif - /* HasAttr.proto */ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) @@ -3004,6 +3012,7 @@ static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_stata_origin = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_unix_origin = 0; +static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_format_regex = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix = 0; static PyObject *__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix = 0; @@ -3036,6 +3045,7 @@ int __pyx_module_is_main_pyreadstat___readstat_parser = 0; /* Implementation of "pyreadstat._readstat_parser" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_object; +static PyObject *__pyx_builtin_round; static PyObject *__pyx_builtin_all; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_zip; @@ -3082,8 +3092,8 @@ typedef struct { PyObject *__pyx_slice[1]; PyObject *__pyx_tuple[1]; PyObject *__pyx_codeobj_tab[3]; - PyObject *__pyx_string_tab[324]; - PyObject *__pyx_number_tab[3]; + PyObject *__pyx_string_tab[295]; + PyObject *__pyx_number_tab[4]; /* #### Code section: module_state_contents ### */ /* CommonTypesMetaclass.module_state_decls */ PyTypeObject *__pyx_CommonTypesMetaclassType; @@ -3125,7 +3135,7 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #endif /* #### Code section: constant_name_defines ### */ #define __pyx_kp_u_ __pyx_string_tab[0] -#define __pyx_kp_u_DATETIME23_2 __pyx_string_tab[1] +#define __pyx_kp_u_A_Z_A_Z0_9_A_Z_d_2_d __pyx_string_tab[1] #define __pyx_kp_u_Failed_convert_C_to_python_value __pyx_string_tab[2] #define __pyx_kp_u_Failed_to_read_number_of_variabl __pyx_string_tab[3] #define __pyx_kp_u_File_0_does_not_exist __pyx_string_tab[4] @@ -3135,322 +3145,294 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_u_None __pyx_string_tab[8] #define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[9] #define __pyx_kp_u_STRING_type_with_value __pyx_string_tab[10] -#define __pyx_kp_u_TIME11_2 __pyx_string_tab[11] -#define __pyx_kp_u_TIME20_3 __pyx_string_tab[12] -#define __pyx_kp_u_Unknown_file_format __pyx_string_tab[13] -#define __pyx_kp_u_Unkown_data_type __pyx_string_tab[14] -#define __pyx_kp_u_YMDHMS19_2 __pyx_string_tab[15] -#define __pyx_kp_u_You_requested_pandas_as_output_f __pyx_string_tab[16] -#define __pyx_kp_u_You_requested_polars_as_output_f __pyx_string_tab[17] -#define __pyx_kp_u__2 __pyx_string_tab[18] -#define __pyx_kp_u__3 __pyx_string_tab[19] -#define __pyx_kp_u__4 __pyx_string_tab[20] -#define __pyx_kp_u_add_note __pyx_string_tab[21] -#define __pyx_kp_u_column_0_is_duplicated_renamed_t __pyx_string_tab[22] -#define __pyx_kp_u_d_2 __pyx_string_tab[23] -#define __pyx_kp_u_disable __pyx_string_tab[24] -#define __pyx_kp_u_enable __pyx_string_tab[25] -#define __pyx_kp_u_file_path_could_not_be_encoded_w __pyx_string_tab[26] -#define __pyx_kp_u_gc __pyx_string_tab[27] -#define __pyx_kp_u_isenabled __pyx_string_tab[28] -#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[29] -#define __pyx_kp_u_output_format_must_be_one_of_all __pyx_string_tab[30] -#define __pyx_kp_u_path_must_be_either_str_or_bytes __pyx_string_tab[31] -#define __pyx_kp_u_path_must_be_str_bytes_or_unicod __pyx_string_tab[32] -#define __pyx_kp_u_pyreadstat__readstat_parser_pyx __pyx_string_tab[33] -#define __pyx_kp_u_pyreadstat_collections __pyx_string_tab[34] -#define __pyx_kp_u_pyreadstat_datetime __pyx_string_tab[35] -#define __pyx_kp_u_pyreadstat_narwhals_stable_v2 __pyx_string_tab[36] -#define __pyx_kp_u_pyreadstat_numpy __pyx_string_tab[37] -#define __pyx_kp_u_pyreadstat_os __pyx_string_tab[38] -#define __pyx_kp_u_pyreadstat_pandas __pyx_string_tab[39] -#define __pyx_kp_u_pyreadstat_polars __pyx_string_tab[40] -#define __pyx_kp_u_pyreadstat_pyclasses __pyx_string_tab[41] -#define __pyx_kp_u_pyreadstat_sys __pyx_string_tab[42] -#define __pyx_kp_u_pyreadstat_warnings __pyx_string_tab[43] -#define __pyx_kp_u_sav_zsav __pyx_string_tab[44] -#define __pyx_kp_u_stringsource __pyx_string_tab[45] -#define __pyx_kp_u_tC __pyx_string_tab[46] -#define __pyx_kp_u_tc __pyx_string_tab[47] -#define __pyx_kp_u_tcHH_MM __pyx_string_tab[48] -#define __pyx_kp_u_tcHH_MM_SS __pyx_string_tab[49] -#define __pyx_kp_u_td __pyx_string_tab[50] -#define __pyx_kp_u_tdCCYY_NN_DD __pyx_string_tab[51] -#define __pyx_kp_u_tdD_m_Y __pyx_string_tab[52] -#define __pyx_kp_u_utf_8 __pyx_string_tab[53] -#define __pyx_kp_u_with_date_type_in_column __pyx_string_tab[54] -#define __pyx_kp_u_wrong_parser_format __pyx_string_tab[55] -#define __pyx_n_u_ADATE __pyx_string_tab[56] -#define __pyx_n_u_ADATE10 __pyx_string_tab[57] -#define __pyx_n_u_ADATE8 __pyx_string_tab[58] -#define __pyx_n_u_B8601DA __pyx_string_tab[59] -#define __pyx_n_u_B8601DN __pyx_string_tab[60] -#define __pyx_n_u_B8601DT __pyx_string_tab[61] -#define __pyx_n_u_B8601TM __pyx_string_tab[62] -#define __pyx_n_u_DATE __pyx_string_tab[63] -#define __pyx_n_u_DATE11 __pyx_string_tab[64] -#define __pyx_n_u_DATE12 __pyx_string_tab[65] -#define __pyx_n_u_DATE8 __pyx_string_tab[66] -#define __pyx_n_u_DATE9 __pyx_string_tab[67] -#define __pyx_n_u_DATEAMPM __pyx_string_tab[68] -#define __pyx_n_u_DATETIME __pyx_string_tab[69] -#define __pyx_n_u_DATETIME17 __pyx_string_tab[70] -#define __pyx_n_u_DATETIME18 __pyx_string_tab[71] -#define __pyx_n_u_DATETIME19 __pyx_string_tab[72] -#define __pyx_n_u_DATETIME20 __pyx_string_tab[73] -#define __pyx_n_u_DATETIME21 __pyx_string_tab[74] -#define __pyx_n_u_DATETIME22 __pyx_string_tab[75] -#define __pyx_n_u_DATETIME8 __pyx_string_tab[76] -#define __pyx_n_u_DDMMYY __pyx_string_tab[77] -#define __pyx_n_u_DDMMYYB __pyx_string_tab[78] -#define __pyx_n_u_DDMMYYB10 __pyx_string_tab[79] -#define __pyx_n_u_DDMMYYC __pyx_string_tab[80] -#define __pyx_n_u_DDMMYYC10 __pyx_string_tab[81] -#define __pyx_n_u_DDMMYYD __pyx_string_tab[82] -#define __pyx_n_u_DDMMYYD10 __pyx_string_tab[83] -#define __pyx_n_u_DDMMYYN6 __pyx_string_tab[84] -#define __pyx_n_u_DDMMYYN8 __pyx_string_tab[85] -#define __pyx_n_u_DDMMYYP __pyx_string_tab[86] -#define __pyx_n_u_DDMMYYP10 __pyx_string_tab[87] -#define __pyx_n_u_DDMMYYS __pyx_string_tab[88] -#define __pyx_n_u_DDMMYYS10 __pyx_string_tab[89] -#define __pyx_n_u_DTDATE __pyx_string_tab[90] -#define __pyx_n_u_DTIME __pyx_string_tab[91] -#define __pyx_n_u_E8601DA __pyx_string_tab[92] -#define __pyx_n_u_E8601DT __pyx_string_tab[93] -#define __pyx_n_u_E8601TM __pyx_string_tab[94] -#define __pyx_n_u_EDATE __pyx_string_tab[95] -#define __pyx_n_u_EDATE10 __pyx_string_tab[96] -#define __pyx_n_u_EDATE8 __pyx_string_tab[97] -#define __pyx_n_u_HHMM __pyx_string_tab[98] -#define __pyx_n_u_IS8601DA __pyx_string_tab[99] -#define __pyx_n_u_IS8601DT __pyx_string_tab[100] -#define __pyx_n_u_IS8601TM __pyx_string_tab[101] -#define __pyx_n_u_JDATE __pyx_string_tab[102] -#define __pyx_n_u_JDATE5 __pyx_string_tab[103] -#define __pyx_n_u_JDATE7 __pyx_string_tab[104] -#define __pyx_n_u_MDYAMPM __pyx_string_tab[105] -#define __pyx_n_u_MMDDYY __pyx_string_tab[106] -#define __pyx_n_u_MMDDYYB __pyx_string_tab[107] -#define __pyx_n_u_MMDDYYB10 __pyx_string_tab[108] -#define __pyx_n_u_MMDDYYC __pyx_string_tab[109] -#define __pyx_n_u_MMDDYYC10 __pyx_string_tab[110] -#define __pyx_n_u_MMDDYYD __pyx_string_tab[111] -#define __pyx_n_u_MMDDYYD10 __pyx_string_tab[112] -#define __pyx_n_u_MMDDYYN6 __pyx_string_tab[113] -#define __pyx_n_u_MMDDYYN8 __pyx_string_tab[114] -#define __pyx_n_u_MMDDYYP __pyx_string_tab[115] -#define __pyx_n_u_MMDDYYP10 __pyx_string_tab[116] -#define __pyx_n_u_MMDDYYS __pyx_string_tab[117] -#define __pyx_n_u_MMDDYYS10 __pyx_string_tab[118] -#define __pyx_n_u_Object __pyx_string_tab[119] -#define __pyx_n_u_OrderedDict __pyx_string_tab[120] -#define __pyx_n_u_PyreadstatError __pyx_string_tab[121] -#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[122] -#define __pyx_n_u_ReadstatError __pyx_string_tab[123] -#define __pyx_n_u_SDATE __pyx_string_tab[124] -#define __pyx_n_u_SDATE10 __pyx_string_tab[125] -#define __pyx_n_u_SDATE8 __pyx_string_tab[126] -#define __pyx_n_u_TIME __pyx_string_tab[127] -#define __pyx_n_u_TIME20 __pyx_string_tab[128] -#define __pyx_n_u_TIME5 __pyx_string_tab[129] -#define __pyx_n_u_TIME8 __pyx_string_tab[130] -#define __pyx_n_u_TIMEAMPM __pyx_string_tab[131] -#define __pyx_n_u_TOD __pyx_string_tab[132] -#define __pyx_n_u_WEEKDATE __pyx_string_tab[133] -#define __pyx_n_u_WEEKDATX __pyx_string_tab[134] -#define __pyx_n_u_YMDHMS16 __pyx_string_tab[135] -#define __pyx_n_u_YMDHMS19 __pyx_string_tab[136] -#define __pyx_n_u_YMDHMS20 __pyx_string_tab[137] -#define __pyx_n_u_YYMMDD __pyx_string_tab[138] -#define __pyx_n_u_YYMMDD10 __pyx_string_tab[139] -#define __pyx_n_u_YYMMDDB __pyx_string_tab[140] -#define __pyx_n_u_YYMMDDD __pyx_string_tab[141] -#define __pyx_n_u_YYMMDDN __pyx_string_tab[142] -#define __pyx_n_u_YYMMDDP __pyx_string_tab[143] -#define __pyx_n_u_YYMMDDS __pyx_string_tab[144] -#define __pyx_n_u_all __pyx_string_tab[145] -#define __pyx_n_u_allowed_formats __pyx_string_tab[146] -#define __pyx_n_u_append __pyx_string_tab[147] -#define __pyx_n_u_astype __pyx_string_tab[148] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[149] -#define __pyx_n_u_backend __pyx_string_tab[150] -#define __pyx_n_u_center __pyx_string_tab[151] -#define __pyx_n_u_class_getitem __pyx_string_tab[152] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[153] -#define __pyx_n_u_col __pyx_string_tab[154] -#define __pyx_n_u_collections __pyx_string_tab[155] -#define __pyx_n_u_column_labels __pyx_string_tab[156] -#define __pyx_n_u_column_names __pyx_string_tab[157] -#define __pyx_n_u_column_names_to_labels __pyx_string_tab[158] -#define __pyx_n_u_columns __pyx_string_tab[159] -#define __pyx_n_u_copy __pyx_string_tab[160] -#define __pyx_n_u_counted_value __pyx_string_tab[161] -#define __pyx_n_u_creation_time __pyx_string_tab[162] -#define __pyx_n_u_d __pyx_string_tab[163] -#define __pyx_n_u_data_container __pyx_string_tab[164] -#define __pyx_n_u_data_container___reduce_cython __pyx_string_tab[165] -#define __pyx_n_u_data_container___setstate_cython __pyx_string_tab[166] -#define __pyx_n_u_data_frame __pyx_string_tab[167] -#define __pyx_n_u_date __pyx_string_tab[168] -#define __pyx_n_u_dates_as_pandas __pyx_string_tab[169] -#define __pyx_n_u_dates_as_pandas_datetime __pyx_string_tab[170] -#define __pyx_n_u_datetime __pyx_string_tab[171] -#define __pyx_n_u_dict __pyx_string_tab[172] -#define __pyx_n_u_disable_datetime_conversion __pyx_string_tab[173] -#define __pyx_n_u_doc __pyx_string_tab[174] -#define __pyx_n_u_double __pyx_string_tab[175] -#define __pyx_n_u_dta __pyx_string_tab[176] -#define __pyx_n_u_dtype __pyx_string_tab[177] -#define __pyx_n_u_dtypes __pyx_string_tab[178] -#define __pyx_n_u_duplicated __pyx_string_tab[179] -#define __pyx_n_u_empty __pyx_string_tab[180] -#define __pyx_n_u_encode __pyx_string_tab[181] -#define __pyx_n_u_encoding __pyx_string_tab[182] -#define __pyx_n_u_enumerate __pyx_string_tab[183] -#define __pyx_n_u_expanduser __pyx_string_tab[184] -#define __pyx_n_u_extend __pyx_string_tab[185] -#define __pyx_n_u_extra_date_formats __pyx_string_tab[186] -#define __pyx_n_u_extra_datetime_formats __pyx_string_tab[187] -#define __pyx_n_u_extra_time_formats __pyx_string_tab[188] -#define __pyx_n_u_file_encoding __pyx_string_tab[189] -#define __pyx_n_u_file_extension __pyx_string_tab[190] -#define __pyx_n_u_file_format __pyx_string_tab[191] -#define __pyx_n_u_file_label __pyx_string_tab[192] -#define __pyx_n_u_filename_path __pyx_string_tab[193] -#define __pyx_n_u_fill __pyx_string_tab[194] -#define __pyx_n_u_float __pyx_string_tab[195] -#define __pyx_n_u_float64 __pyx_string_tab[196] -#define __pyx_n_u_format __pyx_string_tab[197] -#define __pyx_n_u_formats_as_category __pyx_string_tab[198] -#define __pyx_n_u_formats_as_ordered_category __pyx_string_tab[199] -#define __pyx_n_u_from_dict __pyx_string_tab[200] -#define __pyx_n_u_from_epoch __pyx_string_tab[201] -#define __pyx_n_u_fromtimestamp __pyx_string_tab[202] -#define __pyx_n_u_fsdecode __pyx_string_tab[203] -#define __pyx_n_u_fsencode __pyx_string_tab[204] -#define __pyx_n_u_func __pyx_string_tab[205] -#define __pyx_n_u_get __pyx_string_tab[206] -#define __pyx_n_u_get_native_namespace __pyx_string_tab[207] -#define __pyx_n_u_getfilesystemencoding __pyx_string_tab[208] -#define __pyx_n_u_getstate __pyx_string_tab[209] -#define __pyx_n_u_hi __pyx_string_tab[210] -#define __pyx_n_u_int16 __pyx_string_tab[211] -#define __pyx_n_u_int32 __pyx_string_tab[212] -#define __pyx_n_u_int64 __pyx_string_tab[213] -#define __pyx_n_u_int8 __pyx_string_tab[214] -#define __pyx_n_u_is_coroutine __pyx_string_tab[215] -#define __pyx_n_u_is_dichotomy __pyx_string_tab[216] -#define __pyx_n_u_isfile __pyx_string_tab[217] -#define __pyx_n_u_items __pyx_string_tab[218] -#define __pyx_n_u_keys __pyx_string_tab[219] -#define __pyx_n_u_label __pyx_string_tab[220] -#define __pyx_n_u_left __pyx_string_tab[221] -#define __pyx_n_u_lo __pyx_string_tab[222] -#define __pyx_n_u_loc __pyx_string_tab[223] -#define __pyx_n_u_main __pyx_string_tab[224] -#define __pyx_n_u_metaclass __pyx_string_tab[225] -#define __pyx_n_u_metadata __pyx_string_tab[226] -#define __pyx_n_u_metadata_container __pyx_string_tab[227] -#define __pyx_n_u_metadataonly __pyx_string_tab[228] -#define __pyx_n_u_metaonly __pyx_string_tab[229] -#define __pyx_n_u_missing_ranges __pyx_string_tab[230] -#define __pyx_n_u_missing_user_values __pyx_string_tab[231] -#define __pyx_n_u_modification_time __pyx_string_tab[232] -#define __pyx_n_u_module __pyx_string_tab[233] -#define __pyx_n_u_mr_sets __pyx_string_tab[234] -#define __pyx_n_u_mro_entries __pyx_string_tab[235] -#define __pyx_n_u_name __pyx_string_tab[236] -#define __pyx_n_u_name_2 __pyx_string_tab[237] -#define __pyx_n_u_nan __pyx_string_tab[238] -#define __pyx_n_u_narwhals_stable_v2 __pyx_string_tab[239] -#define __pyx_n_u_no_datetime_conversion __pyx_string_tab[240] -#define __pyx_n_u_nominal __pyx_string_tab[241] -#define __pyx_n_u_notes __pyx_string_tab[242] -#define __pyx_n_u_np __pyx_string_tab[243] -#define __pyx_n_u_nt __pyx_string_tab[244] -#define __pyx_n_u_number_columns __pyx_string_tab[245] -#define __pyx_n_u_number_rows __pyx_string_tab[246] -#define __pyx_n_u_numpy __pyx_string_tab[247] -#define __pyx_n_u_nw __pyx_string_tab[248] -#define __pyx_n_u_object __pyx_string_tab[249] -#define __pyx_n_u_ordinal __pyx_string_tab[250] -#define __pyx_n_u_original_variable_types __pyx_string_tab[251] -#define __pyx_n_u_os __pyx_string_tab[252] -#define __pyx_n_u_output_format __pyx_string_tab[253] -#define __pyx_n_u_pandas __pyx_string_tab[254] -#define __pyx_n_u_parser_entry_point __pyx_string_tab[255] -#define __pyx_n_u_parser_format __pyx_string_tab[256] -#define __pyx_n_u_path __pyx_string_tab[257] -#define __pyx_n_u_polars __pyx_string_tab[258] -#define __pyx_n_u_pop __pyx_string_tab[259] -#define __pyx_n_u_por __pyx_string_tab[260] -#define __pyx_n_u_prepare __pyx_string_tab[261] -#define __pyx_n_u_pyclasses __pyx_string_tab[262] -#define __pyx_n_u_pyreadstat__readstat_parser __pyx_string_tab[263] -#define __pyx_n_u_pyx_capi __pyx_string_tab[264] -#define __pyx_n_u_pyx_state __pyx_string_tab[265] -#define __pyx_n_u_qualname __pyx_string_tab[266] -#define __pyx_n_u_read __pyx_string_tab[267] -#define __pyx_n_u_readstat_variable_types __pyx_string_tab[268] -#define __pyx_n_u_reduce __pyx_string_tab[269] -#define __pyx_n_u_reduce_cython __pyx_string_tab[270] -#define __pyx_n_u_reduce_ex __pyx_string_tab[271] -#define __pyx_n_u_right __pyx_string_tab[272] -#define __pyx_n_u_row_limit __pyx_string_tab[273] -#define __pyx_n_u_row_offset __pyx_string_tab[274] -#define __pyx_n_u_s __pyx_string_tab[275] -#define __pyx_n_u_sas7bcat __pyx_string_tab[276] -#define __pyx_n_u_sas7bdat __pyx_string_tab[277] -#define __pyx_n_u_scale __pyx_string_tab[278] -#define __pyx_n_u_schema __pyx_string_tab[279] -#define __pyx_n_u_seek __pyx_string_tab[280] -#define __pyx_n_u_self __pyx_string_tab[281] -#define __pyx_n_u_set_name __pyx_string_tab[282] -#define __pyx_n_u_setdefault __pyx_string_tab[283] -#define __pyx_n_u_setstate __pyx_string_tab[284] -#define __pyx_n_u_setstate_cython __pyx_string_tab[285] -#define __pyx_n_u_stable __pyx_string_tab[286] -#define __pyx_n_u_string __pyx_string_tab[287] -#define __pyx_n_u_surrogateescape __pyx_string_tab[288] -#define __pyx_n_u_sys __pyx_string_tab[289] -#define __pyx_n_u_table_name __pyx_string_tab[290] -#define __pyx_n_u_tell __pyx_string_tab[291] -#define __pyx_n_u_test __pyx_string_tab[292] -#define __pyx_n_u_time __pyx_string_tab[293] -#define __pyx_n_u_time_unit __pyx_string_tab[294] -#define __pyx_n_u_to_datetime __pyx_string_tab[295] -#define __pyx_n_u_to_native __pyx_string_tab[296] -#define __pyx_n_u_tolist __pyx_string_tab[297] -#define __pyx_n_u_type __pyx_string_tab[298] -#define __pyx_n_u_undetermined __pyx_string_tab[299] -#define __pyx_n_u_unknown __pyx_string_tab[300] -#define __pyx_n_u_usecols __pyx_string_tab[301] -#define __pyx_n_u_user_missing __pyx_string_tab[302] -#define __pyx_n_u_usernan __pyx_string_tab[303] -#define __pyx_n_u_v2 __pyx_string_tab[304] -#define __pyx_n_u_value_labels __pyx_string_tab[305] -#define __pyx_n_u_values __pyx_string_tab[306] -#define __pyx_n_u_variable_alignment __pyx_string_tab[307] -#define __pyx_n_u_variable_display_width __pyx_string_tab[308] -#define __pyx_n_u_variable_list __pyx_string_tab[309] -#define __pyx_n_u_variable_measure __pyx_string_tab[310] -#define __pyx_n_u_variable_storage_width __pyx_string_tab[311] -#define __pyx_n_u_variable_to_label __pyx_string_tab[312] -#define __pyx_n_u_variable_value_labels __pyx_string_tab[313] -#define __pyx_n_u_warn __pyx_string_tab[314] -#define __pyx_n_u_warnings __pyx_string_tab[315] -#define __pyx_n_u_with_columns __pyx_string_tab[316] -#define __pyx_n_u_xport __pyx_string_tab[317] -#define __pyx_n_u_zip __pyx_string_tab[318] -#define __pyx_kp_b_ __pyx_string_tab[319] -#define __pyx_kp_b_PyObject_PyObject___pyx_t_10pyre __pyx_string_tab[320] -#define __pyx_kp_b_PyObject_readstat_to_numpy_types __pyx_string_tab[321] -#define __pyx_kp_b_iso88591_Q __pyx_string_tab[322] -#define __pyx_kp_b_iso88591_a_1_JJ_ppq_00AASSkkl_1_S_a_s_a __pyx_string_tab[323] -#define __pyx_int_0 __pyx_number_tab[0] -#define __pyx_int_1 __pyx_number_tab[1] -#define __pyx_int_100000 __pyx_number_tab[2] +#define __pyx_kp_u_Unknown_file_format __pyx_string_tab[11] +#define __pyx_kp_u_Unkown_data_type __pyx_string_tab[12] +#define __pyx_kp_u_You_requested_pandas_as_output_f __pyx_string_tab[13] +#define __pyx_kp_u_You_requested_polars_as_output_f __pyx_string_tab[14] +#define __pyx_kp_u__2 __pyx_string_tab[15] +#define __pyx_kp_u__3 __pyx_string_tab[16] +#define __pyx_kp_u__4 __pyx_string_tab[17] +#define __pyx_kp_u_add_note __pyx_string_tab[18] +#define __pyx_kp_u_column_0_is_duplicated_renamed_t __pyx_string_tab[19] +#define __pyx_kp_u_d_2 __pyx_string_tab[20] +#define __pyx_kp_u_disable __pyx_string_tab[21] +#define __pyx_kp_u_enable __pyx_string_tab[22] +#define __pyx_kp_u_file_path_could_not_be_encoded_w __pyx_string_tab[23] +#define __pyx_kp_u_gc __pyx_string_tab[24] +#define __pyx_kp_u_isenabled __pyx_string_tab[25] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[26] +#define __pyx_kp_u_output_format_must_be_one_of_all __pyx_string_tab[27] +#define __pyx_kp_u_path_must_be_either_str_or_bytes __pyx_string_tab[28] +#define __pyx_kp_u_path_must_be_str_bytes_or_unicod __pyx_string_tab[29] +#define __pyx_kp_u_pyreadstat__readstat_parser_pyx __pyx_string_tab[30] +#define __pyx_kp_u_pyreadstat_collections __pyx_string_tab[31] +#define __pyx_kp_u_pyreadstat_datetime __pyx_string_tab[32] +#define __pyx_kp_u_pyreadstat_narwhals_stable_v2 __pyx_string_tab[33] +#define __pyx_kp_u_pyreadstat_numpy __pyx_string_tab[34] +#define __pyx_kp_u_pyreadstat_os __pyx_string_tab[35] +#define __pyx_kp_u_pyreadstat_pandas __pyx_string_tab[36] +#define __pyx_kp_u_pyreadstat_polars __pyx_string_tab[37] +#define __pyx_kp_u_pyreadstat_pyclasses __pyx_string_tab[38] +#define __pyx_kp_u_pyreadstat_re __pyx_string_tab[39] +#define __pyx_kp_u_pyreadstat_sys __pyx_string_tab[40] +#define __pyx_kp_u_pyreadstat_warnings __pyx_string_tab[41] +#define __pyx_kp_u_sav_zsav __pyx_string_tab[42] +#define __pyx_kp_u_stringsource __pyx_string_tab[43] +#define __pyx_kp_u_tC __pyx_string_tab[44] +#define __pyx_kp_u_tc __pyx_string_tab[45] +#define __pyx_kp_u_tcHH_MM __pyx_string_tab[46] +#define __pyx_kp_u_tcHH_MM_SS __pyx_string_tab[47] +#define __pyx_kp_u_td __pyx_string_tab[48] +#define __pyx_kp_u_tdCCYY_NN_DD __pyx_string_tab[49] +#define __pyx_kp_u_tdD_m_Y __pyx_string_tab[50] +#define __pyx_kp_u_utf_8 __pyx_string_tab[51] +#define __pyx_kp_u_with_date_type_in_column __pyx_string_tab[52] +#define __pyx_kp_u_wrong_parser_format __pyx_string_tab[53] +#define __pyx_n_u_ADATE __pyx_string_tab[54] +#define __pyx_n_u_B8601DA __pyx_string_tab[55] +#define __pyx_n_u_B8601DN __pyx_string_tab[56] +#define __pyx_n_u_B8601DT __pyx_string_tab[57] +#define __pyx_n_u_B8601TM __pyx_string_tab[58] +#define __pyx_n_u_DATE __pyx_string_tab[59] +#define __pyx_n_u_DATEAMPM __pyx_string_tab[60] +#define __pyx_n_u_DATETIME __pyx_string_tab[61] +#define __pyx_n_u_DDMMYY __pyx_string_tab[62] +#define __pyx_n_u_DDMMYYB __pyx_string_tab[63] +#define __pyx_n_u_DDMMYYC __pyx_string_tab[64] +#define __pyx_n_u_DDMMYYD __pyx_string_tab[65] +#define __pyx_n_u_DDMMYYN __pyx_string_tab[66] +#define __pyx_n_u_DDMMYYP __pyx_string_tab[67] +#define __pyx_n_u_DDMMYYS __pyx_string_tab[68] +#define __pyx_n_u_DTDATE __pyx_string_tab[69] +#define __pyx_n_u_DTIME __pyx_string_tab[70] +#define __pyx_n_u_E8601DA __pyx_string_tab[71] +#define __pyx_n_u_E8601DT __pyx_string_tab[72] +#define __pyx_n_u_E8601TM __pyx_string_tab[73] +#define __pyx_n_u_EDATE __pyx_string_tab[74] +#define __pyx_n_u_HHMM __pyx_string_tab[75] +#define __pyx_n_u_IS8601DA __pyx_string_tab[76] +#define __pyx_n_u_IS8601DT __pyx_string_tab[77] +#define __pyx_n_u_IS8601TM __pyx_string_tab[78] +#define __pyx_n_u_Int64 __pyx_string_tab[79] +#define __pyx_n_u_JDATE __pyx_string_tab[80] +#define __pyx_n_u_MDYAMPM __pyx_string_tab[81] +#define __pyx_n_u_MMDDYY __pyx_string_tab[82] +#define __pyx_n_u_MMDDYYB __pyx_string_tab[83] +#define __pyx_n_u_MMDDYYC __pyx_string_tab[84] +#define __pyx_n_u_MMDDYYD __pyx_string_tab[85] +#define __pyx_n_u_MMDDYYN __pyx_string_tab[86] +#define __pyx_n_u_MMDDYYP __pyx_string_tab[87] +#define __pyx_n_u_MMDDYYS __pyx_string_tab[88] +#define __pyx_n_u_Object __pyx_string_tab[89] +#define __pyx_n_u_OrderedDict __pyx_string_tab[90] +#define __pyx_n_u_PyreadstatError __pyx_string_tab[91] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[92] +#define __pyx_n_u_ReadstatError __pyx_string_tab[93] +#define __pyx_n_u_SDATE __pyx_string_tab[94] +#define __pyx_n_u_TIME __pyx_string_tab[95] +#define __pyx_n_u_TIMEAMPM __pyx_string_tab[96] +#define __pyx_n_u_TOD __pyx_string_tab[97] +#define __pyx_n_u_WEEKDATE __pyx_string_tab[98] +#define __pyx_n_u_WEEKDATX __pyx_string_tab[99] +#define __pyx_n_u_YMDHMS __pyx_string_tab[100] +#define __pyx_n_u_YYMMDD __pyx_string_tab[101] +#define __pyx_n_u_YYMMDDB __pyx_string_tab[102] +#define __pyx_n_u_YYMMDDD __pyx_string_tab[103] +#define __pyx_n_u_YYMMDDN __pyx_string_tab[104] +#define __pyx_n_u_YYMMDDP __pyx_string_tab[105] +#define __pyx_n_u_YYMMDDS __pyx_string_tab[106] +#define __pyx_n_u_all __pyx_string_tab[107] +#define __pyx_n_u_allowed_formats __pyx_string_tab[108] +#define __pyx_n_u_append __pyx_string_tab[109] +#define __pyx_n_u_astype __pyx_string_tab[110] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[111] +#define __pyx_n_u_backend __pyx_string_tab[112] +#define __pyx_n_u_cast __pyx_string_tab[113] +#define __pyx_n_u_center __pyx_string_tab[114] +#define __pyx_n_u_class_getitem __pyx_string_tab[115] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[116] +#define __pyx_n_u_col __pyx_string_tab[117] +#define __pyx_n_u_collections __pyx_string_tab[118] +#define __pyx_n_u_column_labels __pyx_string_tab[119] +#define __pyx_n_u_column_names __pyx_string_tab[120] +#define __pyx_n_u_column_names_to_labels __pyx_string_tab[121] +#define __pyx_n_u_columns __pyx_string_tab[122] +#define __pyx_n_u_compile __pyx_string_tab[123] +#define __pyx_n_u_copy __pyx_string_tab[124] +#define __pyx_n_u_counted_value __pyx_string_tab[125] +#define __pyx_n_u_creation_time __pyx_string_tab[126] +#define __pyx_n_u_d __pyx_string_tab[127] +#define __pyx_n_u_data_container __pyx_string_tab[128] +#define __pyx_n_u_data_container___reduce_cython __pyx_string_tab[129] +#define __pyx_n_u_data_container___setstate_cython __pyx_string_tab[130] +#define __pyx_n_u_data_frame __pyx_string_tab[131] +#define __pyx_n_u_date __pyx_string_tab[132] +#define __pyx_n_u_dates_as_pandas __pyx_string_tab[133] +#define __pyx_n_u_dates_as_pandas_datetime __pyx_string_tab[134] +#define __pyx_n_u_datetime __pyx_string_tab[135] +#define __pyx_n_u_dict __pyx_string_tab[136] +#define __pyx_n_u_disable_datetime_conversion __pyx_string_tab[137] +#define __pyx_n_u_doc __pyx_string_tab[138] +#define __pyx_n_u_double __pyx_string_tab[139] +#define __pyx_n_u_dta __pyx_string_tab[140] +#define __pyx_n_u_dtype __pyx_string_tab[141] +#define __pyx_n_u_dtypes __pyx_string_tab[142] +#define __pyx_n_u_duplicated __pyx_string_tab[143] +#define __pyx_n_u_empty __pyx_string_tab[144] +#define __pyx_n_u_encode __pyx_string_tab[145] +#define __pyx_n_u_encoding __pyx_string_tab[146] +#define __pyx_n_u_enumerate __pyx_string_tab[147] +#define __pyx_n_u_expanduser __pyx_string_tab[148] +#define __pyx_n_u_extend __pyx_string_tab[149] +#define __pyx_n_u_extra_date_formats __pyx_string_tab[150] +#define __pyx_n_u_extra_datetime_formats __pyx_string_tab[151] +#define __pyx_n_u_extra_time_formats __pyx_string_tab[152] +#define __pyx_n_u_file_encoding __pyx_string_tab[153] +#define __pyx_n_u_file_extension __pyx_string_tab[154] +#define __pyx_n_u_file_format __pyx_string_tab[155] +#define __pyx_n_u_file_label __pyx_string_tab[156] +#define __pyx_n_u_filename_path __pyx_string_tab[157] +#define __pyx_n_u_fill __pyx_string_tab[158] +#define __pyx_n_u_float __pyx_string_tab[159] +#define __pyx_n_u_float64 __pyx_string_tab[160] +#define __pyx_n_u_floor __pyx_string_tab[161] +#define __pyx_n_u_format __pyx_string_tab[162] +#define __pyx_n_u_formats_as_category __pyx_string_tab[163] +#define __pyx_n_u_formats_as_ordered_category __pyx_string_tab[164] +#define __pyx_n_u_from_dict __pyx_string_tab[165] +#define __pyx_n_u_from_epoch __pyx_string_tab[166] +#define __pyx_n_u_fromtimestamp __pyx_string_tab[167] +#define __pyx_n_u_fsdecode __pyx_string_tab[168] +#define __pyx_n_u_fsencode __pyx_string_tab[169] +#define __pyx_n_u_func __pyx_string_tab[170] +#define __pyx_n_u_get __pyx_string_tab[171] +#define __pyx_n_u_get_native_namespace __pyx_string_tab[172] +#define __pyx_n_u_getfilesystemencoding __pyx_string_tab[173] +#define __pyx_n_u_getstate __pyx_string_tab[174] +#define __pyx_n_u_group __pyx_string_tab[175] +#define __pyx_n_u_hi __pyx_string_tab[176] +#define __pyx_n_u_int16 __pyx_string_tab[177] +#define __pyx_n_u_int32 __pyx_string_tab[178] +#define __pyx_n_u_int64 __pyx_string_tab[179] +#define __pyx_n_u_int8 __pyx_string_tab[180] +#define __pyx_n_u_is_coroutine __pyx_string_tab[181] +#define __pyx_n_u_is_dichotomy __pyx_string_tab[182] +#define __pyx_n_u_isfile __pyx_string_tab[183] +#define __pyx_n_u_items __pyx_string_tab[184] +#define __pyx_n_u_keys __pyx_string_tab[185] +#define __pyx_n_u_label __pyx_string_tab[186] +#define __pyx_n_u_left __pyx_string_tab[187] +#define __pyx_n_u_len __pyx_string_tab[188] +#define __pyx_n_u_lit __pyx_string_tab[189] +#define __pyx_n_u_lo __pyx_string_tab[190] +#define __pyx_n_u_loc __pyx_string_tab[191] +#define __pyx_n_u_main __pyx_string_tab[192] +#define __pyx_n_u_match __pyx_string_tab[193] +#define __pyx_n_u_metaclass __pyx_string_tab[194] +#define __pyx_n_u_metadata __pyx_string_tab[195] +#define __pyx_n_u_metadata_container __pyx_string_tab[196] +#define __pyx_n_u_metadataonly __pyx_string_tab[197] +#define __pyx_n_u_metaonly __pyx_string_tab[198] +#define __pyx_n_u_missing_ranges __pyx_string_tab[199] +#define __pyx_n_u_missing_user_values __pyx_string_tab[200] +#define __pyx_n_u_modification_time __pyx_string_tab[201] +#define __pyx_n_u_module __pyx_string_tab[202] +#define __pyx_n_u_mr_sets __pyx_string_tab[203] +#define __pyx_n_u_mro_entries __pyx_string_tab[204] +#define __pyx_n_u_name __pyx_string_tab[205] +#define __pyx_n_u_name_2 __pyx_string_tab[206] +#define __pyx_n_u_nan __pyx_string_tab[207] +#define __pyx_n_u_narwhals_stable_v2 __pyx_string_tab[208] +#define __pyx_n_u_no_datetime_conversion __pyx_string_tab[209] +#define __pyx_n_u_nominal __pyx_string_tab[210] +#define __pyx_n_u_notes __pyx_string_tab[211] +#define __pyx_n_u_np __pyx_string_tab[212] +#define __pyx_n_u_nt __pyx_string_tab[213] +#define __pyx_n_u_number_columns __pyx_string_tab[214] +#define __pyx_n_u_number_rows __pyx_string_tab[215] +#define __pyx_n_u_numpy __pyx_string_tab[216] +#define __pyx_n_u_nw __pyx_string_tab[217] +#define __pyx_n_u_object __pyx_string_tab[218] +#define __pyx_n_u_ordinal __pyx_string_tab[219] +#define __pyx_n_u_original_variable_types __pyx_string_tab[220] +#define __pyx_n_u_os __pyx_string_tab[221] +#define __pyx_n_u_output_format __pyx_string_tab[222] +#define __pyx_n_u_pandas __pyx_string_tab[223] +#define __pyx_n_u_parser_entry_point __pyx_string_tab[224] +#define __pyx_n_u_parser_format __pyx_string_tab[225] +#define __pyx_n_u_path __pyx_string_tab[226] +#define __pyx_n_u_polars __pyx_string_tab[227] +#define __pyx_n_u_pop __pyx_string_tab[228] +#define __pyx_n_u_por __pyx_string_tab[229] +#define __pyx_n_u_prepare __pyx_string_tab[230] +#define __pyx_n_u_pyclasses __pyx_string_tab[231] +#define __pyx_n_u_pyreadstat__readstat_parser __pyx_string_tab[232] +#define __pyx_n_u_pyx_capi __pyx_string_tab[233] +#define __pyx_n_u_pyx_state __pyx_string_tab[234] +#define __pyx_n_u_qualname __pyx_string_tab[235] +#define __pyx_n_u_re __pyx_string_tab[236] +#define __pyx_n_u_read __pyx_string_tab[237] +#define __pyx_n_u_readstat_variable_types __pyx_string_tab[238] +#define __pyx_n_u_reduce __pyx_string_tab[239] +#define __pyx_n_u_reduce_cython __pyx_string_tab[240] +#define __pyx_n_u_reduce_ex __pyx_string_tab[241] +#define __pyx_n_u_right __pyx_string_tab[242] +#define __pyx_n_u_round __pyx_string_tab[243] +#define __pyx_n_u_row_limit __pyx_string_tab[244] +#define __pyx_n_u_row_offset __pyx_string_tab[245] +#define __pyx_n_u_sas7bcat __pyx_string_tab[246] +#define __pyx_n_u_sas7bdat __pyx_string_tab[247] +#define __pyx_n_u_scale __pyx_string_tab[248] +#define __pyx_n_u_schema __pyx_string_tab[249] +#define __pyx_n_u_seek __pyx_string_tab[250] +#define __pyx_n_u_self __pyx_string_tab[251] +#define __pyx_n_u_set_name __pyx_string_tab[252] +#define __pyx_n_u_setdefault __pyx_string_tab[253] +#define __pyx_n_u_setstate __pyx_string_tab[254] +#define __pyx_n_u_setstate_cython __pyx_string_tab[255] +#define __pyx_n_u_stable __pyx_string_tab[256] +#define __pyx_n_u_string __pyx_string_tab[257] +#define __pyx_n_u_surrogateescape __pyx_string_tab[258] +#define __pyx_n_u_sys __pyx_string_tab[259] +#define __pyx_n_u_table_name __pyx_string_tab[260] +#define __pyx_n_u_tell __pyx_string_tab[261] +#define __pyx_n_u_test __pyx_string_tab[262] +#define __pyx_n_u_time __pyx_string_tab[263] +#define __pyx_n_u_time_unit __pyx_string_tab[264] +#define __pyx_n_u_to_datetime __pyx_string_tab[265] +#define __pyx_n_u_to_native __pyx_string_tab[266] +#define __pyx_n_u_tolist __pyx_string_tab[267] +#define __pyx_n_u_type __pyx_string_tab[268] +#define __pyx_n_u_undetermined __pyx_string_tab[269] +#define __pyx_n_u_unknown __pyx_string_tab[270] +#define __pyx_n_u_us __pyx_string_tab[271] +#define __pyx_n_u_usecols __pyx_string_tab[272] +#define __pyx_n_u_user_missing __pyx_string_tab[273] +#define __pyx_n_u_usernan __pyx_string_tab[274] +#define __pyx_n_u_v2 __pyx_string_tab[275] +#define __pyx_n_u_value_labels __pyx_string_tab[276] +#define __pyx_n_u_values __pyx_string_tab[277] +#define __pyx_n_u_variable_alignment __pyx_string_tab[278] +#define __pyx_n_u_variable_display_width __pyx_string_tab[279] +#define __pyx_n_u_variable_list __pyx_string_tab[280] +#define __pyx_n_u_variable_measure __pyx_string_tab[281] +#define __pyx_n_u_variable_storage_width __pyx_string_tab[282] +#define __pyx_n_u_variable_to_label __pyx_string_tab[283] +#define __pyx_n_u_variable_value_labels __pyx_string_tab[284] +#define __pyx_n_u_warn __pyx_string_tab[285] +#define __pyx_n_u_warnings __pyx_string_tab[286] +#define __pyx_n_u_with_columns __pyx_string_tab[287] +#define __pyx_n_u_xport __pyx_string_tab[288] +#define __pyx_n_u_zip __pyx_string_tab[289] +#define __pyx_kp_b_ __pyx_string_tab[290] +#define __pyx_kp_b_PyObject_PyObject___pyx_t_10pyre __pyx_string_tab[291] +#define __pyx_kp_b_PyObject_readstat_to_numpy_types __pyx_string_tab[292] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[293] +#define __pyx_kp_b_iso88591_a_1_JJ_ppq_00AASSkkl_1_S_a_s_a __pyx_string_tab[294] +#define __pyx_float_1e6 __pyx_number_tab[0] +#define __pyx_int_0 __pyx_number_tab[1] +#define __pyx_int_1 __pyx_number_tab[2] +#define __pyx_int_100000 __pyx_number_tab[3] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -3476,8 +3458,8 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<324; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } - for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } + for (int i=0; i<295; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); @@ -3511,8 +3493,8 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<324; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } - for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } + for (int i=0; i<295; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); @@ -5549,7 +5531,7 @@ static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_ return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":89 +/* "pyreadstat/_readstat_parser.pyx":90 * """ * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -5591,7 +5573,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pyreadstat/_readstat_parser.pyx":90 + /* "pyreadstat/_readstat_parser.pyx":91 * * def __cinit__(self): * self.n_obs = 0 # <<<<<<<<<<<<<< @@ -5600,7 +5582,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->n_obs = 0; - /* "pyreadstat/_readstat_parser.pyx":91 + /* "pyreadstat/_readstat_parser.pyx":92 * def __cinit__(self): * self.n_obs = 0 * self.n_vars = 0 # <<<<<<<<<<<<<< @@ -5609,7 +5591,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->n_vars = 0; - /* "pyreadstat/_readstat_parser.pyx":92 + /* "pyreadstat/_readstat_parser.pyx":93 * self.n_obs = 0 * self.n_vars = 0 * self.max_n_obs = 0 # <<<<<<<<<<<<<< @@ -5618,14 +5600,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->max_n_obs = 0; - /* "pyreadstat/_readstat_parser.pyx":93 + /* "pyreadstat/_readstat_parser.pyx":94 * self.n_vars = 0 * self.max_n_obs = 0 * self.col_data = list() # <<<<<<<<<<<<<< * self.col_data_len = list() * self.col_names = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_data); @@ -5633,14 +5615,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_data = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":94 + /* "pyreadstat/_readstat_parser.pyx":95 * self.max_n_obs = 0 * self.col_data = list() * self.col_data_len = list() # <<<<<<<<<<<<<< * self.col_names = list() * self.col_labels = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_data_len); @@ -5648,14 +5630,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_data_len = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":95 + /* "pyreadstat/_readstat_parser.pyx":96 * self.col_data = list() * self.col_data_len = list() * self.col_names = list() # <<<<<<<<<<<<<< * self.col_labels = list() * self.col_dtypes = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_names); @@ -5663,14 +5645,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":96 + /* "pyreadstat/_readstat_parser.pyx":97 * self.col_data_len = list() * self.col_names = list() * self.col_labels = list() # <<<<<<<<<<<<<< * self.col_dtypes = list() * self.col_numpy_dtypes = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_labels); @@ -5678,14 +5660,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_labels = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":97 + /* "pyreadstat/_readstat_parser.pyx":98 * self.col_names = list() * self.col_labels = list() * self.col_dtypes = list() # <<<<<<<<<<<<<< * self.col_numpy_dtypes = list() * self.col_dtypes_isobject = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_dtypes); @@ -5693,14 +5675,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_dtypes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":98 + /* "pyreadstat/_readstat_parser.pyx":99 * self.col_labels = list() * self.col_dtypes = list() * self.col_numpy_dtypes = list() # <<<<<<<<<<<<<< * self.col_dtypes_isobject = list() * self.col_dytpes_isfloat = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_numpy_dtypes); @@ -5708,14 +5690,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_numpy_dtypes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":99 + /* "pyreadstat/_readstat_parser.pyx":100 * self.col_dtypes = list() * self.col_numpy_dtypes = list() * self.col_dtypes_isobject = list() # <<<<<<<<<<<<<< * self.col_dytpes_isfloat = list() * self.col_formats = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_dtypes_isobject); @@ -5723,14 +5705,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_dtypes_isobject = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":100 + /* "pyreadstat/_readstat_parser.pyx":101 * self.col_numpy_dtypes = list() * self.col_dtypes_isobject = list() * self.col_dytpes_isfloat = list() # <<<<<<<<<<<<<< * self.col_formats = list() * self.col_formats_original = list() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_dytpes_isfloat); @@ -5738,14 +5720,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_dytpes_isfloat = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":101 + /* "pyreadstat/_readstat_parser.pyx":102 * self.col_dtypes_isobject = list() * self.col_dytpes_isfloat = list() * self.col_formats = list() # <<<<<<<<<<<<<< * self.col_formats_original = list() * self.origin = None */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_formats); @@ -5753,14 +5735,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_formats = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":102 + /* "pyreadstat/_readstat_parser.pyx":103 * self.col_dytpes_isfloat = list() * self.col_formats = list() * self.col_formats_original = list() # <<<<<<<<<<<<<< * self.origin = None * self.unix_to_origin_secs = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->col_formats_original); @@ -5768,7 +5750,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->col_formats_original = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":103 + /* "pyreadstat/_readstat_parser.pyx":104 * self.col_formats = list() * self.col_formats_original = list() * self.origin = None # <<<<<<<<<<<<<< @@ -5781,7 +5763,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->origin); __pyx_v_self->origin = Py_None; - /* "pyreadstat/_readstat_parser.pyx":104 + /* "pyreadstat/_readstat_parser.pyx":105 * self.col_formats_original = list() * self.origin = None * self.unix_to_origin_secs = 0 # <<<<<<<<<<<<<< @@ -5790,7 +5772,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->unix_to_origin_secs = 0.0; - /* "pyreadstat/_readstat_parser.pyx":105 + /* "pyreadstat/_readstat_parser.pyx":106 * self.origin = None * self.unix_to_origin_secs = 0 * self.is_unkown_number_rows = 0 # <<<<<<<<<<<<<< @@ -5799,7 +5781,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->is_unkown_number_rows = 0; - /* "pyreadstat/_readstat_parser.pyx":106 + /* "pyreadstat/_readstat_parser.pyx":107 * self.unix_to_origin_secs = 0 * self.is_unkown_number_rows = 0 * self.file_encoding = None # <<<<<<<<<<<<<< @@ -5812,7 +5794,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->file_encoding); __pyx_v_self->file_encoding = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":107 + /* "pyreadstat/_readstat_parser.pyx":108 * self.is_unkown_number_rows = 0 * self.file_encoding = None * self.file_label = None # <<<<<<<<<<<<<< @@ -5825,7 +5807,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->file_label); __pyx_v_self->file_label = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":108 + /* "pyreadstat/_readstat_parser.pyx":109 * self.file_encoding = None * self.file_label = None * self.metaonly = 0 # <<<<<<<<<<<<<< @@ -5834,7 +5816,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->metaonly = 0; - /* "pyreadstat/_readstat_parser.pyx":109 + /* "pyreadstat/_readstat_parser.pyx":110 * self.file_label = None * self.metaonly = 0 * self.dates_as_pandas = 0 # <<<<<<<<<<<<<< @@ -5843,14 +5825,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->dates_as_pandas = 0; - /* "pyreadstat/_readstat_parser.pyx":110 + /* "pyreadstat/_readstat_parser.pyx":111 * self.metaonly = 0 * self.dates_as_pandas = 0 * self.label_to_var_name = dict() # <<<<<<<<<<<<<< * self.labels_raw = dict() * self.notes = list() */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->label_to_var_name); @@ -5858,14 +5840,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->label_to_var_name = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":111 + /* "pyreadstat/_readstat_parser.pyx":112 * self.dates_as_pandas = 0 * self.label_to_var_name = dict() * self.labels_raw = dict() # <<<<<<<<<<<<<< * self.notes = list() * self.user_encoding = None */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->labels_raw); @@ -5873,14 +5855,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->labels_raw = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":112 + /* "pyreadstat/_readstat_parser.pyx":113 * self.label_to_var_name = dict() * self.labels_raw = dict() * self.notes = list() # <<<<<<<<<<<<<< * self.user_encoding = None * self.table_name = None */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->notes); @@ -5888,7 +5870,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->notes = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":113 + /* "pyreadstat/_readstat_parser.pyx":114 * self.labels_raw = dict() * self.notes = list() * self.user_encoding = None # <<<<<<<<<<<<<< @@ -5901,7 +5883,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->user_encoding); __pyx_v_self->user_encoding = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":114 + /* "pyreadstat/_readstat_parser.pyx":115 * self.notes = list() * self.user_encoding = None * self.table_name = None # <<<<<<<<<<<<<< @@ -5914,7 +5896,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->table_name); __pyx_v_self->table_name = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":115 + /* "pyreadstat/_readstat_parser.pyx":116 * self.user_encoding = None * self.table_name = None * self.filter_cols = 0 # <<<<<<<<<<<<<< @@ -5923,14 +5905,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->filter_cols = 0; - /* "pyreadstat/_readstat_parser.pyx":116 + /* "pyreadstat/_readstat_parser.pyx":117 * self.table_name = None * self.filter_cols = 0 * self.use_cols = list() # <<<<<<<<<<<<<< * self.usernan = 0 * self.missing_ranges = dict() */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->use_cols); @@ -5938,7 +5920,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->use_cols = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":117 + /* "pyreadstat/_readstat_parser.pyx":118 * self.filter_cols = 0 * self.use_cols = list() * self.usernan = 0 # <<<<<<<<<<<<<< @@ -5947,14 +5929,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->usernan = 0; - /* "pyreadstat/_readstat_parser.pyx":118 + /* "pyreadstat/_readstat_parser.pyx":119 * self.use_cols = list() * self.usernan = 0 * self.missing_ranges = dict() # <<<<<<<<<<<<<< * self.missing_user_values = dict() * self.variable_storage_width = dict() */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->missing_ranges); @@ -5962,14 +5944,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->missing_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":119 + /* "pyreadstat/_readstat_parser.pyx":120 * self.usernan = 0 * self.missing_ranges = dict() * self.missing_user_values = dict() # <<<<<<<<<<<<<< * self.variable_storage_width = dict() * self.variable_display_width = dict() */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->missing_user_values); @@ -5977,14 +5959,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->missing_user_values = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":120 + /* "pyreadstat/_readstat_parser.pyx":121 * self.missing_ranges = dict() * self.missing_user_values = dict() * self.variable_storage_width = dict() # <<<<<<<<<<<<<< * self.variable_display_width = dict() * self.variable_alignment = dict() */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->variable_storage_width); @@ -5992,14 +5974,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->variable_storage_width = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":121 + /* "pyreadstat/_readstat_parser.pyx":122 * self.missing_user_values = dict() * self.variable_storage_width = dict() * self.variable_display_width = dict() # <<<<<<<<<<<<<< * self.variable_alignment = dict() * self.variable_measure = dict() */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->variable_display_width); @@ -6007,14 +5989,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->variable_display_width = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":122 + /* "pyreadstat/_readstat_parser.pyx":123 * self.variable_storage_width = dict() * self.variable_display_width = dict() * self.variable_alignment = dict() # <<<<<<<<<<<<<< * self.variable_measure = dict() * self.no_datetime_conversion = 0 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->variable_alignment); @@ -6022,14 +6004,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->variable_alignment = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":123 + /* "pyreadstat/_readstat_parser.pyx":124 * self.variable_display_width = dict() * self.variable_alignment = dict() * self.variable_measure = dict() # <<<<<<<<<<<<<< * self.no_datetime_conversion = 0 * self.ctime = 0 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->variable_measure); @@ -6037,7 +6019,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->variable_measure = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":124 + /* "pyreadstat/_readstat_parser.pyx":125 * self.variable_alignment = dict() * self.variable_measure = dict() * self.no_datetime_conversion = 0 # <<<<<<<<<<<<<< @@ -6046,7 +6028,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->no_datetime_conversion = 0; - /* "pyreadstat/_readstat_parser.pyx":125 + /* "pyreadstat/_readstat_parser.pyx":126 * self.variable_measure = dict() * self.no_datetime_conversion = 0 * self.ctime = 0 # <<<<<<<<<<<<<< @@ -6055,7 +6037,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->ctime = 0; - /* "pyreadstat/_readstat_parser.pyx":126 + /* "pyreadstat/_readstat_parser.pyx":127 * self.no_datetime_conversion = 0 * self.ctime = 0 * self.mtime = 0 # <<<<<<<<<<<<<< @@ -6064,14 +6046,14 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s */ __pyx_v_self->mtime = 0; - /* "pyreadstat/_readstat_parser.pyx":127 + /* "pyreadstat/_readstat_parser.pyx":128 * self.ctime = 0 * self.mtime = 0 * self.mr_sets = dict() # <<<<<<<<<<<<<< * self.output_format = "" * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->mr_sets); @@ -6079,7 +6061,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __pyx_v_self->mr_sets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":128 + /* "pyreadstat/_readstat_parser.pyx":129 * self.mtime = 0 * self.mr_sets = dict() * self.output_format = "" # <<<<<<<<<<<<<< @@ -6092,7 +6074,7 @@ static int __pyx_pf_10pyreadstat_16_readstat_parser_14data_container___cinit__(s __Pyx_DECREF(__pyx_v_self->output_format); __pyx_v_self->output_format = __pyx_mstate_global->__pyx_kp_u_; - /* "pyreadstat/_readstat_parser.pyx":89 + /* "pyreadstat/_readstat_parser.pyx":90 * """ * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -6316,7 +6298,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_14data_container_4__se return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":146 +/* "pyreadstat/_readstat_parser.pyx":147 * * * cdef py_datetime_format transform_variable_format(str var_format, py_file_format file_format): # <<<<<<<<<<<<<< @@ -6325,303 +6307,472 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_14data_container_4__se */ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyreadstat_16_readstat_parser_transform_variable_format(PyObject *__pyx_v_var_format, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format __pyx_v_file_format) { + PyObject *__pyx_v_format_match = NULL; + PyObject *__pyx_v_var_format_name = NULL; __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_r; + __Pyx_RefNannyDeclarations int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("transform_variable_format", 0); - /* "pyreadstat/_readstat_parser.pyx":150 + /* "pyreadstat/_readstat_parser.pyx":151 * Transforms a readstat var_format to a date, datetime or time format label * """ * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * if var_format in sas_all_formats: - * if var_format in sas_date_formats: + * if var_format: + * format_match = format_regex.match(var_format) */ switch (__pyx_v_file_format) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS: - /* "pyreadstat/_readstat_parser.pyx":151 + /* "pyreadstat/_readstat_parser.pyx":152 * """ * if file_format == FILE_FORMAT_SAS: - * if var_format in sas_all_formats: # <<<<<<<<<<<<<< - * if var_format in sas_date_formats: - * return DATE_FORMAT_DATE + * if var_format: # <<<<<<<<<<<<<< + * format_match = format_regex.match(var_format) + * if format_match: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_sas_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 151, __pyx_L1_error) + if (__pyx_v_var_format == Py_None) __pyx_t_1 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_var_format); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } + if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":152 + /* "pyreadstat/_readstat_parser.pyx":153 * if file_format == FILE_FORMAT_SAS: - * if var_format in sas_all_formats: - * if var_format in sas_date_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATE - * elif var_format in sas_datetime_formats: + * if var_format: + * format_match = format_regex.match(var_format) # <<<<<<<<<<<<<< + * if format_match: + * var_format_name = format_match.group(1) +*/ + __pyx_t_3 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_var_format}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_format_match = __pyx_t_2; + __pyx_t_2 = 0; + + /* "pyreadstat/_readstat_parser.pyx":154 + * if var_format: + * format_match = format_regex.match(var_format) + * if format_match: # <<<<<<<<<<<<<< + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_format_match); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 154, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":153 - * if var_format in sas_all_formats: - * if var_format in sas_date_formats: - * return DATE_FORMAT_DATE # <<<<<<<<<<<<<< - * elif var_format in sas_datetime_formats: - * return DATE_FORMAT_DATETIME + /* "pyreadstat/_readstat_parser.pyx":155 + * format_match = format_regex.match(var_format) + * if format_match: + * var_format_name = format_match.group(1) # <<<<<<<<<<<<<< + * if var_format_name in sas_all_formats: + * if var_format_name in sas_date_formats: */ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE; - goto __pyx_L0; + __pyx_t_3 = __pyx_v_format_match; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_var_format_name = __pyx_t_2; + __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":152 - * if file_format == FILE_FORMAT_SAS: - * if var_format in sas_all_formats: - * if var_format in sas_date_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATE - * elif var_format in sas_datetime_formats: + /* "pyreadstat/_readstat_parser.pyx":156 + * if format_match: + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: # <<<<<<<<<<<<<< + * if var_format_name in sas_date_formats: + * return DATE_FORMAT_DATE */ - } + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_sas_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 156, __pyx_L1_error) + if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":154 - * if var_format in sas_date_formats: - * return DATE_FORMAT_DATE - * elif var_format in sas_datetime_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATETIME - * elif var_format in sas_time_formats: + /* "pyreadstat/_readstat_parser.pyx":157 + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: + * if var_format_name in sas_date_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATE + * elif var_format_name in sas_datetime_formats: +*/ + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 157, __pyx_L1_error) + if (__pyx_t_1) { + + /* "pyreadstat/_readstat_parser.pyx":158 + * if var_format_name in sas_all_formats: + * if var_format_name in sas_date_formats: + * return DATE_FORMAT_DATE # <<<<<<<<<<<<<< + * elif var_format_name in sas_datetime_formats: + * return DATE_FORMAT_DATETIME +*/ + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE; + goto __pyx_L0; + + /* "pyreadstat/_readstat_parser.pyx":157 + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: + * if var_format_name in sas_date_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATE + * elif var_format_name in sas_datetime_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 154, __pyx_L1_error) - if (__pyx_t_1) { + } - /* "pyreadstat/_readstat_parser.pyx":155 - * return DATE_FORMAT_DATE - * elif var_format in sas_datetime_formats: - * return DATE_FORMAT_DATETIME # <<<<<<<<<<<<<< - * elif var_format in sas_time_formats: - * return DATE_FORMAT_TIME + /* "pyreadstat/_readstat_parser.pyx":159 + * if var_format_name in sas_date_formats: + * return DATE_FORMAT_DATE + * elif var_format_name in sas_datetime_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATETIME + * elif var_format_name in sas_time_formats: +*/ + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 159, __pyx_L1_error) + if (__pyx_t_1) { + + /* "pyreadstat/_readstat_parser.pyx":160 + * return DATE_FORMAT_DATE + * elif var_format_name in sas_datetime_formats: + * return DATE_FORMAT_DATETIME # <<<<<<<<<<<<<< + * elif var_format_name in sas_time_formats: + * return DATE_FORMAT_TIME +*/ + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME; + goto __pyx_L0; + + /* "pyreadstat/_readstat_parser.pyx":159 + * if var_format_name in sas_date_formats: + * return DATE_FORMAT_DATE + * elif var_format_name in sas_datetime_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATETIME + * elif var_format_name in sas_time_formats: */ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME; - goto __pyx_L0; + } - /* "pyreadstat/_readstat_parser.pyx":154 - * if var_format in sas_date_formats: - * return DATE_FORMAT_DATE - * elif var_format in sas_datetime_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATETIME - * elif var_format in sas_time_formats: + /* "pyreadstat/_readstat_parser.pyx":161 + * elif var_format_name in sas_datetime_formats: + * return DATE_FORMAT_DATETIME + * elif var_format_name in sas_time_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE */ - } + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 161, __pyx_L1_error) + if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":156 - * elif var_format in sas_datetime_formats: - * return DATE_FORMAT_DATETIME - * elif var_format in sas_time_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_TIME - * else: + /* "pyreadstat/_readstat_parser.pyx":162 + * return DATE_FORMAT_DATETIME + * elif var_format_name in sas_time_formats: + * return DATE_FORMAT_TIME # <<<<<<<<<<<<<< + * return DATE_FORMAT_NOTADATE + * */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 156, __pyx_L1_error) - if (__pyx_t_1) { + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME; + goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":157 - * return DATE_FORMAT_DATETIME - * elif var_format in sas_time_formats: - * return DATE_FORMAT_TIME # <<<<<<<<<<<<<< - * else: - * return DATE_FORMAT_NOTADATE + /* "pyreadstat/_readstat_parser.pyx":161 + * elif var_format_name in sas_datetime_formats: + * return DATE_FORMAT_DATETIME + * elif var_format_name in sas_time_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE */ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME; - goto __pyx_L0; + } - /* "pyreadstat/_readstat_parser.pyx":156 - * elif var_format in sas_datetime_formats: - * return DATE_FORMAT_DATETIME - * elif var_format in sas_time_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_TIME - * else: + /* "pyreadstat/_readstat_parser.pyx":156 + * if format_match: + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: # <<<<<<<<<<<<<< + * if var_format_name in sas_date_formats: + * return DATE_FORMAT_DATE +*/ + } + + /* "pyreadstat/_readstat_parser.pyx":154 + * if var_format: + * format_match = format_regex.match(var_format) + * if format_match: # <<<<<<<<<<<<<< + * var_format_name = format_match.group(1) + * if var_format_name in sas_all_formats: */ } - /* "pyreadstat/_readstat_parser.pyx":151 + /* "pyreadstat/_readstat_parser.pyx":152 * """ * if file_format == FILE_FORMAT_SAS: - * if var_format in sas_all_formats: # <<<<<<<<<<<<<< - * if var_format in sas_date_formats: - * return DATE_FORMAT_DATE + * if var_format: # <<<<<<<<<<<<<< + * format_match = format_regex.match(var_format) + * if format_match: */ - goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":159 - * return DATE_FORMAT_TIME - * else: - * return DATE_FORMAT_NOTADATE # <<<<<<<<<<<<<< + /* "pyreadstat/_readstat_parser.pyx":163 + * elif var_format_name in sas_time_formats: + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE # <<<<<<<<<<<<<< * * elif file_format == FILE_FORMAT_SPSS: */ - /*else*/ { - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_NOTADATE; - goto __pyx_L0; - } - __pyx_L3:; + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_NOTADATE; + goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":150 + /* "pyreadstat/_readstat_parser.pyx":151 * Transforms a readstat var_format to a date, datetime or time format label * """ * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * if var_format in sas_all_formats: - * if var_format in sas_date_formats: + * if var_format: + * format_match = format_regex.match(var_format) */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS: - /* "pyreadstat/_readstat_parser.pyx":162 + /* "pyreadstat/_readstat_parser.pyx":166 * * elif file_format == FILE_FORMAT_SPSS: - * if var_format in spss_all_formats: # <<<<<<<<<<<<<< - * if var_format in spss_date_formats: - * return DATE_FORMAT_DATE -*/ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_spss_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 162, __pyx_L1_error) - if (__pyx_t_1) { - - /* "pyreadstat/_readstat_parser.pyx":163 - * elif file_format == FILE_FORMAT_SPSS: - * if var_format in spss_all_formats: - * if var_format in spss_date_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATE - * elif var_format in spss_datetime_formats: + * if var_format: # <<<<<<<<<<<<<< + * format_match = format_regex.match(var_format) + * if format_match: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 163, __pyx_L1_error) - if (__pyx_t_1) { + if (__pyx_v_var_format == Py_None) __pyx_t_1 = 0; + else + { + Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_var_format); + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_1 = (__pyx_temp != 0); + } - /* "pyreadstat/_readstat_parser.pyx":164 - * if var_format in spss_all_formats: - * if var_format in spss_date_formats: - * return DATE_FORMAT_DATE # <<<<<<<<<<<<<< - * elif var_format in spss_datetime_formats: - * return DATE_FORMAT_DATETIME -*/ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE; - goto __pyx_L0; + if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":163 + /* "pyreadstat/_readstat_parser.pyx":167 * elif file_format == FILE_FORMAT_SPSS: - * if var_format in spss_all_formats: - * if var_format in spss_date_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATE - * elif var_format in spss_datetime_formats: + * if var_format: + * format_match = format_regex.match(var_format) # <<<<<<<<<<<<<< + * if format_match: + * var_format_name = format_match.group(1) */ + __pyx_t_3 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_var_format}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); } + __pyx_v_format_match = __pyx_t_2; + __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":165 - * if var_format in spss_date_formats: - * return DATE_FORMAT_DATE - * elif var_format in spss_datetime_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATETIME - * elif var_format in spss_time_formats: + /* "pyreadstat/_readstat_parser.pyx":168 + * if var_format: + * format_match = format_regex.match(var_format) + * if format_match: # <<<<<<<<<<<<<< + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_format_match); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 168, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":166 - * return DATE_FORMAT_DATE - * elif var_format in spss_datetime_formats: - * return DATE_FORMAT_DATETIME # <<<<<<<<<<<<<< - * elif var_format in spss_time_formats: - * return DATE_FORMAT_TIME + /* "pyreadstat/_readstat_parser.pyx":169 + * format_match = format_regex.match(var_format) + * if format_match: + * var_format_name = format_match.group(1) # <<<<<<<<<<<<<< + * if var_format_name in spss_all_formats: + * if var_format_name in spss_date_formats: */ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME; - goto __pyx_L0; + __pyx_t_3 = __pyx_v_format_match; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_var_format_name = __pyx_t_2; + __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":165 - * if var_format in spss_date_formats: - * return DATE_FORMAT_DATE - * elif var_format in spss_datetime_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_DATETIME - * elif var_format in spss_time_formats: + /* "pyreadstat/_readstat_parser.pyx":170 + * if format_match: + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: # <<<<<<<<<<<<<< + * if var_format_name in spss_date_formats: + * return DATE_FORMAT_DATE */ - } + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_spss_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 170, __pyx_L1_error) + if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":167 - * elif var_format in spss_datetime_formats: - * return DATE_FORMAT_DATETIME - * elif var_format in spss_time_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_TIME - * else: + /* "pyreadstat/_readstat_parser.pyx":171 + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: + * if var_format_name in spss_date_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATE + * elif var_format_name in spss_datetime_formats: +*/ + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) + if (__pyx_t_1) { + + /* "pyreadstat/_readstat_parser.pyx":172 + * if var_format_name in spss_all_formats: + * if var_format_name in spss_date_formats: + * return DATE_FORMAT_DATE # <<<<<<<<<<<<<< + * elif var_format_name in spss_datetime_formats: + * return DATE_FORMAT_DATETIME +*/ + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE; + goto __pyx_L0; + + /* "pyreadstat/_readstat_parser.pyx":171 + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: + * if var_format_name in spss_date_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATE + * elif var_format_name in spss_datetime_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 167, __pyx_L1_error) - if (__pyx_t_1) { + } - /* "pyreadstat/_readstat_parser.pyx":168 - * return DATE_FORMAT_DATETIME - * elif var_format in spss_time_formats: - * return DATE_FORMAT_TIME # <<<<<<<<<<<<<< - * else: - * return DATE_FORMAT_NOTADATE + /* "pyreadstat/_readstat_parser.pyx":173 + * if var_format_name in spss_date_formats: + * return DATE_FORMAT_DATE + * elif var_format_name in spss_datetime_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATETIME + * elif var_format_name in spss_time_formats: +*/ + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) + if (__pyx_t_1) { + + /* "pyreadstat/_readstat_parser.pyx":174 + * return DATE_FORMAT_DATE + * elif var_format_name in spss_datetime_formats: + * return DATE_FORMAT_DATETIME # <<<<<<<<<<<<<< + * elif var_format_name in spss_time_formats: + * return DATE_FORMAT_TIME +*/ + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME; + goto __pyx_L0; + + /* "pyreadstat/_readstat_parser.pyx":173 + * if var_format_name in spss_date_formats: + * return DATE_FORMAT_DATE + * elif var_format_name in spss_datetime_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_DATETIME + * elif var_format_name in spss_time_formats: */ - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME; - goto __pyx_L0; + } - /* "pyreadstat/_readstat_parser.pyx":167 - * elif var_format in spss_datetime_formats: - * return DATE_FORMAT_DATETIME - * elif var_format in spss_time_formats: # <<<<<<<<<<<<<< - * return DATE_FORMAT_TIME - * else: + /* "pyreadstat/_readstat_parser.pyx":175 + * elif var_format_name in spss_datetime_formats: + * return DATE_FORMAT_DATETIME + * elif var_format_name in spss_time_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE +*/ + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format_name, __pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) + if (__pyx_t_1) { + + /* "pyreadstat/_readstat_parser.pyx":176 + * return DATE_FORMAT_DATETIME + * elif var_format_name in spss_time_formats: + * return DATE_FORMAT_TIME # <<<<<<<<<<<<<< + * return DATE_FORMAT_NOTADATE + * +*/ + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME; + goto __pyx_L0; + + /* "pyreadstat/_readstat_parser.pyx":175 + * elif var_format_name in spss_datetime_formats: + * return DATE_FORMAT_DATETIME + * elif var_format_name in spss_time_formats: # <<<<<<<<<<<<<< + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE +*/ + } + + /* "pyreadstat/_readstat_parser.pyx":170 + * if format_match: + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: # <<<<<<<<<<<<<< + * if var_format_name in spss_date_formats: + * return DATE_FORMAT_DATE +*/ + } + + /* "pyreadstat/_readstat_parser.pyx":168 + * if var_format: + * format_match = format_regex.match(var_format) + * if format_match: # <<<<<<<<<<<<<< + * var_format_name = format_match.group(1) + * if var_format_name in spss_all_formats: */ } - /* "pyreadstat/_readstat_parser.pyx":162 + /* "pyreadstat/_readstat_parser.pyx":166 * * elif file_format == FILE_FORMAT_SPSS: - * if var_format in spss_all_formats: # <<<<<<<<<<<<<< - * if var_format in spss_date_formats: - * return DATE_FORMAT_DATE + * if var_format: # <<<<<<<<<<<<<< + * format_match = format_regex.match(var_format) + * if format_match: */ - goto __pyx_L5; } - /* "pyreadstat/_readstat_parser.pyx":170 - * return DATE_FORMAT_TIME - * else: - * return DATE_FORMAT_NOTADATE # <<<<<<<<<<<<<< + /* "pyreadstat/_readstat_parser.pyx":177 + * elif var_format_name in spss_time_formats: + * return DATE_FORMAT_TIME + * return DATE_FORMAT_NOTADATE # <<<<<<<<<<<<<< * * elif file_format == FILE_FORMAT_STATA: */ - /*else*/ { - __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_NOTADATE; - goto __pyx_L0; - } - __pyx_L5:; + __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_NOTADATE; + goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":161 - * return DATE_FORMAT_NOTADATE + /* "pyreadstat/_readstat_parser.pyx":165 + * return DATE_FORMAT_NOTADATE * * elif file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< - * if var_format in spss_all_formats: - * if var_format in spss_date_formats: + * if var_format: + * format_match = format_regex.match(var_format) */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA: - /* "pyreadstat/_readstat_parser.pyx":173 + /* "pyreadstat/_readstat_parser.pyx":180 * * elif file_format == FILE_FORMAT_STATA: * if var_format in stata_all_formats: # <<<<<<<<<<<<<< * if var_format in stata_date_formats: * return DATE_FORMAT_DATE */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":174 + /* "pyreadstat/_readstat_parser.pyx":181 * elif file_format == FILE_FORMAT_STATA: * if var_format in stata_all_formats: * if var_format in stata_date_formats: # <<<<<<<<<<<<<< * return DATE_FORMAT_DATE * elif var_format in stata_datetime_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 181, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":175 + /* "pyreadstat/_readstat_parser.pyx":182 * if var_format in stata_all_formats: * if var_format in stata_date_formats: * return DATE_FORMAT_DATE # <<<<<<<<<<<<<< @@ -6631,7 +6782,7 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":174 + /* "pyreadstat/_readstat_parser.pyx":181 * elif file_format == FILE_FORMAT_STATA: * if var_format in stata_all_formats: * if var_format in stata_date_formats: # <<<<<<<<<<<<<< @@ -6640,17 +6791,17 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre */ } - /* "pyreadstat/_readstat_parser.pyx":176 + /* "pyreadstat/_readstat_parser.pyx":183 * if var_format in stata_date_formats: * return DATE_FORMAT_DATE * elif var_format in stata_datetime_formats: # <<<<<<<<<<<<<< * return DATE_FORMAT_DATETIME * elif var_format in stata_time_formats: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 183, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":177 + /* "pyreadstat/_readstat_parser.pyx":184 * return DATE_FORMAT_DATE * elif var_format in stata_datetime_formats: * return DATE_FORMAT_DATETIME # <<<<<<<<<<<<<< @@ -6660,7 +6811,7 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":176 + /* "pyreadstat/_readstat_parser.pyx":183 * if var_format in stata_date_formats: * return DATE_FORMAT_DATE * elif var_format in stata_datetime_formats: # <<<<<<<<<<<<<< @@ -6669,17 +6820,17 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre */ } - /* "pyreadstat/_readstat_parser.pyx":178 + /* "pyreadstat/_readstat_parser.pyx":185 * elif var_format in stata_datetime_formats: * return DATE_FORMAT_DATETIME * elif var_format in stata_time_formats: # <<<<<<<<<<<<<< * return DATE_FORMAT_TIME * else: */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_var_format, __pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 185, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":179 + /* "pyreadstat/_readstat_parser.pyx":186 * return DATE_FORMAT_DATETIME * elif var_format in stata_time_formats: * return DATE_FORMAT_TIME # <<<<<<<<<<<<<< @@ -6689,7 +6840,7 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":178 + /* "pyreadstat/_readstat_parser.pyx":185 * elif var_format in stata_datetime_formats: * return DATE_FORMAT_DATETIME * elif var_format in stata_time_formats: # <<<<<<<<<<<<<< @@ -6698,17 +6849,17 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre */ } - /* "pyreadstat/_readstat_parser.pyx":173 + /* "pyreadstat/_readstat_parser.pyx":180 * * elif file_format == FILE_FORMAT_STATA: * if var_format in stata_all_formats: # <<<<<<<<<<<<<< * if var_format in stata_date_formats: * return DATE_FORMAT_DATE */ - goto __pyx_L7; + goto __pyx_L11; } - /* "pyreadstat/_readstat_parser.pyx":181 + /* "pyreadstat/_readstat_parser.pyx":188 * return DATE_FORMAT_TIME * else: * return DATE_FORMAT_NOTADATE # <<<<<<<<<<<<<< @@ -6719,10 +6870,10 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre __pyx_r = __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_NOTADATE; goto __pyx_L0; } - __pyx_L7:; + __pyx_L11:; - /* "pyreadstat/_readstat_parser.pyx":172 - * return DATE_FORMAT_NOTADATE + /* "pyreadstat/_readstat_parser.pyx":179 + * return DATE_FORMAT_NOTADATE * * elif file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * if var_format in stata_all_formats: @@ -6732,7 +6883,7 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre default: break; } - /* "pyreadstat/_readstat_parser.pyx":146 + /* "pyreadstat/_readstat_parser.pyx":147 * * * cdef py_datetime_format transform_variable_format(str var_format, py_file_format file_format): # <<<<<<<<<<<<<< @@ -6744,13 +6895,18 @@ static __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_f_10pyre __pyx_r = (__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pyreadstat._readstat_parser.transform_variable_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = (__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format) 0; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_format_match); + __Pyx_XDECREF(__pyx_v_var_format_name); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":183 +/* "pyreadstat/_readstat_parser.pyx":190 * return DATE_FORMAT_NOTADATE * * cdef object transform_datetime(py_datetime_format var_format, double tstamp, py_file_format file_format, object origin, # <<<<<<<<<<<<<< @@ -6771,12 +6927,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __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_RefNannySetupContext("transform_datetime", 0); - /* "pyreadstat/_readstat_parser.pyx":201 + /* "pyreadstat/_readstat_parser.pyx":208 * # for any other we return a python datetime, date or time object. * # polars also works with these objects, but it is slower * if var_format == DATE_FORMAT_DATE: # <<<<<<<<<<<<<< @@ -6786,17 +6944,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py switch (__pyx_v_var_format) { case __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE: - /* "pyreadstat/_readstat_parser.pyx":202 + /* "pyreadstat/_readstat_parser.pyx":209 * # polars also works with these objects, but it is slower * if var_format == DATE_FORMAT_DATE: * if output_format == "polars": # <<<<<<<<<<<<<< * # we want to return days from unix * if file_format == FILE_FORMAT_SPSS: */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 209, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":204 + /* "pyreadstat/_readstat_parser.pyx":211 * if output_format == "polars": * # we want to return days from unix * if file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< @@ -6806,7 +6964,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_1 = (__pyx_v_file_format == __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":206 + /* "pyreadstat/_readstat_parser.pyx":213 * if file_format == FILE_FORMAT_SPSS: * # tstamp is in seconds * return (tstamp - unix_to_origin_secs)/86400 # <<<<<<<<<<<<<< @@ -6814,13 +6972,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py * # tstamp is in days */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_tstamp - __pyx_v_unix_to_origin_secs) / 86400.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_tstamp - __pyx_v_unix_to_origin_secs) / 86400.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":204 + /* "pyreadstat/_readstat_parser.pyx":211 * if output_format == "polars": * # we want to return days from unix * if file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< @@ -6829,7 +6987,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ } - /* "pyreadstat/_readstat_parser.pyx":209 + /* "pyreadstat/_readstat_parser.pyx":216 * else: * # tstamp is in days * return tstamp - (unix_to_origin_secs/86400) # <<<<<<<<<<<<<< @@ -6838,14 +6996,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_tstamp - (__pyx_v_unix_to_origin_secs / 86400.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_tstamp - (__pyx_v_unix_to_origin_secs / 86400.0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":202 + /* "pyreadstat/_readstat_parser.pyx":209 * # polars also works with these objects, but it is slower * if var_format == DATE_FORMAT_DATE: * if output_format == "polars": # <<<<<<<<<<<<<< @@ -6854,7 +7012,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ } - /* "pyreadstat/_readstat_parser.pyx":211 + /* "pyreadstat/_readstat_parser.pyx":218 * return tstamp - (unix_to_origin_secs/86400) * * if file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< @@ -6864,7 +7022,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_1 = (__pyx_v_file_format == __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":213 + /* "pyreadstat/_readstat_parser.pyx":220 * if file_format == FILE_FORMAT_SPSS: * # tstamp is in seconds * days = (floor(tstamp / 86400)) # <<<<<<<<<<<<<< @@ -6873,7 +7031,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_days = ((int)floor((__pyx_v_tstamp / 86400.0))); - /* "pyreadstat/_readstat_parser.pyx":214 + /* "pyreadstat/_readstat_parser.pyx":221 * # tstamp is in seconds * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) # <<<<<<<<<<<<<< @@ -6882,19 +7040,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_secs = ((int)__Pyx_mod_double(__pyx_v_tstamp, 86400.0, 1)); - /* "pyreadstat/_readstat_parser.pyx":215 + /* "pyreadstat/_readstat_parser.pyx":222 * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) * tdelta = timedelta_new(days, secs, 0) # <<<<<<<<<<<<<< * #tdelta = timedelta(seconds=tstamp) * else: */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":211 + /* "pyreadstat/_readstat_parser.pyx":218 * return tstamp - (unix_to_origin_secs/86400) * * if file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< @@ -6904,7 +7062,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py goto __pyx_L5; } - /* "pyreadstat/_readstat_parser.pyx":219 + /* "pyreadstat/_readstat_parser.pyx":226 * else: * # tstamp is in days * days = tstamp # <<<<<<<<<<<<<< @@ -6914,33 +7072,33 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py /*else*/ { __pyx_v_days = ((int)__pyx_v_tstamp); - /* "pyreadstat/_readstat_parser.pyx":220 + /* "pyreadstat/_readstat_parser.pyx":227 * # tstamp is in days * days = tstamp * tdelta = timedelta_new(days, 0, 0) # <<<<<<<<<<<<<< * #tdelta = timedelta(days=tstamp) * mydat = origin + tdelta */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L5:; - /* "pyreadstat/_readstat_parser.pyx":222 + /* "pyreadstat/_readstat_parser.pyx":229 * tdelta = timedelta_new(days, 0, 0) * #tdelta = timedelta(days=tstamp) * mydat = origin + tdelta # <<<<<<<<<<<<<< * if dates_as_pandas: * return mydat */ - __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_mydat = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":223 + /* "pyreadstat/_readstat_parser.pyx":230 * #tdelta = timedelta(days=tstamp) * mydat = origin + tdelta * if dates_as_pandas: # <<<<<<<<<<<<<< @@ -6949,7 +7107,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ if (__pyx_v_dates_as_pandas) { - /* "pyreadstat/_readstat_parser.pyx":224 + /* "pyreadstat/_readstat_parser.pyx":231 * mydat = origin + tdelta * if dates_as_pandas: * return mydat # <<<<<<<<<<<<<< @@ -6961,7 +7119,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_r = __pyx_v_mydat; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":223 + /* "pyreadstat/_readstat_parser.pyx":230 * #tdelta = timedelta(days=tstamp) * mydat = origin + tdelta * if dates_as_pandas: # <<<<<<<<<<<<<< @@ -6970,7 +7128,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ } - /* "pyreadstat/_readstat_parser.pyx":226 + /* "pyreadstat/_readstat_parser.pyx":233 * return mydat * else: * return mydat.date() # <<<<<<<<<<<<<< @@ -6986,7 +7144,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; @@ -6994,7 +7152,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":201 + /* "pyreadstat/_readstat_parser.pyx":208 * # for any other we return a python datetime, date or time object. * # polars also works with these objects, but it is slower * if var_format == DATE_FORMAT_DATE: # <<<<<<<<<<<<<< @@ -7004,76 +7162,76 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py break; case __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME: - /* "pyreadstat/_readstat_parser.pyx":228 + /* "pyreadstat/_readstat_parser.pyx":235 * return mydat.date() * elif var_format == DATE_FORMAT_DATETIME: * if output_format == "polars": # <<<<<<<<<<<<<< - * # we want to return seconds from unix + * # we want to return timestamp in seconds * if file_format == FILE_FORMAT_STATA: */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 235, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":230 + /* "pyreadstat/_readstat_parser.pyx":237 * if output_format == "polars": - * # we want to return seconds from unix + * # we want to return timestamp in seconds * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * # tstamp is in millisecons - * return (tstamp/1000) - unix_to_origin_secs + * return (tstamp/1000) */ __pyx_t_1 = (__pyx_v_file_format == __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":232 + /* "pyreadstat/_readstat_parser.pyx":239 * if file_format == FILE_FORMAT_STATA: * # tstamp is in millisecons - * return (tstamp/1000) - unix_to_origin_secs # <<<<<<<<<<<<<< + * return (tstamp/1000) # <<<<<<<<<<<<<< * else: * # tstamp in seconds */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_tstamp / 1000.0) - __pyx_v_unix_to_origin_secs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_tstamp / 1000.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":230 + /* "pyreadstat/_readstat_parser.pyx":237 * if output_format == "polars": - * # we want to return seconds from unix + * # we want to return timestamp in seconds * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * # tstamp is in millisecons - * return (tstamp/1000) - unix_to_origin_secs + * return (tstamp/1000) */ } - /* "pyreadstat/_readstat_parser.pyx":235 + /* "pyreadstat/_readstat_parser.pyx":242 * else: * # tstamp in seconds - * return tstamp - unix_to_origin_secs # <<<<<<<<<<<<<< + * return tstamp # <<<<<<<<<<<<<< * * if file_format == FILE_FORMAT_STATA: */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_tstamp - __pyx_v_unix_to_origin_secs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_tstamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":228 + /* "pyreadstat/_readstat_parser.pyx":235 * return mydat.date() * elif var_format == DATE_FORMAT_DATETIME: * if output_format == "polars": # <<<<<<<<<<<<<< - * # we want to return seconds from unix + * # we want to return timestamp in seconds * if file_format == FILE_FORMAT_STATA: */ } - /* "pyreadstat/_readstat_parser.pyx":237 - * return tstamp - unix_to_origin_secs + /* "pyreadstat/_readstat_parser.pyx":244 + * return tstamp * * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * # tstamp is in millisecons @@ -7082,7 +7240,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_1 = (__pyx_v_file_format == __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":239 + /* "pyreadstat/_readstat_parser.pyx":246 * if file_format == FILE_FORMAT_STATA: * # tstamp is in millisecons * days = (floor(tstamp / 86400000)) # <<<<<<<<<<<<<< @@ -7091,7 +7249,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_days = ((int)floor((__pyx_v_tstamp / 86400000.0))); - /* "pyreadstat/_readstat_parser.pyx":240 + /* "pyreadstat/_readstat_parser.pyx":247 * # tstamp is in millisecons * days = (floor(tstamp / 86400000)) * msecs = tstamp % 86400000 # <<<<<<<<<<<<<< @@ -7100,7 +7258,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_msecs = __Pyx_mod_double(__pyx_v_tstamp, 86400000.0, 1); - /* "pyreadstat/_readstat_parser.pyx":241 + /* "pyreadstat/_readstat_parser.pyx":248 * days = (floor(tstamp / 86400000)) * msecs = tstamp % 86400000 * secs = (msecs/1000) # <<<<<<<<<<<<<< @@ -7109,7 +7267,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_secs = ((int)(__pyx_v_msecs / 1000.0)); - /* "pyreadstat/_readstat_parser.pyx":242 + /* "pyreadstat/_readstat_parser.pyx":249 * msecs = tstamp % 86400000 * secs = (msecs/1000) * usecs = ((msecs % 1000) * 1000 ) # <<<<<<<<<<<<<< @@ -7118,20 +7276,20 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_usecs = ((int)(__Pyx_mod_double(__pyx_v_msecs, 1000.0, 1) * 1000.0)); - /* "pyreadstat/_readstat_parser.pyx":243 + /* "pyreadstat/_readstat_parser.pyx":250 * secs = (msecs/1000) * usecs = ((msecs % 1000) * 1000 ) * tdelta = timedelta_new(days, secs, usecs) # <<<<<<<<<<<<<< * #tdelta = timedelta(milliseconds=tstamp) * else: */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":237 - * return tstamp - unix_to_origin_secs + /* "pyreadstat/_readstat_parser.pyx":244 + * return tstamp * * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * # tstamp is in millisecons @@ -7140,52 +7298,75 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py goto __pyx_L9; } - /* "pyreadstat/_readstat_parser.pyx":247 + /* "pyreadstat/_readstat_parser.pyx":254 * else: * # tstamp in seconds * days = (floor(tstamp / 86400)) # <<<<<<<<<<<<<< * secs = (tstamp % 86400) - * tdelta = timedelta_new(days, secs, 0) + * usecs = (round(tstamp % 1 * 1e6)) */ /*else*/ { __pyx_v_days = ((int)floor((__pyx_v_tstamp / 86400.0))); - /* "pyreadstat/_readstat_parser.pyx":248 + /* "pyreadstat/_readstat_parser.pyx":255 * # tstamp in seconds * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) # <<<<<<<<<<<<<< - * tdelta = timedelta_new(days, secs, 0) - * #tdelta = timedelta(seconds=tstamp) + * usecs = (round(tstamp % 1 * 1e6)) + * tdelta = timedelta_new(days, secs, usecs) */ __pyx_v_secs = ((int)__Pyx_mod_double(__pyx_v_tstamp, 86400.0, 1)); - /* "pyreadstat/_readstat_parser.pyx":249 + /* "pyreadstat/_readstat_parser.pyx":256 * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) - * tdelta = timedelta_new(days, secs, 0) # <<<<<<<<<<<<<< + * usecs = (round(tstamp % 1 * 1e6)) # <<<<<<<<<<<<<< + * tdelta = timedelta_new(days, secs, usecs) + * #tdelta = timedelta(seconds=tstamp) +*/ + __pyx_t_3 = NULL; + __pyx_t_5 = PyFloat_FromDouble((__Pyx_mod_double(__pyx_v_tstamp, 1.0, 1) * 1e6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_usecs = ((int)__pyx_t_6); + + /* "pyreadstat/_readstat_parser.pyx":257 + * secs = (tstamp % 86400) + * usecs = (round(tstamp % 1 * 1e6)) + * tdelta = timedelta_new(days, secs, usecs) # <<<<<<<<<<<<<< * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L9:; - /* "pyreadstat/_readstat_parser.pyx":251 - * tdelta = timedelta_new(days, secs, 0) + /* "pyreadstat/_readstat_parser.pyx":259 + * tdelta = timedelta_new(days, secs, usecs) * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta # <<<<<<<<<<<<<< * return mydat * elif var_format == DATE_FORMAT_TIME: */ - __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_mydat = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":252 + /* "pyreadstat/_readstat_parser.pyx":260 * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta * return mydat # <<<<<<<<<<<<<< @@ -7197,17 +7378,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_r = __pyx_v_mydat; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":227 + /* "pyreadstat/_readstat_parser.pyx":234 * else: * return mydat.date() * elif var_format == DATE_FORMAT_DATETIME: # <<<<<<<<<<<<<< * if output_format == "polars": - * # we want to return seconds from unix + * # we want to return timestamp in seconds */ break; case __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_TIME: - /* "pyreadstat/_readstat_parser.pyx":254 + /* "pyreadstat/_readstat_parser.pyx":262 * return mydat * elif var_format == DATE_FORMAT_TIME: * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< @@ -7217,7 +7398,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_t_1 = (__pyx_v_file_format == __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":256 + /* "pyreadstat/_readstat_parser.pyx":264 * if file_format == FILE_FORMAT_STATA: * # tstamp is in millisecons * days = (floor(tstamp / 86400000)) # <<<<<<<<<<<<<< @@ -7226,7 +7407,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_days = ((int)floor((__pyx_v_tstamp / 86400000.0))); - /* "pyreadstat/_readstat_parser.pyx":257 + /* "pyreadstat/_readstat_parser.pyx":265 * # tstamp is in millisecons * days = (floor(tstamp / 86400000)) * msecs = tstamp % 86400000 # <<<<<<<<<<<<<< @@ -7235,7 +7416,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_msecs = __Pyx_mod_double(__pyx_v_tstamp, 86400000.0, 1); - /* "pyreadstat/_readstat_parser.pyx":258 + /* "pyreadstat/_readstat_parser.pyx":266 * days = (floor(tstamp / 86400000)) * msecs = tstamp % 86400000 * secs = (msecs/1000) # <<<<<<<<<<<<<< @@ -7244,7 +7425,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_secs = ((int)(__pyx_v_msecs / 1000.0)); - /* "pyreadstat/_readstat_parser.pyx":259 + /* "pyreadstat/_readstat_parser.pyx":267 * msecs = tstamp % 86400000 * secs = (msecs/1000) * usecs = ((msecs % 1000) * 1000 ) # <<<<<<<<<<<<<< @@ -7253,19 +7434,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py */ __pyx_v_usecs = ((int)(__Pyx_mod_double(__pyx_v_msecs, 1000.0, 1) * 1000.0)); - /* "pyreadstat/_readstat_parser.pyx":260 + /* "pyreadstat/_readstat_parser.pyx":268 * secs = (msecs/1000) * usecs = ((msecs % 1000) * 1000 ) * tdelta = timedelta_new(days, secs, usecs) # <<<<<<<<<<<<<< * #tdelta = timedelta(milliseconds=tstamp) * else: */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":254 + /* "pyreadstat/_readstat_parser.pyx":262 * return mydat * elif var_format == DATE_FORMAT_TIME: * if file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< @@ -7275,52 +7456,75 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py goto __pyx_L10; } - /* "pyreadstat/_readstat_parser.pyx":264 + /* "pyreadstat/_readstat_parser.pyx":272 * else: * # tstamp in seconds * days = (floor(tstamp / 86400)) # <<<<<<<<<<<<<< * secs = (tstamp % 86400) - * tdelta = timedelta_new(days, secs, 0) + * usecs = (round(tstamp % 1 * 1e6)) */ /*else*/ { __pyx_v_days = ((int)floor((__pyx_v_tstamp / 86400.0))); - /* "pyreadstat/_readstat_parser.pyx":265 + /* "pyreadstat/_readstat_parser.pyx":273 * # tstamp in seconds * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) # <<<<<<<<<<<<<< - * tdelta = timedelta_new(days, secs, 0) - * #tdelta = timedelta(seconds=tstamp) + * usecs = (round(tstamp % 1 * 1e6)) + * tdelta = timedelta_new(days, secs, usecs) */ __pyx_v_secs = ((int)__Pyx_mod_double(__pyx_v_tstamp, 86400.0, 1)); - /* "pyreadstat/_readstat_parser.pyx":266 + /* "pyreadstat/_readstat_parser.pyx":274 * days = (floor(tstamp / 86400)) * secs = (tstamp % 86400) - * tdelta = timedelta_new(days, secs, 0) # <<<<<<<<<<<<<< + * usecs = (round(tstamp % 1 * 1e6)) # <<<<<<<<<<<<<< + * tdelta = timedelta_new(days, secs, usecs) + * #tdelta = timedelta(seconds=tstamp) +*/ + __pyx_t_5 = NULL; + __pyx_t_3 = PyFloat_FromDouble((__Pyx_mod_double(__pyx_v_tstamp, 1.0, 1) * 1e6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_usecs = ((int)__pyx_t_6); + + /* "pyreadstat/_readstat_parser.pyx":275 + * secs = (tstamp % 86400) + * usecs = (round(tstamp % 1 * 1e6)) + * tdelta = timedelta_new(days, secs, usecs) # <<<<<<<<<<<<<< * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_secs, __pyx_v_usecs)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tdelta = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L10:; - /* "pyreadstat/_readstat_parser.pyx":268 - * tdelta = timedelta_new(days, secs, 0) + /* "pyreadstat/_readstat_parser.pyx":277 + * tdelta = timedelta_new(days, secs, usecs) * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta # <<<<<<<<<<<<<< * return mydat.time() * */ - __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_origin, __pyx_v_tdelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_mydat = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":269 + /* "pyreadstat/_readstat_parser.pyx":278 * #tdelta = timedelta(seconds=tstamp) * mydat = origin + tdelta * return mydat.time() # <<<<<<<<<<<<<< @@ -7335,14 +7539,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":253 + /* "pyreadstat/_readstat_parser.pyx":261 * mydat = origin + tdelta * return mydat * elif var_format == DATE_FORMAT_TIME: # <<<<<<<<<<<<<< @@ -7353,7 +7557,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py default: break; } - /* "pyreadstat/_readstat_parser.pyx":183 + /* "pyreadstat/_readstat_parser.pyx":190 * return DATE_FORMAT_NOTADATE * * cdef object transform_datetime(py_datetime_format var_format, double tstamp, py_file_format file_format, object origin, # <<<<<<<<<<<<<< @@ -7367,6 +7571,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pyreadstat._readstat_parser.transform_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -7377,7 +7582,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__py return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":272 +/* "pyreadstat/_readstat_parser.pyx":281 * * * cdef object convert_readstat_to_python_value(readstat_value_t value, int index, data_container dc): # <<<<<<<<<<<<<< @@ -7426,7 +7631,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_readstat_to_python_value", 0); - /* "pyreadstat/_readstat_parser.pyx":300 + /* "pyreadstat/_readstat_parser.pyx":309 * cdef str output_format * * var_type = dc.col_dtypes[index] # <<<<<<<<<<<<<< @@ -7435,15 +7640,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ if (unlikely(__pyx_v_dc->col_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 300, __pyx_L1_error) + __PYX_ERR(0, 309, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_2 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_var_type = __pyx_t_2; - /* "pyreadstat/_readstat_parser.pyx":301 + /* "pyreadstat/_readstat_parser.pyx":310 * * var_type = dc.col_dtypes[index] * var_format = dc.col_formats[index] # <<<<<<<<<<<<<< @@ -7452,15 +7657,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ if (unlikely(__pyx_v_dc->col_formats == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 301, __pyx_L1_error) + __PYX_ERR(0, 310, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_3 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_var_format = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":302 + /* "pyreadstat/_readstat_parser.pyx":311 * var_type = dc.col_dtypes[index] * var_format = dc.col_formats[index] * origin = dc.origin # <<<<<<<<<<<<<< @@ -7472,7 +7677,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_v_origin = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":303 + /* "pyreadstat/_readstat_parser.pyx":312 * var_format = dc.col_formats[index] * origin = dc.origin * unix_to_origin_secs = dc.unix_to_origin_secs # <<<<<<<<<<<<<< @@ -7482,7 +7687,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_4 = __pyx_v_dc->unix_to_origin_secs; __pyx_v_unix_to_origin_secs = __pyx_t_4; - /* "pyreadstat/_readstat_parser.pyx":304 + /* "pyreadstat/_readstat_parser.pyx":313 * origin = dc.origin * unix_to_origin_secs = dc.unix_to_origin_secs * dates_as_pandas = dc.dates_as_pandas # <<<<<<<<<<<<<< @@ -7492,7 +7697,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_5 = __pyx_v_dc->dates_as_pandas; __pyx_v_dates_as_pandas = __pyx_t_5; - /* "pyreadstat/_readstat_parser.pyx":305 + /* "pyreadstat/_readstat_parser.pyx":314 * unix_to_origin_secs = dc.unix_to_origin_secs * dates_as_pandas = dc.dates_as_pandas * file_format = dc.file_format # <<<<<<<<<<<<<< @@ -7502,7 +7707,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_6 = __pyx_v_dc->file_format; __pyx_v_file_format = __pyx_t_6; - /* "pyreadstat/_readstat_parser.pyx":306 + /* "pyreadstat/_readstat_parser.pyx":315 * dates_as_pandas = dc.dates_as_pandas * file_format = dc.file_format * output_format = dc.output_format # <<<<<<<<<<<<<< @@ -7514,7 +7719,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_v_output_format = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":309 + /* "pyreadstat/_readstat_parser.pyx":318 * * # transform to values cython can deal with * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -7525,7 +7730,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt case READSTAT_TYPE_STRING: case READSTAT_TYPE_STRING_REF: - /* "pyreadstat/_readstat_parser.pyx":310 + /* "pyreadstat/_readstat_parser.pyx":319 * # transform to values cython can deal with * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: * c_str_value = readstat_string_value(value) # <<<<<<<<<<<<<< @@ -7534,7 +7739,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_str_value = readstat_string_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":311 + /* "pyreadstat/_readstat_parser.pyx":320 * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: * c_str_value = readstat_string_value(value) * if c_str_value != NULL: # <<<<<<<<<<<<<< @@ -7544,14 +7749,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_5 = (__pyx_v_c_str_value != NULL); if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":312 + /* "pyreadstat/_readstat_parser.pyx":321 * c_str_value = readstat_string_value(value) * if c_str_value != NULL: * py_str_value = c_str_value # <<<<<<<<<<<<<< * else: * py_str_value = '' */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_c_str_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_c_str_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); @@ -7559,7 +7764,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_v_py_str_value = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":311 + /* "pyreadstat/_readstat_parser.pyx":320 * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: * c_str_value = readstat_string_value(value) * if c_str_value != NULL: # <<<<<<<<<<<<<< @@ -7569,7 +7774,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":314 + /* "pyreadstat/_readstat_parser.pyx":323 * py_str_value = c_str_value * else: * py_str_value = '' # <<<<<<<<<<<<<< @@ -7582,7 +7787,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":315 + /* "pyreadstat/_readstat_parser.pyx":324 * else: * py_str_value = '' * pyformat = VAR_FORMAT_STRING # <<<<<<<<<<<<<< @@ -7591,7 +7796,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_STRING; - /* "pyreadstat/_readstat_parser.pyx":309 + /* "pyreadstat/_readstat_parser.pyx":318 * * # transform to values cython can deal with * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -7601,7 +7806,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case READSTAT_TYPE_INT8: - /* "pyreadstat/_readstat_parser.pyx":317 + /* "pyreadstat/_readstat_parser.pyx":326 * pyformat = VAR_FORMAT_STRING * elif var_type == READSTAT_TYPE_INT8: * c_int8_value = readstat_int8_value(value) # <<<<<<<<<<<<<< @@ -7610,7 +7815,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_int8_value = readstat_int8_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":318 + /* "pyreadstat/_readstat_parser.pyx":327 * elif var_type == READSTAT_TYPE_INT8: * c_int8_value = readstat_int8_value(value) * py_long_value = c_int8_value # <<<<<<<<<<<<<< @@ -7619,7 +7824,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_py_long_value = ((long)__pyx_v_c_int8_value); - /* "pyreadstat/_readstat_parser.pyx":319 + /* "pyreadstat/_readstat_parser.pyx":328 * c_int8_value = readstat_int8_value(value) * py_long_value = c_int8_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -7628,7 +7833,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":316 + /* "pyreadstat/_readstat_parser.pyx":325 * py_str_value = '' * pyformat = VAR_FORMAT_STRING * elif var_type == READSTAT_TYPE_INT8: # <<<<<<<<<<<<<< @@ -7638,7 +7843,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case READSTAT_TYPE_INT16: - /* "pyreadstat/_readstat_parser.pyx":321 + /* "pyreadstat/_readstat_parser.pyx":330 * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_INT16: * c_int16_value = readstat_int16_value(value) # <<<<<<<<<<<<<< @@ -7647,7 +7852,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_int16_value = readstat_int16_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":322 + /* "pyreadstat/_readstat_parser.pyx":331 * elif var_type == READSTAT_TYPE_INT16: * c_int16_value = readstat_int16_value(value) * py_long_value = c_int16_value # <<<<<<<<<<<<<< @@ -7656,7 +7861,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_py_long_value = ((long)__pyx_v_c_int16_value); - /* "pyreadstat/_readstat_parser.pyx":323 + /* "pyreadstat/_readstat_parser.pyx":332 * c_int16_value = readstat_int16_value(value) * py_long_value = c_int16_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -7665,7 +7870,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":320 + /* "pyreadstat/_readstat_parser.pyx":329 * py_long_value = c_int8_value * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_INT16: # <<<<<<<<<<<<<< @@ -7675,7 +7880,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case READSTAT_TYPE_INT32: - /* "pyreadstat/_readstat_parser.pyx":325 + /* "pyreadstat/_readstat_parser.pyx":334 * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_INT32: * c_int32_value = readstat_int32_value(value) # <<<<<<<<<<<<<< @@ -7684,7 +7889,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_int32_value = readstat_int32_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":326 + /* "pyreadstat/_readstat_parser.pyx":335 * elif var_type == READSTAT_TYPE_INT32: * c_int32_value = readstat_int32_value(value) * py_long_value = c_int32_value # <<<<<<<<<<<<<< @@ -7693,7 +7898,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_py_long_value = ((long)__pyx_v_c_int32_value); - /* "pyreadstat/_readstat_parser.pyx":327 + /* "pyreadstat/_readstat_parser.pyx":336 * c_int32_value = readstat_int32_value(value) * py_long_value = c_int32_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -7702,7 +7907,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":324 + /* "pyreadstat/_readstat_parser.pyx":333 * py_long_value = c_int16_value * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_INT32: # <<<<<<<<<<<<<< @@ -7712,7 +7917,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case READSTAT_TYPE_FLOAT: - /* "pyreadstat/_readstat_parser.pyx":329 + /* "pyreadstat/_readstat_parser.pyx":338 * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_FLOAT: * c_float_value = readstat_float_value(value) # <<<<<<<<<<<<<< @@ -7721,7 +7926,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_float_value = readstat_float_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":330 + /* "pyreadstat/_readstat_parser.pyx":339 * elif var_type == READSTAT_TYPE_FLOAT: * c_float_value = readstat_float_value(value) * py_float_value = c_float_value # <<<<<<<<<<<<<< @@ -7730,7 +7935,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_py_float_value = ((double)__pyx_v_c_float_value); - /* "pyreadstat/_readstat_parser.pyx":331 + /* "pyreadstat/_readstat_parser.pyx":340 * c_float_value = readstat_float_value(value) * py_float_value = c_float_value * pyformat = VAR_FORMAT_FLOAT # <<<<<<<<<<<<<< @@ -7739,7 +7944,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT; - /* "pyreadstat/_readstat_parser.pyx":328 + /* "pyreadstat/_readstat_parser.pyx":337 * py_long_value = c_int32_value * pyformat = VAR_FORMAT_LONG * elif var_type == READSTAT_TYPE_FLOAT: # <<<<<<<<<<<<<< @@ -7749,7 +7954,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case READSTAT_TYPE_DOUBLE: - /* "pyreadstat/_readstat_parser.pyx":333 + /* "pyreadstat/_readstat_parser.pyx":342 * pyformat = VAR_FORMAT_FLOAT * elif var_type == READSTAT_TYPE_DOUBLE: * c_double_value = readstat_double_value(value); # <<<<<<<<<<<<<< @@ -7758,7 +7963,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_c_double_value = readstat_double_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":334 + /* "pyreadstat/_readstat_parser.pyx":343 * elif var_type == READSTAT_TYPE_DOUBLE: * c_double_value = readstat_double_value(value); * py_float_value = c_double_value # <<<<<<<<<<<<<< @@ -7767,7 +7972,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_py_float_value = ((double)__pyx_v_c_double_value); - /* "pyreadstat/_readstat_parser.pyx":335 + /* "pyreadstat/_readstat_parser.pyx":344 * c_double_value = readstat_double_value(value); * py_float_value = c_double_value * pyformat = VAR_FORMAT_FLOAT # <<<<<<<<<<<<<< @@ -7776,7 +7981,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT; - /* "pyreadstat/_readstat_parser.pyx":332 + /* "pyreadstat/_readstat_parser.pyx":341 * py_float_value = c_float_value * pyformat = VAR_FORMAT_FLOAT * elif var_type == READSTAT_TYPE_DOUBLE: # <<<<<<<<<<<<<< @@ -7786,7 +7991,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; default: - /* "pyreadstat/_readstat_parser.pyx":337 + /* "pyreadstat/_readstat_parser.pyx":346 * pyformat = VAR_FORMAT_FLOAT * else: * raise PyreadstatError("Unkown data type") # <<<<<<<<<<<<<< @@ -7794,7 +7999,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt * # final transformation and storage */ __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7813,16 +8018,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 337, __pyx_L1_error) + __PYX_ERR(0, 346, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":341 + /* "pyreadstat/_readstat_parser.pyx":350 * # final transformation and storage * * if pyformat == VAR_FORMAT_STRING: # <<<<<<<<<<<<<< @@ -7832,7 +8037,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt switch (__pyx_v_pyformat) { case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_STRING: - /* "pyreadstat/_readstat_parser.pyx":342 + /* "pyreadstat/_readstat_parser.pyx":351 * * if pyformat == VAR_FORMAT_STRING: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -7849,18 +8054,18 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_L5_bool_binop_done:; if (likely(__pyx_t_5)) { - /* "pyreadstat/_readstat_parser.pyx":343 + /* "pyreadstat/_readstat_parser.pyx":352 * if pyformat == VAR_FORMAT_STRING: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: * result = py_str_value # <<<<<<<<<<<<<< * else: * #str_byte_val = py_str_value.encode("UTF-8") */ - if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 343, __pyx_L1_error) } + if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 352, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_py_str_value); __pyx_v_result = __pyx_v_py_str_value; - /* "pyreadstat/_readstat_parser.pyx":342 + /* "pyreadstat/_readstat_parser.pyx":351 * * if pyformat == VAR_FORMAT_STRING: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -7870,7 +8075,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt goto __pyx_L4; } - /* "pyreadstat/_readstat_parser.pyx":346 + /* "pyreadstat/_readstat_parser.pyx":355 * else: * #str_byte_val = py_str_value.encode("UTF-8") * raise PyreadstatError("STRING type with value '%s' with date type in column '%s'" % (py_str_value, dc.col_names[index])) # <<<<<<<<<<<<<< @@ -7879,18 +8084,18 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt */ /*else*/ { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_py_str_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 355, __pyx_L1_error) } + __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_py_str_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (unlikely(__pyx_v_dc->col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 355, __pyx_L1_error) } - __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_12), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_STRING_type_with_value; @@ -7899,7 +8104,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_14[3] = __pyx_t_13; __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13)); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -7921,16 +8126,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 346, __pyx_L1_error) + __PYX_ERR(0, 355, __pyx_L1_error) } __pyx_L4:; - /* "pyreadstat/_readstat_parser.pyx":341 + /* "pyreadstat/_readstat_parser.pyx":350 * # final transformation and storage * * if pyformat == VAR_FORMAT_STRING: # <<<<<<<<<<<<<< @@ -7940,7 +8145,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG: - /* "pyreadstat/_readstat_parser.pyx":348 + /* "pyreadstat/_readstat_parser.pyx":357 * raise PyreadstatError("STRING type with value '%s' with date type in column '%s'" % (py_str_value, dc.col_names[index])) * elif pyformat == VAR_FORMAT_LONG: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -7957,19 +8162,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_L8_bool_binop_done:; if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":349 + /* "pyreadstat/_readstat_parser.pyx":358 * elif pyformat == VAR_FORMAT_LONG: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: * result = py_long_value # <<<<<<<<<<<<<< * else: * tstamp = py_long_value */ - __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_py_long_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_py_long_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_result = __pyx_t_7; __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":348 + /* "pyreadstat/_readstat_parser.pyx":357 * raise PyreadstatError("STRING type with value '%s' with date type in column '%s'" % (py_str_value, dc.col_names[index])) * elif pyformat == VAR_FORMAT_LONG: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -7979,7 +8184,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt goto __pyx_L7; } - /* "pyreadstat/_readstat_parser.pyx":351 + /* "pyreadstat/_readstat_parser.pyx":360 * result = py_long_value * else: * tstamp = py_long_value # <<<<<<<<<<<<<< @@ -7989,21 +8194,21 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt /*else*/ { __pyx_v_tstamp = ((double)__pyx_v_py_long_value); - /* "pyreadstat/_readstat_parser.pyx":352 + /* "pyreadstat/_readstat_parser.pyx":361 * else: * tstamp = py_long_value * result = transform_datetime(var_format, tstamp, file_format, origin, dates_as_pandas, output_format, unix_to_origin_secs) # <<<<<<<<<<<<<< * elif pyformat == VAR_FORMAT_FLOAT: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: */ - __pyx_t_7 = __pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__pyx_v_var_format, __pyx_v_tstamp, __pyx_v_file_format, __pyx_v_origin, __pyx_v_dates_as_pandas, __pyx_v_output_format, __pyx_v_unix_to_origin_secs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__pyx_v_var_format, __pyx_v_tstamp, __pyx_v_file_format, __pyx_v_origin, __pyx_v_dates_as_pandas, __pyx_v_output_format, __pyx_v_unix_to_origin_secs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_result = __pyx_t_7; __pyx_t_7 = 0; } __pyx_L7:; - /* "pyreadstat/_readstat_parser.pyx":347 + /* "pyreadstat/_readstat_parser.pyx":356 * #str_byte_val = py_str_value.encode("UTF-8") * raise PyreadstatError("STRING type with value '%s' with date type in column '%s'" % (py_str_value, dc.col_names[index])) * elif pyformat == VAR_FORMAT_LONG: # <<<<<<<<<<<<<< @@ -8013,7 +8218,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT: - /* "pyreadstat/_readstat_parser.pyx":354 + /* "pyreadstat/_readstat_parser.pyx":363 * result = transform_datetime(var_format, tstamp, file_format, origin, dates_as_pandas, output_format, unix_to_origin_secs) * elif pyformat == VAR_FORMAT_FLOAT: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -8030,19 +8235,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_L11_bool_binop_done:; if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":355 + /* "pyreadstat/_readstat_parser.pyx":364 * elif pyformat == VAR_FORMAT_FLOAT: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: * result = py_float_value # <<<<<<<<<<<<<< * else: * #tstamp = py_float_value */ - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_py_float_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_py_float_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_result = __pyx_t_7; __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":354 + /* "pyreadstat/_readstat_parser.pyx":363 * result = transform_datetime(var_format, tstamp, file_format, origin, dates_as_pandas, output_format, unix_to_origin_secs) * elif pyformat == VAR_FORMAT_FLOAT: * if var_format == DATE_FORMAT_NOTADATE or dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -8052,7 +8257,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt goto __pyx_L10; } - /* "pyreadstat/_readstat_parser.pyx":358 + /* "pyreadstat/_readstat_parser.pyx":367 * else: * #tstamp = py_float_value * tstamp = py_float_value # <<<<<<<<<<<<<< @@ -8062,21 +8267,21 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt /*else*/ { __pyx_v_tstamp = __pyx_v_py_float_value; - /* "pyreadstat/_readstat_parser.pyx":359 + /* "pyreadstat/_readstat_parser.pyx":368 * #tstamp = py_float_value * tstamp = py_float_value * result = transform_datetime(var_format, tstamp, file_format, origin, dates_as_pandas, output_format, unix_to_origin_secs) # <<<<<<<<<<<<<< * #elif pyformat == VAR_FORMAT_MISSING: * # pass */ - __pyx_t_7 = __pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__pyx_v_var_format, __pyx_v_tstamp, __pyx_v_file_format, __pyx_v_origin, __pyx_v_dates_as_pandas, __pyx_v_output_format, __pyx_v_unix_to_origin_secs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10pyreadstat_16_readstat_parser_transform_datetime(__pyx_v_var_format, __pyx_v_tstamp, __pyx_v_file_format, __pyx_v_origin, __pyx_v_dates_as_pandas, __pyx_v_output_format, __pyx_v_unix_to_origin_secs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_result = __pyx_t_7; __pyx_t_7 = 0; } __pyx_L10:; - /* "pyreadstat/_readstat_parser.pyx":353 + /* "pyreadstat/_readstat_parser.pyx":362 * tstamp = py_long_value * result = transform_datetime(var_format, tstamp, file_format, origin, dates_as_pandas, output_format, unix_to_origin_secs) * elif pyformat == VAR_FORMAT_FLOAT: # <<<<<<<<<<<<<< @@ -8086,7 +8291,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt break; default: - /* "pyreadstat/_readstat_parser.pyx":363 + /* "pyreadstat/_readstat_parser.pyx":372 * # pass * else: * raise PyreadstatError("Failed convert C to python value") # <<<<<<<<<<<<<< @@ -8094,7 +8299,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt * return result */ __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8113,16 +8318,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 363, __pyx_L1_error) + __PYX_ERR(0, 372, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":365 + /* "pyreadstat/_readstat_parser.pyx":374 * raise PyreadstatError("Failed convert C to python value") * * return result # <<<<<<<<<<<<<< @@ -8134,7 +8339,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":272 + /* "pyreadstat/_readstat_parser.pyx":281 * * * cdef object convert_readstat_to_python_value(readstat_value_t value, int index, data_container dc): # <<<<<<<<<<<<<< @@ -8162,7 +8367,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_pyt return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":368 +/* "pyreadstat/_readstat_parser.pyx":377 * * * cdef int handle_metadata(readstat_metadata_t *metadata, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -8204,7 +8409,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_metadata", 0); - /* "pyreadstat/_readstat_parser.pyx":377 + /* "pyreadstat/_readstat_parser.pyx":386 * * cdef int var_count, obs_count, mr_len * cdef data_container dc = ctx # <<<<<<<<<<<<<< @@ -8216,7 +8421,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":386 + /* "pyreadstat/_readstat_parser.pyx":395 * cdef int ctime * cdef int mtime * cdef int i = 0 # <<<<<<<<<<<<<< @@ -8225,31 +8430,31 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_i = 0; - /* "pyreadstat/_readstat_parser.pyx":388 + /* "pyreadstat/_readstat_parser.pyx":397 * cdef int i = 0 * cdef mr_set_t * mr_sets_orig * cdef dict mr_sets = {} # <<<<<<<<<<<<<< * cdef str name * cdef list variable_list = [] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mr_sets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":390 + /* "pyreadstat/_readstat_parser.pyx":399 * cdef dict mr_sets = {} * cdef str name * cdef list variable_list = [] # <<<<<<<<<<<<<< * * metaonly = dc.metaonly */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_variable_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":392 + /* "pyreadstat/_readstat_parser.pyx":401 * cdef list variable_list = [] * * metaonly = dc.metaonly # <<<<<<<<<<<<<< @@ -8259,7 +8464,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_2 = __pyx_v_dc->metaonly; __pyx_v_metaonly = __pyx_t_2; - /* "pyreadstat/_readstat_parser.pyx":394 + /* "pyreadstat/_readstat_parser.pyx":403 * metaonly = dc.metaonly * * var_count = readstat_get_var_count(metadata) # <<<<<<<<<<<<<< @@ -8268,7 +8473,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_var_count = readstat_get_var_count(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":395 + /* "pyreadstat/_readstat_parser.pyx":404 * * var_count = readstat_get_var_count(metadata) * if var_count<0: # <<<<<<<<<<<<<< @@ -8278,7 +8483,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_2 = (__pyx_v_var_count < 0); if (unlikely(__pyx_t_2)) { - /* "pyreadstat/_readstat_parser.pyx":396 + /* "pyreadstat/_readstat_parser.pyx":405 * var_count = readstat_get_var_count(metadata) * if var_count<0: * raise PyreadstatError("Failed to read number of variables") # <<<<<<<<<<<<<< @@ -8286,7 +8491,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta * if obs_count <0: */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -8305,14 +8510,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 396, __pyx_L1_error) + __PYX_ERR(0, 405, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":395 + /* "pyreadstat/_readstat_parser.pyx":404 * * var_count = readstat_get_var_count(metadata) * if var_count<0: # <<<<<<<<<<<<<< @@ -8321,7 +8526,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ } - /* "pyreadstat/_readstat_parser.pyx":397 + /* "pyreadstat/_readstat_parser.pyx":406 * if var_count<0: * raise PyreadstatError("Failed to read number of variables") * obs_count = readstat_get_row_count(metadata) # <<<<<<<<<<<<<< @@ -8330,7 +8535,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_obs_count = readstat_get_row_count(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":398 + /* "pyreadstat/_readstat_parser.pyx":407 * raise PyreadstatError("Failed to read number of variables") * obs_count = readstat_get_row_count(metadata) * if obs_count <0: # <<<<<<<<<<<<<< @@ -8340,7 +8545,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_2 = (__pyx_v_obs_count < 0); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":400 + /* "pyreadstat/_readstat_parser.pyx":409 * if obs_count <0: * # if <0 it means the number of rows is not known, allocate 100 000 * obs_count = 100000 # <<<<<<<<<<<<<< @@ -8349,7 +8554,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_obs_count = 0x186A0; - /* "pyreadstat/_readstat_parser.pyx":401 + /* "pyreadstat/_readstat_parser.pyx":410 * # if <0 it means the number of rows is not known, allocate 100 000 * obs_count = 100000 * dc.is_unkown_number_rows = 1 # <<<<<<<<<<<<<< @@ -8358,7 +8563,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_dc->is_unkown_number_rows = 1; - /* "pyreadstat/_readstat_parser.pyx":398 + /* "pyreadstat/_readstat_parser.pyx":407 * raise PyreadstatError("Failed to read number of variables") * obs_count = readstat_get_row_count(metadata) * if obs_count <0: # <<<<<<<<<<<<<< @@ -8367,7 +8572,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ } - /* "pyreadstat/_readstat_parser.pyx":403 + /* "pyreadstat/_readstat_parser.pyx":412 * dc.is_unkown_number_rows = 1 * * dc.n_obs = obs_count # <<<<<<<<<<<<<< @@ -8376,7 +8581,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_dc->n_obs = __pyx_v_obs_count; - /* "pyreadstat/_readstat_parser.pyx":404 + /* "pyreadstat/_readstat_parser.pyx":413 * * dc.n_obs = obs_count * dc.n_vars = var_count # <<<<<<<<<<<<<< @@ -8385,7 +8590,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_dc->n_vars = __pyx_v_var_count; - /* "pyreadstat/_readstat_parser.pyx":406 + /* "pyreadstat/_readstat_parser.pyx":415 * dc.n_vars = var_count * * mr_len = readstat_get_multiple_response_sets_length(metadata); # <<<<<<<<<<<<<< @@ -8394,7 +8599,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_mr_len = ((int)readstat_get_multiple_response_sets_length(__pyx_v_metadata)); - /* "pyreadstat/_readstat_parser.pyx":407 + /* "pyreadstat/_readstat_parser.pyx":416 * * mr_len = readstat_get_multiple_response_sets_length(metadata); * mr_sets_orig = readstat_get_multiple_response_sets(metadata); # <<<<<<<<<<<<<< @@ -8403,7 +8608,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_mr_sets_orig = readstat_get_multiple_response_sets(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":408 + /* "pyreadstat/_readstat_parser.pyx":417 * mr_len = readstat_get_multiple_response_sets_length(metadata); * mr_sets_orig = readstat_get_multiple_response_sets(metadata); * if mr_sets_orig != NULL: # <<<<<<<<<<<<<< @@ -8413,7 +8618,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_2 = (__pyx_v_mr_sets_orig != NULL); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":409 + /* "pyreadstat/_readstat_parser.pyx":418 * mr_sets_orig = readstat_get_multiple_response_sets(metadata); * if mr_sets_orig != NULL: * i = 0 # <<<<<<<<<<<<<< @@ -8422,7 +8627,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_i = 0; - /* "pyreadstat/_readstat_parser.pyx":410 + /* "pyreadstat/_readstat_parser.pyx":419 * if mr_sets_orig != NULL: * i = 0 * while i < mr_len: # <<<<<<<<<<<<<< @@ -8433,14 +8638,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_t_2 = (__pyx_v_i < __pyx_v_mr_len); if (!__pyx_t_2) break; - /* "pyreadstat/_readstat_parser.pyx":411 + /* "pyreadstat/_readstat_parser.pyx":420 * i = 0 * while i < mr_len: * name = mr_sets_orig[i].name # <<<<<<<<<<<<<< * variable_list = [] * for j in range(mr_sets_orig[i].num_subvars): */ - __pyx_t_1 = __Pyx_PyUnicode_FromString((__pyx_v_mr_sets_orig[__pyx_v_i]).name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString((__pyx_v_mr_sets_orig[__pyx_v_i]).name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); @@ -8448,19 +8653,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_XDECREF_SET(__pyx_v_name, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":412 + /* "pyreadstat/_readstat_parser.pyx":421 * while i < mr_len: * name = mr_sets_orig[i].name * variable_list = [] # <<<<<<<<<<<<<< * for j in range(mr_sets_orig[i].num_subvars): * variable_list.append(mr_sets_orig[i].subvariables[j]) */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_variable_list, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":413 + /* "pyreadstat/_readstat_parser.pyx":422 * name = mr_sets_orig[i].name * variable_list = [] * for j in range(mr_sets_orig[i].num_subvars): # <<<<<<<<<<<<<< @@ -8472,46 +8677,46 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_j = __pyx_t_8; - /* "pyreadstat/_readstat_parser.pyx":414 + /* "pyreadstat/_readstat_parser.pyx":423 * variable_list = [] * for j in range(mr_sets_orig[i].num_subvars): * variable_list.append(mr_sets_orig[i].subvariables[j]) # <<<<<<<<<<<<<< * mr_sets[name] = { * 'type': chr(mr_sets_orig[i].type), */ - __pyx_t_4 = __Pyx_PyUnicode_FromString(((__pyx_v_mr_sets_orig[__pyx_v_i]).subvariables[__pyx_v_j])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_FromString(((__pyx_v_mr_sets_orig[__pyx_v_i]).subvariables[__pyx_v_j])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_variable_list, __pyx_t_4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_variable_list, __pyx_t_4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "pyreadstat/_readstat_parser.pyx":416 + /* "pyreadstat/_readstat_parser.pyx":425 * variable_list.append(mr_sets_orig[i].subvariables[j]) * mr_sets[name] = { * 'type': chr(mr_sets_orig[i].type), # <<<<<<<<<<<<<< * 'is_dichotomy': bool(mr_sets_orig[i].is_dichotomy), * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyUnicode_FromOrdinal((__pyx_v_mr_sets_orig[__pyx_v_i]).type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal((__pyx_v_mr_sets_orig[__pyx_v_i]).type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_1) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":417 + /* "pyreadstat/_readstat_parser.pyx":426 * mr_sets[name] = { * 'type': chr(mr_sets_orig[i].type), * 'is_dichotomy': bool(mr_sets_orig[i].is_dichotomy), # <<<<<<<<<<<<<< * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, * 'label': mr_sets_orig[i].label, */ - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!((__pyx_v_mr_sets_orig[__pyx_v_i]).is_dichotomy != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!((__pyx_v_mr_sets_orig[__pyx_v_i]).is_dichotomy != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_dichotomy, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_dichotomy, __pyx_t_1) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":418 + /* "pyreadstat/_readstat_parser.pyx":427 * 'type': chr(mr_sets_orig[i].type), * 'is_dichotomy': bool(mr_sets_orig[i].is_dichotomy), * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, # <<<<<<<<<<<<<< @@ -8520,7 +8725,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_t_2 = ((__pyx_v_mr_sets_orig[__pyx_v_i]).counted_value != -1L); if (__pyx_t_2) { - __pyx_t_3 = __Pyx_PyLong_From_int((__pyx_v_mr_sets_orig[__pyx_v_i]).counted_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_int((__pyx_v_mr_sets_orig[__pyx_v_i]).counted_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -8528,41 +8733,41 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_counted_value, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_counted_value, __pyx_t_1) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":419 + /* "pyreadstat/_readstat_parser.pyx":428 * 'is_dichotomy': bool(mr_sets_orig[i].is_dichotomy), * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, * 'label': mr_sets_orig[i].label, # <<<<<<<<<<<<<< * 'variable_list': variable_list * } */ - __pyx_t_1 = __Pyx_PyUnicode_FromString((__pyx_v_mr_sets_orig[__pyx_v_i]).label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString((__pyx_v_mr_sets_orig[__pyx_v_i]).label); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_label, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_label, __pyx_t_1) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":420 + /* "pyreadstat/_readstat_parser.pyx":429 * 'counted_value': mr_sets_orig[i].counted_value if mr_sets_orig[i].counted_value != -1 else None, * 'label': mr_sets_orig[i].label, * 'variable_list': variable_list # <<<<<<<<<<<<<< * } * i += 1 */ - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variable_list, __pyx_v_variable_list) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variable_list, __pyx_v_variable_list) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":415 + /* "pyreadstat/_readstat_parser.pyx":424 * for j in range(mr_sets_orig[i].num_subvars): * variable_list.append(mr_sets_orig[i].subvariables[j]) * mr_sets[name] = { # <<<<<<<<<<<<<< * 'type': chr(mr_sets_orig[i].type), * 'is_dichotomy': bool(mr_sets_orig[i].is_dichotomy), */ - if (unlikely((PyDict_SetItem(__pyx_v_mr_sets, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 415, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_mr_sets, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":422 + /* "pyreadstat/_readstat_parser.pyx":431 * 'variable_list': variable_list * } * i += 1 # <<<<<<<<<<<<<< @@ -8572,7 +8777,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_i = (__pyx_v_i + 1); } - /* "pyreadstat/_readstat_parser.pyx":423 + /* "pyreadstat/_readstat_parser.pyx":432 * } * i += 1 * dc.mr_sets = mr_sets # <<<<<<<<<<<<<< @@ -8585,7 +8790,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_DECREF(__pyx_v_dc->mr_sets); __pyx_v_dc->mr_sets = __pyx_v_mr_sets; - /* "pyreadstat/_readstat_parser.pyx":408 + /* "pyreadstat/_readstat_parser.pyx":417 * mr_len = readstat_get_multiple_response_sets_length(metadata); * mr_sets_orig = readstat_get_multiple_response_sets(metadata); * if mr_sets_orig != NULL: # <<<<<<<<<<<<<< @@ -8594,22 +8799,22 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ } - /* "pyreadstat/_readstat_parser.pyx":425 + /* "pyreadstat/_readstat_parser.pyx":434 * dc.mr_sets = mr_sets * * dc.col_data_len = [obs_count] * var_count # <<<<<<<<<<<<<< * dc.col_numpy_dtypes = [None] * var_count * dc.col_dytpes_isfloat = [0] * var_count */ - __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_obs_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_obs_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_var_count; __pyx_temp++) { __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_t_4) != (0)) __PYX_ERR(0, 425, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_t_4) != (0)) __PYX_ERR(0, 434, __pyx_L1_error); } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -8619,20 +8824,20 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc->col_data_len = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":426 + /* "pyreadstat/_readstat_parser.pyx":435 * * dc.col_data_len = [obs_count] * var_count * dc.col_numpy_dtypes = [None] * var_count # <<<<<<<<<<<<<< * dc.col_dytpes_isfloat = [0] * var_count * dc.col_dtypes_isobject = [0] * var_count */ - __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_var_count; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 426, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 435, __pyx_L1_error); } } __Pyx_GIVEREF(__pyx_t_1); @@ -8641,20 +8846,20 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc->col_numpy_dtypes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":427 + /* "pyreadstat/_readstat_parser.pyx":436 * dc.col_data_len = [obs_count] * var_count * dc.col_numpy_dtypes = [None] * var_count * dc.col_dytpes_isfloat = [0] * var_count # <<<<<<<<<<<<<< * dc.col_dtypes_isobject = [0] * var_count * */ - __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_var_count; __pyx_temp++) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 427, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 436, __pyx_L1_error); } } __Pyx_GIVEREF(__pyx_t_1); @@ -8663,20 +8868,20 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc->col_dytpes_isfloat = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":428 + /* "pyreadstat/_readstat_parser.pyx":437 * dc.col_numpy_dtypes = [None] * var_count * dc.col_dytpes_isfloat = [0] * var_count * dc.col_dtypes_isobject = [0] * var_count # <<<<<<<<<<<<<< * * # read other metadata */ - __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_var_count<0) ? 0:__pyx_v_var_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_var_count; __pyx_temp++) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 428, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 437, __pyx_L1_error); } } __Pyx_GIVEREF(__pyx_t_1); @@ -8685,7 +8890,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc->col_dtypes_isobject = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":431 + /* "pyreadstat/_readstat_parser.pyx":440 * * # read other metadata * flabel_orig = readstat_get_file_label(metadata); # <<<<<<<<<<<<<< @@ -8694,7 +8899,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_flabel_orig = readstat_get_file_label(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":432 + /* "pyreadstat/_readstat_parser.pyx":441 * # read other metadata * flabel_orig = readstat_get_file_label(metadata); * fencoding_orig = readstat_get_file_encoding(metadata) # <<<<<<<<<<<<<< @@ -8703,7 +8908,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_fencoding_orig = readstat_get_file_encoding(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":433 + /* "pyreadstat/_readstat_parser.pyx":442 * flabel_orig = readstat_get_file_label(metadata); * fencoding_orig = readstat_get_file_encoding(metadata) * if flabel_orig != NULL and flabel_orig[0]: # <<<<<<<<<<<<<< @@ -8721,14 +8926,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":434 + /* "pyreadstat/_readstat_parser.pyx":443 * fencoding_orig = readstat_get_file_encoding(metadata) * if flabel_orig != NULL and flabel_orig[0]: * flabel = flabel_orig # <<<<<<<<<<<<<< * else: * flabel = None */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_flabel_orig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_flabel_orig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); @@ -8736,7 +8941,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_flabel = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":433 + /* "pyreadstat/_readstat_parser.pyx":442 * flabel_orig = readstat_get_file_label(metadata); * fencoding_orig = readstat_get_file_encoding(metadata) * if flabel_orig != NULL and flabel_orig[0]: # <<<<<<<<<<<<<< @@ -8746,7 +8951,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta goto __pyx_L10; } - /* "pyreadstat/_readstat_parser.pyx":436 + /* "pyreadstat/_readstat_parser.pyx":445 * flabel = flabel_orig * else: * flabel = None # <<<<<<<<<<<<<< @@ -8759,7 +8964,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta } __pyx_L10:; - /* "pyreadstat/_readstat_parser.pyx":437 + /* "pyreadstat/_readstat_parser.pyx":446 * else: * flabel = None * if fencoding_orig != NULL and fencoding_orig[0]: # <<<<<<<<<<<<<< @@ -8777,14 +8982,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":438 + /* "pyreadstat/_readstat_parser.pyx":447 * flabel = None * if fencoding_orig != NULL and fencoding_orig[0]: * fencoding = fencoding_orig # <<<<<<<<<<<<<< * else: * fencoding = None */ - __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_fencoding_orig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_fencoding_orig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); @@ -8792,7 +8997,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_fencoding = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":437 + /* "pyreadstat/_readstat_parser.pyx":446 * else: * flabel = None * if fencoding_orig != NULL and fencoding_orig[0]: # <<<<<<<<<<<<<< @@ -8802,7 +9007,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta goto __pyx_L13; } - /* "pyreadstat/_readstat_parser.pyx":440 + /* "pyreadstat/_readstat_parser.pyx":449 * fencoding = fencoding_orig * else: * fencoding = None # <<<<<<<<<<<<<< @@ -8815,7 +9020,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta } __pyx_L13:; - /* "pyreadstat/_readstat_parser.pyx":442 + /* "pyreadstat/_readstat_parser.pyx":451 * fencoding = None * * dc.file_encoding = fencoding # <<<<<<<<<<<<<< @@ -8828,7 +9033,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_DECREF(__pyx_v_dc->file_encoding); __pyx_v_dc->file_encoding = __pyx_v_fencoding; - /* "pyreadstat/_readstat_parser.pyx":443 + /* "pyreadstat/_readstat_parser.pyx":452 * * dc.file_encoding = fencoding * dc.file_label = flabel # <<<<<<<<<<<<<< @@ -8841,7 +9046,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __Pyx_DECREF(__pyx_v_dc->file_label); __pyx_v_dc->file_label = __pyx_v_flabel; - /* "pyreadstat/_readstat_parser.pyx":445 + /* "pyreadstat/_readstat_parser.pyx":454 * dc.file_label = flabel * * table = readstat_get_table_name(metadata) # <<<<<<<<<<<<<< @@ -8850,7 +9055,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_table = readstat_get_table_name(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":446 + /* "pyreadstat/_readstat_parser.pyx":455 * * table = readstat_get_table_name(metadata) * if table != NULL and table[0]: # <<<<<<<<<<<<<< @@ -8868,14 +9073,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_L17_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":447 + /* "pyreadstat/_readstat_parser.pyx":456 * table = readstat_get_table_name(metadata) * if table != NULL and table[0]: * dc.table_name = table # <<<<<<<<<<<<<< * * dc.ctime = readstat_get_creation_time(metadata) */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); @@ -8886,7 +9091,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_v_dc->table_name = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":446 + /* "pyreadstat/_readstat_parser.pyx":455 * * table = readstat_get_table_name(metadata) * if table != NULL and table[0]: # <<<<<<<<<<<<<< @@ -8895,7 +9100,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ } - /* "pyreadstat/_readstat_parser.pyx":449 + /* "pyreadstat/_readstat_parser.pyx":458 * dc.table_name = table * * dc.ctime = readstat_get_creation_time(metadata) # <<<<<<<<<<<<<< @@ -8904,7 +9109,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_dc->ctime = readstat_get_creation_time(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":450 + /* "pyreadstat/_readstat_parser.pyx":459 * * dc.ctime = readstat_get_creation_time(metadata) * dc.mtime = readstat_get_modified_time(metadata) # <<<<<<<<<<<<<< @@ -8913,7 +9118,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta */ __pyx_v_dc->mtime = readstat_get_modified_time(__pyx_v_metadata); - /* "pyreadstat/_readstat_parser.pyx":452 + /* "pyreadstat/_readstat_parser.pyx":461 * dc.mtime = readstat_get_modified_time(metadata) * * return READSTAT_HANDLER_OK # <<<<<<<<<<<<<< @@ -8923,7 +9128,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta __pyx_r = READSTAT_HANDLER_OK; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":368 + /* "pyreadstat/_readstat_parser.pyx":377 * * * cdef int handle_metadata(readstat_metadata_t *metadata, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -8949,7 +9154,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_metadata(readstat_meta return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":454 +/* "pyreadstat/_readstat_parser.pyx":463 * return READSTAT_HANDLER_OK * * cdef int handle_variable(int index, readstat_variable_t *variable, # <<<<<<<<<<<<<< @@ -9012,7 +9217,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_variable", 0); - /* "pyreadstat/_readstat_parser.pyx":483 + /* "pyreadstat/_readstat_parser.pyx":492 * cdef int dupcolcnt * * cdef data_container dc = ctx # <<<<<<<<<<<<<< @@ -9024,7 +9229,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_v_dc = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":484 + /* "pyreadstat/_readstat_parser.pyx":493 * * cdef data_container dc = ctx * output_format = dc.output_format # <<<<<<<<<<<<<< @@ -9036,7 +9241,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_v_output_format = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":487 + /* "pyreadstat/_readstat_parser.pyx":496 * * # get variable name, label, format and type and put into our data container * var_name = readstat_variable_get_name(variable) # <<<<<<<<<<<<<< @@ -9045,7 +9250,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_var_name = readstat_variable_get_name(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":488 + /* "pyreadstat/_readstat_parser.pyx":497 * # get variable name, label, format and type and put into our data container * var_name = readstat_variable_get_name(variable) * if var_name == NULL: # <<<<<<<<<<<<<< @@ -9055,7 +9260,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = (__pyx_v_var_name == NULL); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":489 + /* "pyreadstat/_readstat_parser.pyx":498 * var_name = readstat_variable_get_name(variable) * if var_name == NULL: * col_name = None # <<<<<<<<<<<<<< @@ -9065,7 +9270,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(Py_None); __pyx_v_col_name = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":488 + /* "pyreadstat/_readstat_parser.pyx":497 * # get variable name, label, format and type and put into our data container * var_name = readstat_variable_get_name(variable) * if var_name == NULL: # <<<<<<<<<<<<<< @@ -9075,7 +9280,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":491 + /* "pyreadstat/_readstat_parser.pyx":500 * col_name = None * else: * col_name = var_name # <<<<<<<<<<<<<< @@ -9083,7 +9288,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * # if the user introduced a list of columns to include, continue only if the column is in the list */ /*else*/ { - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_var_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_var_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); @@ -9093,7 +9298,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":494 + /* "pyreadstat/_readstat_parser.pyx":503 * * # if the user introduced a list of columns to include, continue only if the column is in the list * if dc.filter_cols and not (col_name in dc.use_cols): # <<<<<<<<<<<<<< @@ -9105,12 +9310,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = __pyx_v_dc->filter_cols; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_col_name, __pyx_v_dc->use_cols, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_col_name, __pyx_v_dc->use_cols, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":495 + /* "pyreadstat/_readstat_parser.pyx":504 * # if the user introduced a list of columns to include, continue only if the column is in the list * if dc.filter_cols and not (col_name in dc.use_cols): * dc.n_vars -= 1 # <<<<<<<<<<<<<< @@ -9119,7 +9324,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_dc->n_vars = (__pyx_v_dc->n_vars - 1); - /* "pyreadstat/_readstat_parser.pyx":496 + /* "pyreadstat/_readstat_parser.pyx":505 * if dc.filter_cols and not (col_name in dc.use_cols): * dc.n_vars -= 1 * return READSTAT_HANDLER_SKIP_VARIABLE # <<<<<<<<<<<<<< @@ -9129,7 +9334,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_r = READSTAT_HANDLER_SKIP_VARIABLE; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":494 + /* "pyreadstat/_readstat_parser.pyx":503 * * # if the user introduced a list of columns to include, continue only if the column is in the list * if dc.filter_cols and not (col_name in dc.use_cols): # <<<<<<<<<<<<<< @@ -9138,7 +9343,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":498 + /* "pyreadstat/_readstat_parser.pyx":507 * return READSTAT_HANDLER_SKIP_VARIABLE * * index = readstat_variable_get_index_after_skipping(variable) # <<<<<<<<<<<<<< @@ -9147,17 +9352,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_index = readstat_variable_get_index_after_skipping(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":500 + /* "pyreadstat/_readstat_parser.pyx":509 * index = readstat_variable_get_index_after_skipping(variable) * * if col_name in dc.col_names: # <<<<<<<<<<<<<< * dupcolcnt = 1 * while True: */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_col_name, __pyx_v_dc->col_names, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_col_name, __pyx_v_dc->col_names, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 509, __pyx_L1_error) if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":501 + /* "pyreadstat/_readstat_parser.pyx":510 * * if col_name in dc.col_names: * dupcolcnt = 1 # <<<<<<<<<<<<<< @@ -9166,7 +9371,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_dupcolcnt = 1; - /* "pyreadstat/_readstat_parser.pyx":502 + /* "pyreadstat/_readstat_parser.pyx":511 * if col_name in dc.col_names: * dupcolcnt = 1 * while True: # <<<<<<<<<<<<<< @@ -9175,28 +9380,28 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ while (1) { - /* "pyreadstat/_readstat_parser.pyx":503 + /* "pyreadstat/_readstat_parser.pyx":512 * dupcolcnt = 1 * while True: * newcolname = col_name + "_duplicated" + str(dupcolcnt) # <<<<<<<<<<<<<< * if newcolname in col_name: * dupcolcnt += 1 */ - __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_col_name, __pyx_mstate_global->__pyx_n_u_duplicated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_col_name, __pyx_mstate_global->__pyx_n_u_duplicated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dupcolcnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dupcolcnt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_newcolname, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":504 + /* "pyreadstat/_readstat_parser.pyx":513 * while True: * newcolname = col_name + "_duplicated" + str(dupcolcnt) * if newcolname in col_name: # <<<<<<<<<<<<<< @@ -9205,12 +9410,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_col_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 504, __pyx_L1_error) + __PYX_ERR(0, 513, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_newcolname, __pyx_v_col_name, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_newcolname, __pyx_v_col_name, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 513, __pyx_L1_error) if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":505 + /* "pyreadstat/_readstat_parser.pyx":514 * newcolname = col_name + "_duplicated" + str(dupcolcnt) * if newcolname in col_name: * dupcolcnt += 1 # <<<<<<<<<<<<<< @@ -9219,7 +9424,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_dupcolcnt = (__pyx_v_dupcolcnt + 1); - /* "pyreadstat/_readstat_parser.pyx":506 + /* "pyreadstat/_readstat_parser.pyx":515 * if newcolname in col_name: * dupcolcnt += 1 * continue # <<<<<<<<<<<<<< @@ -9228,7 +9433,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ goto __pyx_L8_continue; - /* "pyreadstat/_readstat_parser.pyx":504 + /* "pyreadstat/_readstat_parser.pyx":513 * while True: * newcolname = col_name + "_duplicated" + str(dupcolcnt) * if newcolname in col_name: # <<<<<<<<<<<<<< @@ -9237,7 +9442,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":508 + /* "pyreadstat/_readstat_parser.pyx":517 * continue * else: * msg = "column '{0}' is duplicated, renamed to '{1}'".format(col_name, newcolname) # <<<<<<<<<<<<<< @@ -9252,13 +9457,13 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_col_name, __pyx_v_newcolname}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_msg = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":509 + /* "pyreadstat/_readstat_parser.pyx":518 * else: * msg = "column '{0}' is duplicated, renamed to '{1}'".format(col_name, newcolname) * warnings.warn(msg) # <<<<<<<<<<<<<< @@ -9266,9 +9471,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * break */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; @@ -9288,12 +9493,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":510 + /* "pyreadstat/_readstat_parser.pyx":519 * msg = "column '{0}' is duplicated, renamed to '{1}'".format(col_name, newcolname) * warnings.warn(msg) * col_name = newcolname # <<<<<<<<<<<<<< @@ -9303,7 +9508,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_v_newcolname); __Pyx_DECREF_SET(__pyx_v_col_name, __pyx_v_newcolname); - /* "pyreadstat/_readstat_parser.pyx":511 + /* "pyreadstat/_readstat_parser.pyx":520 * warnings.warn(msg) * col_name = newcolname * break # <<<<<<<<<<<<<< @@ -9316,7 +9521,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L9_break:; - /* "pyreadstat/_readstat_parser.pyx":500 + /* "pyreadstat/_readstat_parser.pyx":509 * index = readstat_variable_get_index_after_skipping(variable) * * if col_name in dc.col_names: # <<<<<<<<<<<<<< @@ -9325,7 +9530,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":513 + /* "pyreadstat/_readstat_parser.pyx":522 * break * * dc.col_names.append(col_name) # <<<<<<<<<<<<<< @@ -9334,11 +9539,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_names == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 513, __pyx_L1_error) + __PYX_ERR(0, 522, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_names, __pyx_v_col_name); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_names, __pyx_v_col_name); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 522, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":516 + /* "pyreadstat/_readstat_parser.pyx":525 * * # the name of the value label for the variable * if val_labels != NULL: # <<<<<<<<<<<<<< @@ -9348,14 +9553,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = (__pyx_v_val_labels != NULL); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":517 + /* "pyreadstat/_readstat_parser.pyx":526 * # the name of the value label for the variable * if val_labels != NULL: * label_name = val_labels # <<<<<<<<<<<<<< * if label_name: * dc.label_to_var_name[col_name] = label_name */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_val_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_val_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); @@ -9363,7 +9568,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_v_label_name = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":518 + /* "pyreadstat/_readstat_parser.pyx":527 * if val_labels != NULL: * label_name = val_labels * if label_name: # <<<<<<<<<<<<<< @@ -9374,22 +9579,22 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i else { Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_label_name); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 518, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 527, __pyx_L1_error) __pyx_t_2 = (__pyx_temp != 0); } if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":519 + /* "pyreadstat/_readstat_parser.pyx":528 * label_name = val_labels * if label_name: * dc.label_to_var_name[col_name] = label_name # <<<<<<<<<<<<<< * * var_label = readstat_variable_get_label(variable) */ - if (unlikely((PyObject_SetItem(__pyx_v_dc->label_to_var_name, __pyx_v_col_name, __pyx_v_label_name) < 0))) __PYX_ERR(0, 519, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_dc->label_to_var_name, __pyx_v_col_name, __pyx_v_label_name) < 0))) __PYX_ERR(0, 528, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":518 + /* "pyreadstat/_readstat_parser.pyx":527 * if val_labels != NULL: * label_name = val_labels * if label_name: # <<<<<<<<<<<<<< @@ -9398,7 +9603,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":516 + /* "pyreadstat/_readstat_parser.pyx":525 * * # the name of the value label for the variable * if val_labels != NULL: # <<<<<<<<<<<<<< @@ -9407,7 +9612,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":521 + /* "pyreadstat/_readstat_parser.pyx":530 * dc.label_to_var_name[col_name] = label_name * * var_label = readstat_variable_get_label(variable) # <<<<<<<<<<<<<< @@ -9416,7 +9621,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_var_label = readstat_variable_get_label(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":522 + /* "pyreadstat/_readstat_parser.pyx":531 * * var_label = readstat_variable_get_label(variable) * if var_label == NULL: # <<<<<<<<<<<<<< @@ -9426,7 +9631,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = (__pyx_v_var_label == NULL); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":523 + /* "pyreadstat/_readstat_parser.pyx":532 * var_label = readstat_variable_get_label(variable) * if var_label == NULL: * col_label = None # <<<<<<<<<<<<<< @@ -9436,7 +9641,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(Py_None); __pyx_v_col_label = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":522 + /* "pyreadstat/_readstat_parser.pyx":531 * * var_label = readstat_variable_get_label(variable) * if var_label == NULL: # <<<<<<<<<<<<<< @@ -9446,7 +9651,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L13; } - /* "pyreadstat/_readstat_parser.pyx":525 + /* "pyreadstat/_readstat_parser.pyx":534 * col_label = None * else: * col_label = var_label # <<<<<<<<<<<<<< @@ -9454,7 +9659,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * */ /*else*/ { - __pyx_t_7 = __Pyx_PyUnicode_FromString(__pyx_v_var_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_FromString(__pyx_v_var_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); @@ -9464,7 +9669,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L13:; - /* "pyreadstat/_readstat_parser.pyx":526 + /* "pyreadstat/_readstat_parser.pyx":535 * else: * col_label = var_label * dc.col_labels.append(col_label) # <<<<<<<<<<<<<< @@ -9473,11 +9678,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_labels == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 526, __pyx_L1_error) + __PYX_ERR(0, 535, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_labels, __pyx_v_col_label); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_labels, __pyx_v_col_label); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 535, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":529 + /* "pyreadstat/_readstat_parser.pyx":538 * * # format, we have to transform it in something more usable * var_format = readstat_variable_get_format(variable) # <<<<<<<<<<<<<< @@ -9486,7 +9691,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_var_format = readstat_variable_get_format(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":530 + /* "pyreadstat/_readstat_parser.pyx":539 * # format, we have to transform it in something more usable * var_format = readstat_variable_get_format(variable) * if var_format == NULL: # <<<<<<<<<<<<<< @@ -9496,7 +9701,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = (__pyx_v_var_format == NULL); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":532 + /* "pyreadstat/_readstat_parser.pyx":541 * if var_format == NULL: * #col_format_original = "NULL" * col_format_original = None # <<<<<<<<<<<<<< @@ -9506,7 +9711,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(Py_None); __pyx_v_col_format_original = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":530 + /* "pyreadstat/_readstat_parser.pyx":539 * # format, we have to transform it in something more usable * var_format = readstat_variable_get_format(variable) * if var_format == NULL: # <<<<<<<<<<<<<< @@ -9516,7 +9721,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L14; } - /* "pyreadstat/_readstat_parser.pyx":534 + /* "pyreadstat/_readstat_parser.pyx":543 * col_format_original = None * else: * col_format_original = var_format # <<<<<<<<<<<<<< @@ -9524,7 +9729,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * dc.col_formats_original.append(col_format_original) */ /*else*/ { - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_var_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_var_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); @@ -9534,7 +9739,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L14:; - /* "pyreadstat/_readstat_parser.pyx":535 + /* "pyreadstat/_readstat_parser.pyx":544 * else: * col_format_original = var_format * file_format = dc.file_format # <<<<<<<<<<<<<< @@ -9544,7 +9749,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_9 = __pyx_v_dc->file_format; __pyx_v_file_format = __pyx_t_9; - /* "pyreadstat/_readstat_parser.pyx":536 + /* "pyreadstat/_readstat_parser.pyx":545 * col_format_original = var_format * file_format = dc.file_format * dc.col_formats_original.append(col_format_original) # <<<<<<<<<<<<<< @@ -9553,21 +9758,21 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_formats_original == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 536, __pyx_L1_error) + __PYX_ERR(0, 545, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_formats_original, __pyx_v_col_format_original); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_formats_original, __pyx_v_col_format_original); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 545, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":537 + /* "pyreadstat/_readstat_parser.pyx":546 * file_format = dc.file_format * dc.col_formats_original.append(col_format_original) * col_format_final = transform_variable_format(col_format_original, file_format) # <<<<<<<<<<<<<< * dc.col_formats.append(col_format_final) * # readstat type */ - __pyx_t_10 = __pyx_f_10pyreadstat_16_readstat_parser_transform_variable_format(__pyx_v_col_format_original, __pyx_v_file_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_10 = __pyx_f_10pyreadstat_16_readstat_parser_transform_variable_format(__pyx_v_col_format_original, __pyx_v_file_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L1_error) __pyx_v_col_format_final = __pyx_t_10; - /* "pyreadstat/_readstat_parser.pyx":538 + /* "pyreadstat/_readstat_parser.pyx":547 * dc.col_formats_original.append(col_format_original) * col_format_final = transform_variable_format(col_format_original, file_format) * dc.col_formats.append(col_format_final) # <<<<<<<<<<<<<< @@ -9576,14 +9781,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 538, __pyx_L1_error) + __PYX_ERR(0, 547, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_v_col_format_final); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_From___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_v_col_format_final); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_formats, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_formats, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":540 + /* "pyreadstat/_readstat_parser.pyx":549 * dc.col_formats.append(col_format_final) * # readstat type * var_type = readstat_variable_get_type(variable) # <<<<<<<<<<<<<< @@ -9592,7 +9797,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_var_type = readstat_variable_get_type(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":541 + /* "pyreadstat/_readstat_parser.pyx":550 * # readstat type * var_type = readstat_variable_get_type(variable) * dc.col_dtypes.append(var_type) # <<<<<<<<<<<<<< @@ -9601,14 +9806,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_dtypes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 541, __pyx_L1_error) + __PYX_ERR(0, 550, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(__pyx_v_var_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(__pyx_v_var_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_dtypes, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_dtypes, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":544 + /* "pyreadstat/_readstat_parser.pyx":553 * # equivalent numpy type * # if it's a date then we need object * if col_format_final != DATE_FORMAT_NOTADATE and dc.no_datetime_conversion == 0: # <<<<<<<<<<<<<< @@ -9626,7 +9831,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":545 + /* "pyreadstat/_readstat_parser.pyx":554 * # if it's a date then we need object * if col_format_final != DATE_FORMAT_NOTADATE and dc.no_datetime_conversion == 0: * curnptype = object # <<<<<<<<<<<<<< @@ -9636,7 +9841,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_builtin_object); __pyx_v_curnptype = __pyx_builtin_object; - /* "pyreadstat/_readstat_parser.pyx":544 + /* "pyreadstat/_readstat_parser.pyx":553 * # equivalent numpy type * # if it's a date then we need object * if col_format_final != DATE_FORMAT_NOTADATE and dc.no_datetime_conversion == 0: # <<<<<<<<<<<<<< @@ -9646,7 +9851,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L15; } - /* "pyreadstat/_readstat_parser.pyx":547 + /* "pyreadstat/_readstat_parser.pyx":556 * curnptype = object * else: * curnptype = readstat_to_numpy_types[var_type] # <<<<<<<<<<<<<< @@ -9656,11 +9861,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i /*else*/ { if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 547, __pyx_L1_error) + __PYX_ERR(0, 556, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(__pyx_v_var_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(__pyx_v_var_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_curnptype = __pyx_t_1; @@ -9668,7 +9873,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L15:; - /* "pyreadstat/_readstat_parser.pyx":548 + /* "pyreadstat/_readstat_parser.pyx":557 * else: * curnptype = readstat_to_numpy_types[var_type] * iscurnptypefloat = 0 # <<<<<<<<<<<<<< @@ -9677,7 +9882,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_iscurnptypefloat = 0; - /* "pyreadstat/_readstat_parser.pyx":549 + /* "pyreadstat/_readstat_parser.pyx":558 * curnptype = readstat_to_numpy_types[var_type] * iscurnptypefloat = 0 * iscurnptypeobject = 0 # <<<<<<<<<<<<<< @@ -9686,7 +9891,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_iscurnptypeobject = 0; - /* "pyreadstat/_readstat_parser.pyx":551 + /* "pyreadstat/_readstat_parser.pyx":560 * iscurnptypeobject = 0 * # book keeping numpy types * dc.col_numpy_dtypes[index] = curnptype # <<<<<<<<<<<<<< @@ -9695,23 +9900,23 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_numpy_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 551, __pyx_L1_error) + __PYX_ERR(0, 560, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_v_curnptype, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 551, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_v_curnptype, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 560, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":552 + /* "pyreadstat/_readstat_parser.pyx":561 * # book keeping numpy types * dc.col_numpy_dtypes[index] = curnptype * if curnptype == object: # <<<<<<<<<<<<<< * iscurnptypeobject = 1 * if curnptype == np.float64: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_curnptype, __pyx_builtin_object, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_curnptype, __pyx_builtin_object, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":553 + /* "pyreadstat/_readstat_parser.pyx":562 * dc.col_numpy_dtypes[index] = curnptype * if curnptype == object: * iscurnptypeobject = 1 # <<<<<<<<<<<<<< @@ -9720,7 +9925,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_iscurnptypeobject = 1; - /* "pyreadstat/_readstat_parser.pyx":552 + /* "pyreadstat/_readstat_parser.pyx":561 * # book keeping numpy types * dc.col_numpy_dtypes[index] = curnptype * if curnptype == object: # <<<<<<<<<<<<<< @@ -9729,25 +9934,25 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":554 + /* "pyreadstat/_readstat_parser.pyx":563 * if curnptype == object: * iscurnptypeobject = 1 * if curnptype == np.float64: # <<<<<<<<<<<<<< * iscurnptypefloat = 1 * dc.col_dtypes_isobject[index] = iscurnptypeobject */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_v_curnptype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_curnptype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":555 + /* "pyreadstat/_readstat_parser.pyx":564 * iscurnptypeobject = 1 * if curnptype == np.float64: * iscurnptypefloat = 1 # <<<<<<<<<<<<<< @@ -9756,7 +9961,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_iscurnptypefloat = 1; - /* "pyreadstat/_readstat_parser.pyx":554 + /* "pyreadstat/_readstat_parser.pyx":563 * if curnptype == object: * iscurnptypeobject = 1 * if curnptype == np.float64: # <<<<<<<<<<<<<< @@ -9765,39 +9970,39 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":556 + /* "pyreadstat/_readstat_parser.pyx":565 * if curnptype == np.float64: * iscurnptypefloat = 1 * dc.col_dtypes_isobject[index] = iscurnptypeobject # <<<<<<<<<<<<<< * dc.col_dytpes_isfloat[index] = iscurnptypefloat * metaonly = dc.metaonly */ - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_iscurnptypeobject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_iscurnptypeobject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_dc->col_dtypes_isobject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 556, __pyx_L1_error) + __PYX_ERR(0, 565, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 556, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":557 + /* "pyreadstat/_readstat_parser.pyx":566 * iscurnptypefloat = 1 * dc.col_dtypes_isobject[index] = iscurnptypeobject * dc.col_dytpes_isfloat[index] = iscurnptypefloat # <<<<<<<<<<<<<< * metaonly = dc.metaonly * # pre-allocate data */ - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_iscurnptypefloat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_iscurnptypefloat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_dc->col_dytpes_isfloat == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 557, __pyx_L1_error) + __PYX_ERR(0, 566, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 557, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":558 + /* "pyreadstat/_readstat_parser.pyx":567 * dc.col_dtypes_isobject[index] = iscurnptypeobject * dc.col_dytpes_isfloat[index] = iscurnptypefloat * metaonly = dc.metaonly # <<<<<<<<<<<<<< @@ -9807,7 +10012,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = __pyx_v_dc->metaonly; __pyx_v_metaonly = __pyx_t_2; - /* "pyreadstat/_readstat_parser.pyx":560 + /* "pyreadstat/_readstat_parser.pyx":569 * metaonly = dc.metaonly * # pre-allocate data * if metaonly: # <<<<<<<<<<<<<< @@ -9816,17 +10021,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (__pyx_v_metaonly) { - /* "pyreadstat/_readstat_parser.pyx":561 + /* "pyreadstat/_readstat_parser.pyx":570 * # pre-allocate data * if metaonly: * if output_format == "pandas": # <<<<<<<<<<<<<< * row = np.empty(1, dtype=curnptype) * else: */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 570, __pyx_L1_error) if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":562 + /* "pyreadstat/_readstat_parser.pyx":571 * if metaonly: * if output_format == "pandas": * row = np.empty(1, dtype=curnptype) # <<<<<<<<<<<<<< @@ -9834,9 +10039,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * row = list() */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; @@ -9853,20 +10058,20 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_mstate_global->__pyx_int_1}; - __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 571, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_row = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":561 + /* "pyreadstat/_readstat_parser.pyx":570 * # pre-allocate data * if metaonly: * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -9876,7 +10081,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L21; } - /* "pyreadstat/_readstat_parser.pyx":564 + /* "pyreadstat/_readstat_parser.pyx":573 * row = np.empty(1, dtype=curnptype) * else: * row = list() # <<<<<<<<<<<<<< @@ -9884,14 +10089,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * obs_count = dc.n_obs */ /*else*/ { - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_row = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L21:; - /* "pyreadstat/_readstat_parser.pyx":560 + /* "pyreadstat/_readstat_parser.pyx":569 * metaonly = dc.metaonly * # pre-allocate data * if metaonly: # <<<<<<<<<<<<<< @@ -9901,7 +10106,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L20; } - /* "pyreadstat/_readstat_parser.pyx":566 + /* "pyreadstat/_readstat_parser.pyx":575 * row = list() * else: * obs_count = dc.n_obs # <<<<<<<<<<<<<< @@ -9912,17 +10117,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_11 = __pyx_v_dc->n_obs; __pyx_v_obs_count = __pyx_t_11; - /* "pyreadstat/_readstat_parser.pyx":567 + /* "pyreadstat/_readstat_parser.pyx":576 * else: * obs_count = dc.n_obs * if output_format == "pandas": # <<<<<<<<<<<<<< * row = np.empty(obs_count, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 576, __pyx_L1_error) if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":568 + /* "pyreadstat/_readstat_parser.pyx":577 * obs_count = dc.n_obs * if output_format == "pandas": * row = np.empty(obs_count, dtype=curnptype) # <<<<<<<<<<<<<< @@ -9930,12 +10135,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * row.fill(np.nan) */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_obs_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_obs_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -9951,21 +10156,21 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_5}; - __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 568, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 577, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_row = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":569 + /* "pyreadstat/_readstat_parser.pyx":578 * if output_format == "pandas": * row = np.empty(obs_count, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: # <<<<<<<<<<<<<< @@ -9981,7 +10186,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_L24_bool_binop_done:; if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":570 + /* "pyreadstat/_readstat_parser.pyx":579 * row = np.empty(obs_count, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: * row.fill(np.nan) # <<<<<<<<<<<<<< @@ -9990,9 +10195,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_t_7 = __pyx_v_row; __Pyx_INCREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_6 = 0; @@ -10001,12 +10206,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":569 + /* "pyreadstat/_readstat_parser.pyx":578 * if output_format == "pandas": * row = np.empty(obs_count, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: # <<<<<<<<<<<<<< @@ -10015,7 +10220,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":567 + /* "pyreadstat/_readstat_parser.pyx":576 * else: * obs_count = dc.n_obs * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -10025,7 +10230,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i goto __pyx_L22; } - /* "pyreadstat/_readstat_parser.pyx":572 + /* "pyreadstat/_readstat_parser.pyx":581 * row.fill(np.nan) * else: * row = [None] * obs_count # <<<<<<<<<<<<<< @@ -10033,13 +10238,13 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i * */ /*else*/ { - __pyx_t_1 = PyList_New(1 * ((__pyx_v_obs_count<0) ? 0:__pyx_v_obs_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_obs_count<0) ? 0:__pyx_v_obs_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_obs_count; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 572, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 581, __pyx_L1_error); } } __pyx_v_row = __pyx_t_1; @@ -10049,7 +10254,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i } __pyx_L20:; - /* "pyreadstat/_readstat_parser.pyx":573 + /* "pyreadstat/_readstat_parser.pyx":582 * else: * row = [None] * obs_count * dc.col_data.append(row) # <<<<<<<<<<<<<< @@ -10058,11 +10263,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 573, __pyx_L1_error) + __PYX_ERR(0, 582, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_data, __pyx_v_row); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 573, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_dc->col_data, __pyx_v_row); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 582, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":576 + /* "pyreadstat/_readstat_parser.pyx":585 * * # missing values * if dc.usernan: # <<<<<<<<<<<<<< @@ -10071,7 +10276,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (__pyx_v_dc->usernan) { - /* "pyreadstat/_readstat_parser.pyx":577 + /* "pyreadstat/_readstat_parser.pyx":586 * # missing values * if dc.usernan: * n_ranges = readstat_variable_get_missing_ranges_count(variable) # <<<<<<<<<<<<<< @@ -10080,7 +10285,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_n_ranges = readstat_variable_get_missing_ranges_count(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":578 + /* "pyreadstat/_readstat_parser.pyx":587 * if dc.usernan: * n_ranges = readstat_variable_get_missing_ranges_count(variable) * if n_ranges>0: # <<<<<<<<<<<<<< @@ -10090,19 +10295,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_t_2 = (__pyx_v_n_ranges > 0); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":579 + /* "pyreadstat/_readstat_parser.pyx":588 * n_ranges = readstat_variable_get_missing_ranges_count(variable) * if n_ranges>0: * missing_ranges = list() # <<<<<<<<<<<<<< * for i in range(0, n_ranges): * loval = readstat_variable_get_missing_range_lo(variable, i) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_missing_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":580 + /* "pyreadstat/_readstat_parser.pyx":589 * if n_ranges>0: * missing_ranges = list() * for i in range(0, n_ranges): # <<<<<<<<<<<<<< @@ -10114,7 +10319,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "pyreadstat/_readstat_parser.pyx":581 + /* "pyreadstat/_readstat_parser.pyx":590 * missing_ranges = list() * for i in range(0, n_ranges): * loval = readstat_variable_get_missing_range_lo(variable, i) # <<<<<<<<<<<<<< @@ -10123,19 +10328,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_loval = readstat_variable_get_missing_range_lo(__pyx_v_variable, __pyx_v_i); - /* "pyreadstat/_readstat_parser.pyx":582 + /* "pyreadstat/_readstat_parser.pyx":591 * for i in range(0, n_ranges): * loval = readstat_variable_get_missing_range_lo(variable, i) * pyloval = convert_readstat_to_python_value(loval, index, dc) # <<<<<<<<<<<<<< * hival = readstat_variable_get_missing_range_hi(variable, i) * pyhival = convert_readstat_to_python_value(hival, index, dc) */ - __pyx_t_1 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_loval, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_loval, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pyloval, __pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":583 + /* "pyreadstat/_readstat_parser.pyx":592 * loval = readstat_variable_get_missing_range_lo(variable, i) * pyloval = convert_readstat_to_python_value(loval, index, dc) * hival = readstat_variable_get_missing_range_hi(variable, i) # <<<<<<<<<<<<<< @@ -10144,34 +10349,34 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_hival = readstat_variable_get_missing_range_hi(__pyx_v_variable, __pyx_v_i); - /* "pyreadstat/_readstat_parser.pyx":584 + /* "pyreadstat/_readstat_parser.pyx":593 * pyloval = convert_readstat_to_python_value(loval, index, dc) * hival = readstat_variable_get_missing_range_hi(variable, i) * pyhival = convert_readstat_to_python_value(hival, index, dc) # <<<<<<<<<<<<<< * missing_ranges.append({'lo':pyloval, 'hi':pyhival}) * dc.missing_ranges[col_name] = missing_ranges */ - __pyx_t_1 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_hival, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_hival, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pyhival, __pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":585 + /* "pyreadstat/_readstat_parser.pyx":594 * hival = readstat_variable_get_missing_range_hi(variable, i) * pyhival = convert_readstat_to_python_value(hival, index, dc) * missing_ranges.append({'lo':pyloval, 'hi':pyhival}) # <<<<<<<<<<<<<< * dc.missing_ranges[col_name] = missing_ranges * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lo, __pyx_v_pyloval) < (0)) __PYX_ERR(0, 585, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_hi, __pyx_v_pyhival) < (0)) __PYX_ERR(0, 585, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_missing_ranges, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 585, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lo, __pyx_v_pyloval) < (0)) __PYX_ERR(0, 594, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_hi, __pyx_v_pyhival) < (0)) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_missing_ranges, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "pyreadstat/_readstat_parser.pyx":586 + /* "pyreadstat/_readstat_parser.pyx":595 * pyhival = convert_readstat_to_python_value(hival, index, dc) * missing_ranges.append({'lo':pyloval, 'hi':pyhival}) * dc.missing_ranges[col_name] = missing_ranges # <<<<<<<<<<<<<< @@ -10180,11 +10385,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ if (unlikely(__pyx_v_dc->missing_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 586, __pyx_L1_error) + __PYX_ERR(0, 595, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_dc->missing_ranges, __pyx_v_col_name, __pyx_v_missing_ranges) < 0))) __PYX_ERR(0, 586, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_dc->missing_ranges, __pyx_v_col_name, __pyx_v_missing_ranges) < 0))) __PYX_ERR(0, 595, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":578 + /* "pyreadstat/_readstat_parser.pyx":587 * if dc.usernan: * n_ranges = readstat_variable_get_missing_ranges_count(variable) * if n_ranges>0: # <<<<<<<<<<<<<< @@ -10193,7 +10398,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":576 + /* "pyreadstat/_readstat_parser.pyx":585 * * # missing values * if dc.usernan: # <<<<<<<<<<<<<< @@ -10202,7 +10407,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ } - /* "pyreadstat/_readstat_parser.pyx":589 + /* "pyreadstat/_readstat_parser.pyx":598 * * cdef size_t storage_width * storage_width = readstat_variable_get_storage_width(variable) # <<<<<<<<<<<<<< @@ -10211,35 +10416,35 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_storage_width = readstat_variable_get_storage_width(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":590 + /* "pyreadstat/_readstat_parser.pyx":599 * cdef size_t storage_width * storage_width = readstat_variable_get_storage_width(variable) * dc.variable_storage_width[col_name] = storage_width # <<<<<<<<<<<<<< * * dc.variable_display_width[col_name] = readstat_variable_get_display_width(variable) */ - __pyx_t_1 = __Pyx_PyLong_From_int(((int)__pyx_v_storage_width)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(((int)__pyx_v_storage_width)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_dc->variable_storage_width == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 590, __pyx_L1_error) + __PYX_ERR(0, 599, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_v_dc->variable_storage_width, __pyx_v_col_name, __pyx_t_1) < 0))) __PYX_ERR(0, 590, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_dc->variable_storage_width, __pyx_v_col_name, __pyx_t_1) < 0))) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":592 + /* "pyreadstat/_readstat_parser.pyx":601 * dc.variable_storage_width[col_name] = storage_width * * dc.variable_display_width[col_name] = readstat_variable_get_display_width(variable) # <<<<<<<<<<<<<< * * cdef readstat_alignment_t align */ - __pyx_t_1 = __Pyx_PyLong_From_int(readstat_variable_get_display_width(__pyx_v_variable)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(readstat_variable_get_display_width(__pyx_v_variable)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_display_width, __pyx_v_col_name, __pyx_t_1) < 0))) __PYX_ERR(0, 592, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_display_width, __pyx_v_col_name, __pyx_t_1) < 0))) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":596 + /* "pyreadstat/_readstat_parser.pyx":605 * cdef readstat_alignment_t align * cdef str pyalign * align = readstat_variable_get_alignment(variable) # <<<<<<<<<<<<<< @@ -10248,7 +10453,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_align = readstat_variable_get_alignment(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":597 + /* "pyreadstat/_readstat_parser.pyx":606 * cdef str pyalign * align = readstat_variable_get_alignment(variable) * if align == READSTAT_ALIGNMENT_UNKNOWN: # <<<<<<<<<<<<<< @@ -10258,7 +10463,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i switch (__pyx_v_align) { case READSTAT_ALIGNMENT_UNKNOWN: - /* "pyreadstat/_readstat_parser.pyx":598 + /* "pyreadstat/_readstat_parser.pyx":607 * align = readstat_variable_get_alignment(variable) * if align == READSTAT_ALIGNMENT_UNKNOWN: * pyalign = "unknown" # <<<<<<<<<<<<<< @@ -10268,7 +10473,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_unknown); __pyx_v_pyalign = __pyx_mstate_global->__pyx_n_u_unknown; - /* "pyreadstat/_readstat_parser.pyx":597 + /* "pyreadstat/_readstat_parser.pyx":606 * cdef str pyalign * align = readstat_variable_get_alignment(variable) * if align == READSTAT_ALIGNMENT_UNKNOWN: # <<<<<<<<<<<<<< @@ -10278,7 +10483,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_ALIGNMENT_LEFT: - /* "pyreadstat/_readstat_parser.pyx":600 + /* "pyreadstat/_readstat_parser.pyx":609 * pyalign = "unknown" * elif align == READSTAT_ALIGNMENT_LEFT: * pyalign = "left" # <<<<<<<<<<<<<< @@ -10288,7 +10493,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_left); __pyx_v_pyalign = __pyx_mstate_global->__pyx_n_u_left; - /* "pyreadstat/_readstat_parser.pyx":599 + /* "pyreadstat/_readstat_parser.pyx":608 * if align == READSTAT_ALIGNMENT_UNKNOWN: * pyalign = "unknown" * elif align == READSTAT_ALIGNMENT_LEFT: # <<<<<<<<<<<<<< @@ -10298,7 +10503,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_ALIGNMENT_CENTER: - /* "pyreadstat/_readstat_parser.pyx":602 + /* "pyreadstat/_readstat_parser.pyx":611 * pyalign = "left" * elif align == READSTAT_ALIGNMENT_CENTER: * pyalign = "center" # <<<<<<<<<<<<<< @@ -10308,7 +10513,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_center); __pyx_v_pyalign = __pyx_mstate_global->__pyx_n_u_center; - /* "pyreadstat/_readstat_parser.pyx":601 + /* "pyreadstat/_readstat_parser.pyx":610 * elif align == READSTAT_ALIGNMENT_LEFT: * pyalign = "left" * elif align == READSTAT_ALIGNMENT_CENTER: # <<<<<<<<<<<<<< @@ -10318,7 +10523,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_ALIGNMENT_RIGHT: - /* "pyreadstat/_readstat_parser.pyx":604 + /* "pyreadstat/_readstat_parser.pyx":613 * pyalign = "center" * elif align == READSTAT_ALIGNMENT_RIGHT: * pyalign = "right" # <<<<<<<<<<<<<< @@ -10328,7 +10533,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_right); __pyx_v_pyalign = __pyx_mstate_global->__pyx_n_u_right; - /* "pyreadstat/_readstat_parser.pyx":603 + /* "pyreadstat/_readstat_parser.pyx":612 * elif align == READSTAT_ALIGNMENT_CENTER: * pyalign = "center" * elif align == READSTAT_ALIGNMENT_RIGHT: # <<<<<<<<<<<<<< @@ -10338,7 +10543,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; default: - /* "pyreadstat/_readstat_parser.pyx":606 + /* "pyreadstat/_readstat_parser.pyx":615 * pyalign = "right" * else: * pyalign = "undetermined" # <<<<<<<<<<<<<< @@ -10350,16 +10555,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; } - /* "pyreadstat/_readstat_parser.pyx":608 + /* "pyreadstat/_readstat_parser.pyx":617 * pyalign = "undetermined" * * dc.variable_alignment[col_name] = pyalign # <<<<<<<<<<<<<< * * cdef readstat_measure_t measure */ - if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_alignment, __pyx_v_col_name, __pyx_v_pyalign) < 0))) __PYX_ERR(0, 608, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_alignment, __pyx_v_col_name, __pyx_v_pyalign) < 0))) __PYX_ERR(0, 617, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":612 + /* "pyreadstat/_readstat_parser.pyx":621 * cdef readstat_measure_t measure * cdef str pymeasure * measure = readstat_variable_get_measure(variable) # <<<<<<<<<<<<<< @@ -10368,7 +10573,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i */ __pyx_v_measure = readstat_variable_get_measure(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":613 + /* "pyreadstat/_readstat_parser.pyx":622 * cdef str pymeasure * measure = readstat_variable_get_measure(variable) * if measure == READSTAT_MEASURE_UNKNOWN: # <<<<<<<<<<<<<< @@ -10378,7 +10583,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i switch (__pyx_v_measure) { case READSTAT_MEASURE_UNKNOWN: - /* "pyreadstat/_readstat_parser.pyx":614 + /* "pyreadstat/_readstat_parser.pyx":623 * measure = readstat_variable_get_measure(variable) * if measure == READSTAT_MEASURE_UNKNOWN: * pymeasure = "unknown" # <<<<<<<<<<<<<< @@ -10388,7 +10593,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_unknown); __pyx_v_pymeasure = __pyx_mstate_global->__pyx_n_u_unknown; - /* "pyreadstat/_readstat_parser.pyx":613 + /* "pyreadstat/_readstat_parser.pyx":622 * cdef str pymeasure * measure = readstat_variable_get_measure(variable) * if measure == READSTAT_MEASURE_UNKNOWN: # <<<<<<<<<<<<<< @@ -10398,7 +10603,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_MEASURE_NOMINAL: - /* "pyreadstat/_readstat_parser.pyx":616 + /* "pyreadstat/_readstat_parser.pyx":625 * pymeasure = "unknown" * elif measure == READSTAT_MEASURE_NOMINAL: * pymeasure = "nominal" # <<<<<<<<<<<<<< @@ -10408,7 +10613,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_nominal); __pyx_v_pymeasure = __pyx_mstate_global->__pyx_n_u_nominal; - /* "pyreadstat/_readstat_parser.pyx":615 + /* "pyreadstat/_readstat_parser.pyx":624 * if measure == READSTAT_MEASURE_UNKNOWN: * pymeasure = "unknown" * elif measure == READSTAT_MEASURE_NOMINAL: # <<<<<<<<<<<<<< @@ -10418,7 +10623,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_MEASURE_ORDINAL: - /* "pyreadstat/_readstat_parser.pyx":618 + /* "pyreadstat/_readstat_parser.pyx":627 * pymeasure = "nominal" * elif measure == READSTAT_MEASURE_ORDINAL: * pymeasure = "ordinal" # <<<<<<<<<<<<<< @@ -10428,7 +10633,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ordinal); __pyx_v_pymeasure = __pyx_mstate_global->__pyx_n_u_ordinal; - /* "pyreadstat/_readstat_parser.pyx":617 + /* "pyreadstat/_readstat_parser.pyx":626 * elif measure == READSTAT_MEASURE_NOMINAL: * pymeasure = "nominal" * elif measure == READSTAT_MEASURE_ORDINAL: # <<<<<<<<<<<<<< @@ -10438,7 +10643,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; case READSTAT_MEASURE_SCALE: - /* "pyreadstat/_readstat_parser.pyx":620 + /* "pyreadstat/_readstat_parser.pyx":629 * pymeasure = "ordinal" * elif measure == READSTAT_MEASURE_SCALE: * pymeasure = "scale" # <<<<<<<<<<<<<< @@ -10448,7 +10653,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_scale); __pyx_v_pymeasure = __pyx_mstate_global->__pyx_n_u_scale; - /* "pyreadstat/_readstat_parser.pyx":619 + /* "pyreadstat/_readstat_parser.pyx":628 * elif measure == READSTAT_MEASURE_ORDINAL: * pymeasure = "ordinal" * elif measure == READSTAT_MEASURE_SCALE: # <<<<<<<<<<<<<< @@ -10458,7 +10663,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; default: - /* "pyreadstat/_readstat_parser.pyx":622 + /* "pyreadstat/_readstat_parser.pyx":631 * pymeasure = "scale" * else: * pymeasure = "undetermined" # <<<<<<<<<<<<<< @@ -10470,16 +10675,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i break; } - /* "pyreadstat/_readstat_parser.pyx":624 + /* "pyreadstat/_readstat_parser.pyx":633 * pymeasure = "undetermined" * * dc.variable_measure[col_name] = pymeasure # <<<<<<<<<<<<<< * * return READSTAT_HANDLER_OK */ - if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_measure, __pyx_v_col_name, __pyx_v_pymeasure) < 0))) __PYX_ERR(0, 624, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_dc->variable_measure, __pyx_v_col_name, __pyx_v_pymeasure) < 0))) __PYX_ERR(0, 633, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":626 + /* "pyreadstat/_readstat_parser.pyx":635 * dc.variable_measure[col_name] = pymeasure * * return READSTAT_HANDLER_OK # <<<<<<<<<<<<<< @@ -10489,7 +10694,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i __pyx_r = READSTAT_HANDLER_OK; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":454 + /* "pyreadstat/_readstat_parser.pyx":463 * return READSTAT_HANDLER_OK * * cdef int handle_variable(int index, readstat_variable_t *variable, # <<<<<<<<<<<<<< @@ -10526,7 +10731,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_variable(int __pyx_v_i return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":629 +/* "pyreadstat/_readstat_parser.pyx":638 * * * cdef int handle_value(int obs_index, readstat_variable_t * variable, readstat_value_t value, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -10564,7 +10769,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_value", 0); - /* "pyreadstat/_readstat_parser.pyx":650 + /* "pyreadstat/_readstat_parser.pyx":659 * * # extract variables we need from data container * dc = ctx # <<<<<<<<<<<<<< @@ -10576,7 +10781,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_v_dc = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":651 + /* "pyreadstat/_readstat_parser.pyx":660 * # extract variables we need from data container * dc = ctx * output_format = dc.output_format # <<<<<<<<<<<<<< @@ -10588,7 +10793,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_v_output_format = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":652 + /* "pyreadstat/_readstat_parser.pyx":661 * dc = ctx * output_format = dc.output_format * index = readstat_variable_get_index_after_skipping(variable) # <<<<<<<<<<<<<< @@ -10597,7 +10802,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_index = readstat_variable_get_index_after_skipping(__pyx_v_variable); - /* "pyreadstat/_readstat_parser.pyx":653 + /* "pyreadstat/_readstat_parser.pyx":662 * output_format = dc.output_format * index = readstat_variable_get_index_after_skipping(variable) * max_n_obs = dc.max_n_obs # <<<<<<<<<<<<<< @@ -10607,7 +10812,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_2 = __pyx_v_dc->max_n_obs; __pyx_v_max_n_obs = __pyx_t_2; - /* "pyreadstat/_readstat_parser.pyx":654 + /* "pyreadstat/_readstat_parser.pyx":663 * index = readstat_variable_get_index_after_skipping(variable) * max_n_obs = dc.max_n_obs * is_unkown_number_rows = dc.is_unkown_number_rows # <<<<<<<<<<<<<< @@ -10617,7 +10822,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = __pyx_v_dc->is_unkown_number_rows; __pyx_v_is_unkown_number_rows = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":658 + /* "pyreadstat/_readstat_parser.pyx":667 * # check that we still have enough room in our pre-allocated lists * # if not, add more room * iscurnptypeobject = dc.col_dtypes_isobject[index] # <<<<<<<<<<<<<< @@ -10626,15 +10831,15 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dtypes_isobject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 658, __pyx_L1_error) + __PYX_ERR(0, 667, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_iscurnptypeobject = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":659 + /* "pyreadstat/_readstat_parser.pyx":668 * # if not, add more room * iscurnptypeobject = dc.col_dtypes_isobject[index] * iscurnptypefloat = dc.col_dytpes_isfloat[index] # <<<<<<<<<<<<<< @@ -10643,15 +10848,15 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dytpes_isfloat == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 659, __pyx_L1_error) + __PYX_ERR(0, 668, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_iscurnptypefloat = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":660 + /* "pyreadstat/_readstat_parser.pyx":669 * iscurnptypeobject = dc.col_dtypes_isobject[index] * iscurnptypefloat = dc.col_dytpes_isfloat[index] * if is_unkown_number_rows: # <<<<<<<<<<<<<< @@ -10660,7 +10865,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (__pyx_v_is_unkown_number_rows) { - /* "pyreadstat/_readstat_parser.pyx":661 + /* "pyreadstat/_readstat_parser.pyx":670 * iscurnptypefloat = dc.col_dytpes_isfloat[index] * if is_unkown_number_rows: * if max_n_obs <= obs_index: # <<<<<<<<<<<<<< @@ -10670,7 +10875,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (__pyx_v_max_n_obs <= __pyx_v_obs_index); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":662 + /* "pyreadstat/_readstat_parser.pyx":671 * if is_unkown_number_rows: * if max_n_obs <= obs_index: * dc.max_n_obs = obs_index + 1 # <<<<<<<<<<<<<< @@ -10679,7 +10884,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_dc->max_n_obs = (__pyx_v_obs_index + 1); - /* "pyreadstat/_readstat_parser.pyx":661 + /* "pyreadstat/_readstat_parser.pyx":670 * iscurnptypefloat = dc.col_dytpes_isfloat[index] * if is_unkown_number_rows: * if max_n_obs <= obs_index: # <<<<<<<<<<<<<< @@ -10688,7 +10893,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":663 + /* "pyreadstat/_readstat_parser.pyx":672 * if max_n_obs <= obs_index: * dc.max_n_obs = obs_index + 1 * var_max_rows = dc.col_data_len[index] # <<<<<<<<<<<<<< @@ -10697,15 +10902,15 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data_len == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 663, __pyx_L1_error) + __PYX_ERR(0, 672, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data_len, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data_len, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_var_max_rows = __pyx_t_2; - /* "pyreadstat/_readstat_parser.pyx":664 + /* "pyreadstat/_readstat_parser.pyx":673 * dc.max_n_obs = obs_index + 1 * var_max_rows = dc.col_data_len[index] * if var_max_rows <= obs_index: # <<<<<<<<<<<<<< @@ -10715,17 +10920,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (__pyx_v_var_max_rows <= __pyx_v_obs_index); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":665 + /* "pyreadstat/_readstat_parser.pyx":674 * var_max_rows = dc.col_data_len[index] * if var_max_rows <= obs_index: * if output_format == "pandas": # <<<<<<<<<<<<<< * curnptype = dc.col_numpy_dtypes[index] * buf_list = np.empty(100000, dtype=curnptype) */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 674, __pyx_L1_error) if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":666 + /* "pyreadstat/_readstat_parser.pyx":675 * if var_max_rows <= obs_index: * if output_format == "pandas": * curnptype = dc.col_numpy_dtypes[index] # <<<<<<<<<<<<<< @@ -10734,14 +10939,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_numpy_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 666, __pyx_L1_error) + __PYX_ERR(0, 675, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_curnptype = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":667 + /* "pyreadstat/_readstat_parser.pyx":676 * if output_format == "pandas": * curnptype = dc.col_numpy_dtypes[index] * buf_list = np.empty(100000, dtype=curnptype) # <<<<<<<<<<<<<< @@ -10749,9 +10954,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ * buf_list.fill(np.nan) */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; @@ -10768,20 +10973,20 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_100000}; - __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 667, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_curnptype, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 676, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_buf_list = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":668 + /* "pyreadstat/_readstat_parser.pyx":677 * curnptype = dc.col_numpy_dtypes[index] * buf_list = np.empty(100000, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: # <<<<<<<<<<<<<< @@ -10797,7 +11002,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_L8_bool_binop_done:; if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":669 + /* "pyreadstat/_readstat_parser.pyx":678 * buf_list = np.empty(100000, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: * buf_list.fill(np.nan) # <<<<<<<<<<<<<< @@ -10806,9 +11011,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_t_6 = __pyx_v_buf_list; __Pyx_INCREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 0; @@ -10817,12 +11022,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":668 + /* "pyreadstat/_readstat_parser.pyx":677 * curnptype = dc.col_numpy_dtypes[index] * buf_list = np.empty(100000, dtype=curnptype) * if iscurnptypeobject or iscurnptypefloat: # <<<<<<<<<<<<<< @@ -10831,7 +11036,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":670 + /* "pyreadstat/_readstat_parser.pyx":679 * if iscurnptypeobject or iscurnptypefloat: * buf_list.fill(np.nan) * dc.col_data[index] = np.append(dc.col_data[index], buf_list) # <<<<<<<<<<<<<< @@ -10839,16 +11044,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ * buf_list = [None] * 100000 */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 670, __pyx_L1_error) + __PYX_ERR(0, 679, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS @@ -10868,17 +11073,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 670, __pyx_L1_error) + __PYX_ERR(0, 679, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 670, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":665 + /* "pyreadstat/_readstat_parser.pyx":674 * var_max_rows = dc.col_data_len[index] * if var_max_rows <= obs_index: * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -10888,7 +11093,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L6; } - /* "pyreadstat/_readstat_parser.pyx":672 + /* "pyreadstat/_readstat_parser.pyx":681 * dc.col_data[index] = np.append(dc.col_data[index], buf_list) * else: * buf_list = [None] * 100000 # <<<<<<<<<<<<<< @@ -10896,19 +11101,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ * var_max_rows += 100000 */ /*else*/ { - __pyx_t_1 = PyList_New(1 * 100000); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * 100000); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < 0x186A0; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 672, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 681, __pyx_L1_error); } } __pyx_v_buf_list = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":673 + /* "pyreadstat/_readstat_parser.pyx":682 * else: * buf_list = [None] * 100000 * dc.col_data[index].extend(buf_list) # <<<<<<<<<<<<<< @@ -10917,9 +11122,9 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 673, __pyx_L1_error) + __PYX_ERR(0, 682, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); @@ -10929,14 +11134,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6:; - /* "pyreadstat/_readstat_parser.pyx":674 + /* "pyreadstat/_readstat_parser.pyx":683 * buf_list = [None] * 100000 * dc.col_data[index].extend(buf_list) * var_max_rows += 100000 # <<<<<<<<<<<<<< @@ -10945,23 +11150,23 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_var_max_rows = (__pyx_v_var_max_rows + 0x186A0); - /* "pyreadstat/_readstat_parser.pyx":675 + /* "pyreadstat/_readstat_parser.pyx":684 * dc.col_data[index].extend(buf_list) * var_max_rows += 100000 * dc.col_data_len[index] = var_max_rows # <<<<<<<<<<<<<< * * # transform to python value types */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_var_max_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_var_max_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_dc->col_data_len == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 675, __pyx_L1_error) + __PYX_ERR(0, 684, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data_len, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 675, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data_len, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":664 + /* "pyreadstat/_readstat_parser.pyx":673 * dc.max_n_obs = obs_index + 1 * var_max_rows = dc.col_data_len[index] * if var_max_rows <= obs_index: # <<<<<<<<<<<<<< @@ -10970,7 +11175,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":660 + /* "pyreadstat/_readstat_parser.pyx":669 * iscurnptypeobject = dc.col_dtypes_isobject[index] * iscurnptypefloat = dc.col_dytpes_isfloat[index] * if is_unkown_number_rows: # <<<<<<<<<<<<<< @@ -10979,7 +11184,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":678 + /* "pyreadstat/_readstat_parser.pyx":687 * * # transform to python value types * if readstat_value_is_missing(value, variable): # <<<<<<<<<<<<<< @@ -10989,7 +11194,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (readstat_value_is_missing(__pyx_v_value, __pyx_v_variable) != 0); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":680 + /* "pyreadstat/_readstat_parser.pyx":689 * if readstat_value_is_missing(value, variable): * # The user does not want to retrieve missing values * if not dc.usernan or readstat_value_is_system_missing(value): # <<<<<<<<<<<<<< @@ -11007,17 +11212,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_L12_bool_binop_done:; if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":681 + /* "pyreadstat/_readstat_parser.pyx":690 * # The user does not want to retrieve missing values * if not dc.usernan or readstat_value_is_system_missing(value): * if output_format == "pandas": # <<<<<<<<<<<<<< * if iscurnptypefloat == 1 or iscurnptypeobject == 1: * # already allocated */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 690, __pyx_L1_error) if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":682 + /* "pyreadstat/_readstat_parser.pyx":691 * if not dc.usernan or readstat_value_is_system_missing(value): * if output_format == "pandas": * if iscurnptypefloat == 1 or iscurnptypeobject == 1: # <<<<<<<<<<<<<< @@ -11037,7 +11242,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L15; } - /* "pyreadstat/_readstat_parser.pyx":688 + /* "pyreadstat/_readstat_parser.pyx":697 * # for any type except float, the numpy type will be object as now we have nans * else: * dc.col_numpy_dtypes[index] = object # <<<<<<<<<<<<<< @@ -11047,11 +11252,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ /*else*/ { if (unlikely(__pyx_v_dc->col_numpy_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 688, __pyx_L1_error) + __PYX_ERR(0, 697, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 688, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 697, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":689 + /* "pyreadstat/_readstat_parser.pyx":698 * else: * dc.col_numpy_dtypes[index] = object * dc.col_dtypes_isobject[index] = 1 # <<<<<<<<<<<<<< @@ -11060,11 +11265,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dtypes_isobject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 689, __pyx_L1_error) + __PYX_ERR(0, 698, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 689, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 698, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":690 + /* "pyreadstat/_readstat_parser.pyx":699 * dc.col_numpy_dtypes[index] = object * dc.col_dtypes_isobject[index] = 1 * iscurnptypeobject = 1 # <<<<<<<<<<<<<< @@ -11073,7 +11278,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_iscurnptypeobject = 1; - /* "pyreadstat/_readstat_parser.pyx":691 + /* "pyreadstat/_readstat_parser.pyx":700 * dc.col_dtypes_isobject[index] = 1 * iscurnptypeobject = 1 * dc.col_data[index] = dc.col_data[index].astype(object, copy=False) # <<<<<<<<<<<<<< @@ -11082,57 +11287,57 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 691, __pyx_L1_error) + __PYX_ERR(0, 700, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_builtin_object}; - __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 691, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 700, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 691, __pyx_L1_error) + __PYX_ERR(0, 700, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 691, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":692 + /* "pyreadstat/_readstat_parser.pyx":701 * iscurnptypeobject = 1 * dc.col_data[index] = dc.col_data[index].astype(object, copy=False) * dc.col_data[index][obs_index:] = np.nan # <<<<<<<<<<<<<< * #dc.col_data[index][obs_index] = NAN * elif readstat_value_is_defined_missing(value, variable): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 692, __pyx_L1_error) + __PYX_ERR(0, 701, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_5, __pyx_v_obs_index, 0, NULL, NULL, NULL, 1, 0, 1) < (0)) __PYX_ERR(0, 692, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_5, __pyx_v_obs_index, 0, NULL, NULL, NULL, 1, 0, 1) < (0)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L15:; - /* "pyreadstat/_readstat_parser.pyx":681 + /* "pyreadstat/_readstat_parser.pyx":690 * # The user does not want to retrieve missing values * if not dc.usernan or readstat_value_is_system_missing(value): * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -11141,7 +11346,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":680 + /* "pyreadstat/_readstat_parser.pyx":689 * if readstat_value_is_missing(value, variable): * # The user does not want to retrieve missing values * if not dc.usernan or readstat_value_is_system_missing(value): # <<<<<<<<<<<<<< @@ -11151,7 +11356,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L11; } - /* "pyreadstat/_readstat_parser.pyx":694 + /* "pyreadstat/_readstat_parser.pyx":703 * dc.col_data[index][obs_index:] = np.nan * #dc.col_data[index][obs_index] = NAN * elif readstat_value_is_defined_missing(value, variable): # <<<<<<<<<<<<<< @@ -11161,19 +11366,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (readstat_value_is_defined_missing(__pyx_v_value, __pyx_v_variable) != 0); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":696 + /* "pyreadstat/_readstat_parser.pyx":705 * elif readstat_value_is_defined_missing(value, variable): * # SPSS missing values * pyvalue = convert_readstat_to_python_value(value, index, dc) # <<<<<<<<<<<<<< * dc.col_data[index][obs_index] = pyvalue * elif readstat_value_is_tagged_missing(value): */ - __pyx_t_5 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_value, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_value, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_pyvalue = __pyx_t_5; __pyx_t_5 = 0; - /* "pyreadstat/_readstat_parser.pyx":697 + /* "pyreadstat/_readstat_parser.pyx":706 * # SPSS missing values * pyvalue = convert_readstat_to_python_value(value, index, dc) * dc.col_data[index][obs_index] = pyvalue # <<<<<<<<<<<<<< @@ -11182,14 +11387,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 697, __pyx_L1_error) + __PYX_ERR(0, 706, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely((__Pyx_SetItemInt(__pyx_t_5, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 697, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_5, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pyreadstat/_readstat_parser.pyx":694 + /* "pyreadstat/_readstat_parser.pyx":703 * dc.col_data[index][obs_index:] = np.nan * #dc.col_data[index][obs_index] = NAN * elif readstat_value_is_defined_missing(value, variable): # <<<<<<<<<<<<<< @@ -11199,7 +11404,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L11; } - /* "pyreadstat/_readstat_parser.pyx":698 + /* "pyreadstat/_readstat_parser.pyx":707 * pyvalue = convert_readstat_to_python_value(value, index, dc) * dc.col_data[index][obs_index] = pyvalue * elif readstat_value_is_tagged_missing(value): # <<<<<<<<<<<<<< @@ -11209,7 +11414,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (readstat_value_is_tagged_missing(__pyx_v_value) != 0); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":699 + /* "pyreadstat/_readstat_parser.pyx":708 * dc.col_data[index][obs_index] = pyvalue * elif readstat_value_is_tagged_missing(value): * iscurnptypeobject = dc.col_dtypes_isobject[index] # <<<<<<<<<<<<<< @@ -11218,15 +11423,15 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dtypes_isobject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 699, __pyx_L1_error) + __PYX_ERR(0, 708, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_iscurnptypeobject = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":701 + /* "pyreadstat/_readstat_parser.pyx":710 * iscurnptypeobject = dc.col_dtypes_isobject[index] * # SAS and Stata missing values * missing_tag = readstat_value_tag(value) # <<<<<<<<<<<<<< @@ -11235,17 +11440,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_missing_tag = ((int)readstat_value_tag(__pyx_v_value)); - /* "pyreadstat/_readstat_parser.pyx":704 + /* "pyreadstat/_readstat_parser.pyx":713 * # In SAS missing values are A to Z or _ in stata a to z * # if (missing_tag >=65 and missing_tag <= 90) or missing_tag == 95 or (missing_tag >=61 and missing_tag <= 122): * if output_format == "pandas": # <<<<<<<<<<<<<< * if iscurnptypeobject == 1: * dc.col_data[index][obs_index] = chr(missing_tag) */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 713, __pyx_L1_error) if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":705 + /* "pyreadstat/_readstat_parser.pyx":714 * # if (missing_tag >=65 and missing_tag <= 90) or missing_tag == 95 or (missing_tag >=61 and missing_tag <= 122): * if output_format == "pandas": * if iscurnptypeobject == 1: # <<<<<<<<<<<<<< @@ -11255,26 +11460,26 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (__pyx_v_iscurnptypeobject == 1); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":706 + /* "pyreadstat/_readstat_parser.pyx":715 * if output_format == "pandas": * if iscurnptypeobject == 1: * dc.col_data[index][obs_index] = chr(missing_tag) # <<<<<<<<<<<<<< * else: * dc.col_numpy_dtypes[index] = object */ - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 706, __pyx_L1_error) + __PYX_ERR(0, 715, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((__Pyx_SetItemInt(__pyx_t_1, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 706, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_1, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pyreadstat/_readstat_parser.pyx":705 + /* "pyreadstat/_readstat_parser.pyx":714 * # if (missing_tag >=65 and missing_tag <= 90) or missing_tag == 95 or (missing_tag >=61 and missing_tag <= 122): * if output_format == "pandas": * if iscurnptypeobject == 1: # <<<<<<<<<<<<<< @@ -11284,7 +11489,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L19; } - /* "pyreadstat/_readstat_parser.pyx":708 + /* "pyreadstat/_readstat_parser.pyx":717 * dc.col_data[index][obs_index] = chr(missing_tag) * else: * dc.col_numpy_dtypes[index] = object # <<<<<<<<<<<<<< @@ -11294,11 +11499,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ /*else*/ { if (unlikely(__pyx_v_dc->col_numpy_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 708, __pyx_L1_error) + __PYX_ERR(0, 717, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 708, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_numpy_dtypes, __pyx_v_index, __pyx_builtin_object, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 717, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":709 + /* "pyreadstat/_readstat_parser.pyx":718 * else: * dc.col_numpy_dtypes[index] = object * dc.col_dtypes_isobject[index] = 1 # <<<<<<<<<<<<<< @@ -11307,11 +11512,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dtypes_isobject == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 709, __pyx_L1_error) + __PYX_ERR(0, 718, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 709, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dtypes_isobject, __pyx_v_index, __pyx_mstate_global->__pyx_int_1, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 718, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":710 + /* "pyreadstat/_readstat_parser.pyx":719 * dc.col_numpy_dtypes[index] = object * dc.col_dtypes_isobject[index] = 1 * dc.col_dytpes_isfloat[index] = 0 # <<<<<<<<<<<<<< @@ -11320,11 +11525,11 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_dytpes_isfloat == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 710, __pyx_L1_error) + __PYX_ERR(0, 719, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_mstate_global->__pyx_int_0, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 710, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_dytpes_isfloat, __pyx_v_index, __pyx_mstate_global->__pyx_int_0, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 719, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":711 + /* "pyreadstat/_readstat_parser.pyx":720 * dc.col_dtypes_isobject[index] = 1 * dc.col_dytpes_isfloat[index] = 0 * iscurnptypeobject = 1 # <<<<<<<<<<<<<< @@ -11333,7 +11538,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ __pyx_v_iscurnptypeobject = 1; - /* "pyreadstat/_readstat_parser.pyx":712 + /* "pyreadstat/_readstat_parser.pyx":721 * dc.col_dytpes_isfloat[index] = 0 * iscurnptypeobject = 1 * dc.col_data[index] = dc.col_data[index].astype(object, copy=False) # <<<<<<<<<<<<<< @@ -11342,54 +11547,54 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 712, __pyx_L1_error) + __PYX_ERR(0, 721, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_builtin_object}; - __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_copy, Py_False, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 721, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 712, __pyx_L1_error) + __PYX_ERR(0, 721, __pyx_L1_error) } - if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 712, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_dc->col_data, __pyx_v_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference) < 0))) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pyreadstat/_readstat_parser.pyx":713 + /* "pyreadstat/_readstat_parser.pyx":722 * iscurnptypeobject = 1 * dc.col_data[index] = dc.col_data[index].astype(object, copy=False) * dc.col_data[index][obs_index] = chr(missing_tag) # <<<<<<<<<<<<<< * else: * dc.col_data[index][obs_index] = chr(missing_tag) */ - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 713, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 713, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L19:; - /* "pyreadstat/_readstat_parser.pyx":704 + /* "pyreadstat/_readstat_parser.pyx":713 * # In SAS missing values are A to Z or _ in stata a to z * # if (missing_tag >=65 and missing_tag <= 90) or missing_tag == 95 or (missing_tag >=61 and missing_tag <= 122): * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -11399,7 +11604,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L18; } - /* "pyreadstat/_readstat_parser.pyx":715 + /* "pyreadstat/_readstat_parser.pyx":724 * dc.col_data[index][obs_index] = chr(missing_tag) * else: * dc.col_data[index][obs_index] = chr(missing_tag) # <<<<<<<<<<<<<< @@ -11407,21 +11612,21 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ * if curset is None: */ /*else*/ { - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 715, __pyx_L1_error) + __PYX_ERR(0, 724, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 715, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_t_5, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L18:; - /* "pyreadstat/_readstat_parser.pyx":716 + /* "pyreadstat/_readstat_parser.pyx":725 * else: * dc.col_data[index][obs_index] = chr(missing_tag) * curset = dc.missing_user_values.get(index) # <<<<<<<<<<<<<< @@ -11430,18 +11635,18 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->missing_user_values == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 716, __pyx_L1_error) + __PYX_ERR(0, 725, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_dc->missing_user_values, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_dc->missing_user_values, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PySet_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_4))) __PYX_ERR(0, 716, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_4))) __PYX_ERR(0, 725, __pyx_L1_error) __pyx_v_curset = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":717 + /* "pyreadstat/_readstat_parser.pyx":726 * dc.col_data[index][obs_index] = chr(missing_tag) * curset = dc.missing_user_values.get(index) * if curset is None: # <<<<<<<<<<<<<< @@ -11451,19 +11656,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_t_3 = (__pyx_v_curset == ((PyObject*)Py_None)); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":718 + /* "pyreadstat/_readstat_parser.pyx":727 * curset = dc.missing_user_values.get(index) * if curset is None: * curset = set() # <<<<<<<<<<<<<< * curset.add(chr(missing_tag)) * dc.missing_user_values[index] = curset */ - __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_curset, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":717 + /* "pyreadstat/_readstat_parser.pyx":726 * dc.col_data[index][obs_index] = chr(missing_tag) * curset = dc.missing_user_values.get(index) * if curset is None: # <<<<<<<<<<<<<< @@ -11472,7 +11677,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ } - /* "pyreadstat/_readstat_parser.pyx":719 + /* "pyreadstat/_readstat_parser.pyx":728 * if curset is None: * curset = set() * curset.add(chr(missing_tag)) # <<<<<<<<<<<<<< @@ -11481,14 +11686,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_curset == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 719, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) } - __pyx_t_4 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_4 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = PySet_Add(__pyx_v_curset, __pyx_t_4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_9 = PySet_Add(__pyx_v_curset, __pyx_t_4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":720 + /* "pyreadstat/_readstat_parser.pyx":729 * curset = set() * curset.add(chr(missing_tag)) * dc.missing_user_values[index] = curset # <<<<<<<<<<<<<< @@ -11497,14 +11702,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->missing_user_values == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 720, __pyx_L1_error) + __PYX_ERR(0, 729, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_v_dc->missing_user_values, __pyx_t_4, __pyx_v_curset) < 0))) __PYX_ERR(0, 720, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_dc->missing_user_values, __pyx_t_4, __pyx_v_curset) < 0))) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":698 + /* "pyreadstat/_readstat_parser.pyx":707 * pyvalue = convert_readstat_to_python_value(value, index, dc) * dc.col_data[index][obs_index] = pyvalue * elif readstat_value_is_tagged_missing(value): # <<<<<<<<<<<<<< @@ -11514,7 +11719,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ } __pyx_L11:; - /* "pyreadstat/_readstat_parser.pyx":678 + /* "pyreadstat/_readstat_parser.pyx":687 * * # transform to python value types * if readstat_value_is_missing(value, variable): # <<<<<<<<<<<<<< @@ -11524,7 +11729,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ goto __pyx_L10; } - /* "pyreadstat/_readstat_parser.pyx":722 + /* "pyreadstat/_readstat_parser.pyx":731 * dc.missing_user_values[index] = curset * else: * pyvalue = convert_readstat_to_python_value(value, index, dc) # <<<<<<<<<<<<<< @@ -11532,12 +11737,12 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ * */ /*else*/ { - __pyx_t_4 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_value, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error) + __pyx_t_4 = __pyx_f_10pyreadstat_16_readstat_parser_convert_readstat_to_python_value(__pyx_v_value, __pyx_v_index, __pyx_v_dc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pyvalue = __pyx_t_4; __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":723 + /* "pyreadstat/_readstat_parser.pyx":732 * else: * pyvalue = convert_readstat_to_python_value(value, index, dc) * dc.col_data[index][obs_index] = pyvalue # <<<<<<<<<<<<<< @@ -11546,16 +11751,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ */ if (unlikely(__pyx_v_dc->col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 723, __pyx_L1_error) + __PYX_ERR(0, 732, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_dc->col_data, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 723, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_v_obs_index, __pyx_v_pyvalue, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L10:; - /* "pyreadstat/_readstat_parser.pyx":725 + /* "pyreadstat/_readstat_parser.pyx":734 * dc.col_data[index][obs_index] = pyvalue * * return READSTAT_HANDLER_OK # <<<<<<<<<<<<<< @@ -11565,7 +11770,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ __pyx_r = READSTAT_HANDLER_OK; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":629 + /* "pyreadstat/_readstat_parser.pyx":638 * * * cdef int handle_value(int obs_index, readstat_variable_t * variable, readstat_value_t value, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -11592,7 +11797,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value(int __pyx_v_obs_ return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":728 +/* "pyreadstat/_readstat_parser.pyx":737 * * * cdef int handle_value_label(char *val_labels, readstat_value_t value, char *label, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -11631,7 +11836,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_value_label", 0); - /* "pyreadstat/_readstat_parser.pyx":734 + /* "pyreadstat/_readstat_parser.pyx":743 * """ * * cdef data_container dc = ctx # <<<<<<<<<<<<<< @@ -11643,14 +11848,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_v_dc = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":752 + /* "pyreadstat/_readstat_parser.pyx":761 * cdef str value_label_name * * var_label = val_labels # <<<<<<<<<<<<<< * value_label_name = label * */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_val_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_val_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); @@ -11658,14 +11863,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_v_var_label = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":753 + /* "pyreadstat/_readstat_parser.pyx":762 * * var_label = val_labels * value_label_name = label # <<<<<<<<<<<<<< * * cdef readstat_type_t value_type */ - __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); @@ -11673,7 +11878,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_v_value_label_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":756 + /* "pyreadstat/_readstat_parser.pyx":765 * * cdef readstat_type_t value_type * value_type = readstat_value_type(value) # <<<<<<<<<<<<<< @@ -11682,7 +11887,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_value_type = readstat_value_type(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":758 + /* "pyreadstat/_readstat_parser.pyx":767 * value_type = readstat_value_type(value) * * labels_raw = dc.labels_raw # <<<<<<<<<<<<<< @@ -11694,7 +11899,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_v_labels_raw = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":759 + /* "pyreadstat/_readstat_parser.pyx":768 * * labels_raw = dc.labels_raw * cur_dict = labels_raw.get(var_label) # <<<<<<<<<<<<<< @@ -11708,36 +11913,36 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_var_label}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_cur_dict = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":760 + /* "pyreadstat/_readstat_parser.pyx":769 * labels_raw = dc.labels_raw * cur_dict = labels_raw.get(var_label) * if not cur_dict: # <<<<<<<<<<<<<< * cur_dict = dict() * */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_cur_dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_cur_dict); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 769, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":761 + /* "pyreadstat/_readstat_parser.pyx":770 * cur_dict = labels_raw.get(var_label) * if not cur_dict: * cur_dict = dict() # <<<<<<<<<<<<<< * * if readstat_value_is_tagged_missing(value): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cur_dict, __pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":760 + /* "pyreadstat/_readstat_parser.pyx":769 * labels_raw = dc.labels_raw * cur_dict = labels_raw.get(var_label) * if not cur_dict: # <<<<<<<<<<<<<< @@ -11746,7 +11951,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ } - /* "pyreadstat/_readstat_parser.pyx":763 + /* "pyreadstat/_readstat_parser.pyx":772 * cur_dict = dict() * * if readstat_value_is_tagged_missing(value): # <<<<<<<<<<<<<< @@ -11756,7 +11961,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_t_5 = (readstat_value_is_tagged_missing(__pyx_v_value) != 0); if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":765 + /* "pyreadstat/_readstat_parser.pyx":774 * if readstat_value_is_tagged_missing(value): * # SAS and Stata missing values * missing_tag = readstat_value_tag(value) # <<<<<<<<<<<<<< @@ -11765,19 +11970,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_missing_tag = ((int)readstat_value_tag(__pyx_v_value)); - /* "pyreadstat/_readstat_parser.pyx":767 + /* "pyreadstat/_readstat_parser.pyx":776 * missing_tag = readstat_value_tag(value) * # In SAS missing values are A to Z or _ in stata a to z * cur_dict[chr(missing_tag)] = value_label_name # <<<<<<<<<<<<<< * else: * */ - __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_v_missing_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_t_1, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 767, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_t_1, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":763 + /* "pyreadstat/_readstat_parser.pyx":772 * cur_dict = dict() * * if readstat_value_is_tagged_missing(value): # <<<<<<<<<<<<<< @@ -11787,7 +11992,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py goto __pyx_L4; } - /* "pyreadstat/_readstat_parser.pyx":770 + /* "pyreadstat/_readstat_parser.pyx":779 * else: * * if value_type == READSTAT_TYPE_STRING or value_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -11796,7 +12001,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ /*else*/ { - /* "pyreadstat/_readstat_parser.pyx":790 + /* "pyreadstat/_readstat_parser.pyx":799 * py_float_value = c_float_value * pyformat = VAR_FORMAT_FLOAT * elif value_type == READSTAT_TYPE_DOUBLE: # <<<<<<<<<<<<<< @@ -11806,7 +12011,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py switch (__pyx_v_value_type) { case READSTAT_TYPE_STRING: - /* "pyreadstat/_readstat_parser.pyx":770 + /* "pyreadstat/_readstat_parser.pyx":779 * else: * * if value_type == READSTAT_TYPE_STRING or value_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -11815,7 +12020,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ case READSTAT_TYPE_STRING_REF: - /* "pyreadstat/_readstat_parser.pyx":771 + /* "pyreadstat/_readstat_parser.pyx":780 * * if value_type == READSTAT_TYPE_STRING or value_type == READSTAT_TYPE_STRING_REF: * c_str_value = readstat_string_value(value) # <<<<<<<<<<<<<< @@ -11824,14 +12029,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_str_value = readstat_string_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":772 + /* "pyreadstat/_readstat_parser.pyx":781 * if value_type == READSTAT_TYPE_STRING or value_type == READSTAT_TYPE_STRING_REF: * c_str_value = readstat_string_value(value) * py_str_value = c_str_value # <<<<<<<<<<<<<< * pyformat = VAR_FORMAT_STRING * elif value_type == READSTAT_TYPE_INT8: */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_c_str_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_c_str_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); @@ -11839,7 +12044,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_v_py_str_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":773 + /* "pyreadstat/_readstat_parser.pyx":782 * c_str_value = readstat_string_value(value) * py_str_value = c_str_value * pyformat = VAR_FORMAT_STRING # <<<<<<<<<<<<<< @@ -11848,7 +12053,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_STRING; - /* "pyreadstat/_readstat_parser.pyx":770 + /* "pyreadstat/_readstat_parser.pyx":779 * else: * * if value_type == READSTAT_TYPE_STRING or value_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -11858,7 +12063,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case READSTAT_TYPE_INT8: - /* "pyreadstat/_readstat_parser.pyx":775 + /* "pyreadstat/_readstat_parser.pyx":784 * pyformat = VAR_FORMAT_STRING * elif value_type == READSTAT_TYPE_INT8: * c_int8_value = readstat_int8_value(value) # <<<<<<<<<<<<<< @@ -11867,7 +12072,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_int8_value = readstat_int8_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":776 + /* "pyreadstat/_readstat_parser.pyx":785 * elif value_type == READSTAT_TYPE_INT8: * c_int8_value = readstat_int8_value(value) * py_long_value = c_int8_value # <<<<<<<<<<<<<< @@ -11876,7 +12081,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_py_long_value = ((long)__pyx_v_c_int8_value); - /* "pyreadstat/_readstat_parser.pyx":777 + /* "pyreadstat/_readstat_parser.pyx":786 * c_int8_value = readstat_int8_value(value) * py_long_value = c_int8_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -11885,7 +12090,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":774 + /* "pyreadstat/_readstat_parser.pyx":783 * py_str_value = c_str_value * pyformat = VAR_FORMAT_STRING * elif value_type == READSTAT_TYPE_INT8: # <<<<<<<<<<<<<< @@ -11895,7 +12100,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case READSTAT_TYPE_INT16: - /* "pyreadstat/_readstat_parser.pyx":779 + /* "pyreadstat/_readstat_parser.pyx":788 * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_INT16: * c_int16_value = readstat_int16_value(value) # <<<<<<<<<<<<<< @@ -11904,7 +12109,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_int16_value = readstat_int16_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":780 + /* "pyreadstat/_readstat_parser.pyx":789 * elif value_type == READSTAT_TYPE_INT16: * c_int16_value = readstat_int16_value(value) * py_long_value = c_int16_value # <<<<<<<<<<<<<< @@ -11913,7 +12118,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_py_long_value = ((long)__pyx_v_c_int16_value); - /* "pyreadstat/_readstat_parser.pyx":781 + /* "pyreadstat/_readstat_parser.pyx":790 * c_int16_value = readstat_int16_value(value) * py_long_value = c_int16_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -11922,7 +12127,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":778 + /* "pyreadstat/_readstat_parser.pyx":787 * py_long_value = c_int8_value * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_INT16: # <<<<<<<<<<<<<< @@ -11932,7 +12137,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case READSTAT_TYPE_INT32: - /* "pyreadstat/_readstat_parser.pyx":783 + /* "pyreadstat/_readstat_parser.pyx":792 * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_INT32: * c_int32_value = readstat_int32_value(value) # <<<<<<<<<<<<<< @@ -11941,7 +12146,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_int32_value = readstat_int32_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":784 + /* "pyreadstat/_readstat_parser.pyx":793 * elif value_type == READSTAT_TYPE_INT32: * c_int32_value = readstat_int32_value(value) * py_long_value = c_int32_value # <<<<<<<<<<<<<< @@ -11950,7 +12155,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_py_long_value = ((long)__pyx_v_c_int32_value); - /* "pyreadstat/_readstat_parser.pyx":785 + /* "pyreadstat/_readstat_parser.pyx":794 * c_int32_value = readstat_int32_value(value) * py_long_value = c_int32_value * pyformat = VAR_FORMAT_LONG # <<<<<<<<<<<<<< @@ -11959,7 +12164,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG; - /* "pyreadstat/_readstat_parser.pyx":782 + /* "pyreadstat/_readstat_parser.pyx":791 * py_long_value = c_int16_value * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_INT32: # <<<<<<<<<<<<<< @@ -11969,7 +12174,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case READSTAT_TYPE_FLOAT: - /* "pyreadstat/_readstat_parser.pyx":787 + /* "pyreadstat/_readstat_parser.pyx":796 * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_FLOAT: * c_float_value = readstat_float_value(value) # <<<<<<<<<<<<<< @@ -11978,7 +12183,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_float_value = readstat_float_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":788 + /* "pyreadstat/_readstat_parser.pyx":797 * elif value_type == READSTAT_TYPE_FLOAT: * c_float_value = readstat_float_value(value) * py_float_value = c_float_value # <<<<<<<<<<<<<< @@ -11987,7 +12192,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_py_float_value = ((double)__pyx_v_c_float_value); - /* "pyreadstat/_readstat_parser.pyx":789 + /* "pyreadstat/_readstat_parser.pyx":798 * c_float_value = readstat_float_value(value) * py_float_value = c_float_value * pyformat = VAR_FORMAT_FLOAT # <<<<<<<<<<<<<< @@ -11996,7 +12201,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT; - /* "pyreadstat/_readstat_parser.pyx":786 + /* "pyreadstat/_readstat_parser.pyx":795 * py_long_value = c_int32_value * pyformat = VAR_FORMAT_LONG * elif value_type == READSTAT_TYPE_FLOAT: # <<<<<<<<<<<<<< @@ -12006,7 +12211,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case READSTAT_TYPE_DOUBLE: - /* "pyreadstat/_readstat_parser.pyx":791 + /* "pyreadstat/_readstat_parser.pyx":800 * pyformat = VAR_FORMAT_FLOAT * elif value_type == READSTAT_TYPE_DOUBLE: * c_double_value = readstat_double_value(value); # <<<<<<<<<<<<<< @@ -12015,7 +12220,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_c_double_value = readstat_double_value(__pyx_v_value); - /* "pyreadstat/_readstat_parser.pyx":792 + /* "pyreadstat/_readstat_parser.pyx":801 * elif value_type == READSTAT_TYPE_DOUBLE: * c_double_value = readstat_double_value(value); * py_float_value = c_double_value # <<<<<<<<<<<<<< @@ -12024,7 +12229,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_py_float_value = ((double)__pyx_v_c_double_value); - /* "pyreadstat/_readstat_parser.pyx":793 + /* "pyreadstat/_readstat_parser.pyx":802 * c_double_value = readstat_double_value(value); * py_float_value = c_double_value * pyformat = VAR_FORMAT_FLOAT # <<<<<<<<<<<<<< @@ -12033,7 +12238,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py */ __pyx_v_pyformat = __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT; - /* "pyreadstat/_readstat_parser.pyx":790 + /* "pyreadstat/_readstat_parser.pyx":799 * py_float_value = c_float_value * pyformat = VAR_FORMAT_FLOAT * elif value_type == READSTAT_TYPE_DOUBLE: # <<<<<<<<<<<<<< @@ -12043,7 +12248,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; default: - /* "pyreadstat/_readstat_parser.pyx":795 + /* "pyreadstat/_readstat_parser.pyx":804 * pyformat = VAR_FORMAT_FLOAT * else: * raise PyreadstatError("Unkown data type") # <<<<<<<<<<<<<< @@ -12051,7 +12256,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py * */ __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS @@ -12070,16 +12275,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 795, __pyx_L1_error) + __PYX_ERR(0, 804, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":798 + /* "pyreadstat/_readstat_parser.pyx":807 * * * if pyformat == VAR_FORMAT_STRING: # <<<<<<<<<<<<<< @@ -12089,17 +12294,17 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py switch (__pyx_v_pyformat) { case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_STRING: - /* "pyreadstat/_readstat_parser.pyx":799 + /* "pyreadstat/_readstat_parser.pyx":808 * * if pyformat == VAR_FORMAT_STRING: * cur_dict[py_str_value] = value_label_name # <<<<<<<<<<<<<< * elif pyformat == VAR_FORMAT_LONG: * cur_dict[py_long_value] = value_label_name */ - if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 799, __pyx_L1_error) } - if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_v_py_str_value, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 799, __pyx_L1_error) + if (unlikely(!__pyx_v_py_str_value)) { __Pyx_RaiseUnboundLocalError("py_str_value"); __PYX_ERR(0, 808, __pyx_L1_error) } + if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_v_py_str_value, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 808, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":798 + /* "pyreadstat/_readstat_parser.pyx":807 * * * if pyformat == VAR_FORMAT_STRING: # <<<<<<<<<<<<<< @@ -12109,16 +12314,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_LONG: - /* "pyreadstat/_readstat_parser.pyx":801 + /* "pyreadstat/_readstat_parser.pyx":810 * cur_dict[py_str_value] = value_label_name * elif pyformat == VAR_FORMAT_LONG: * cur_dict[py_long_value] = value_label_name # <<<<<<<<<<<<<< * elif pyformat == VAR_FORMAT_FLOAT: * cur_dict[py_float_value] = value_label_name */ - if (unlikely((__Pyx_SetItemInt(__pyx_v_cur_dict, __pyx_v_py_long_value, __pyx_v_value_label_name, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_cur_dict, __pyx_v_py_long_value, __pyx_v_value_label_name, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 810, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":800 + /* "pyreadstat/_readstat_parser.pyx":809 * if pyformat == VAR_FORMAT_STRING: * cur_dict[py_str_value] = value_label_name * elif pyformat == VAR_FORMAT_LONG: # <<<<<<<<<<<<<< @@ -12128,19 +12333,19 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_FLOAT: - /* "pyreadstat/_readstat_parser.pyx":803 + /* "pyreadstat/_readstat_parser.pyx":812 * cur_dict[py_long_value] = value_label_name * elif pyformat == VAR_FORMAT_FLOAT: * cur_dict[py_float_value] = value_label_name # <<<<<<<<<<<<<< * elif pyformat == VAR_FORMAT_MISSING: * pass */ - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_float_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_float_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_t_2, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 803, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_cur_dict, __pyx_t_2, __pyx_v_value_label_name) < 0))) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":802 + /* "pyreadstat/_readstat_parser.pyx":811 * elif pyformat == VAR_FORMAT_LONG: * cur_dict[py_long_value] = value_label_name * elif pyformat == VAR_FORMAT_FLOAT: # <<<<<<<<<<<<<< @@ -12150,7 +12355,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; case __pyx_e_10pyreadstat_16_readstat_parser_VAR_FORMAT_MISSING: - /* "pyreadstat/_readstat_parser.pyx":804 + /* "pyreadstat/_readstat_parser.pyx":813 * elif pyformat == VAR_FORMAT_FLOAT: * cur_dict[py_float_value] = value_label_name * elif pyformat == VAR_FORMAT_MISSING: # <<<<<<<<<<<<<< @@ -12160,7 +12365,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py break; default: - /* "pyreadstat/_readstat_parser.pyx":807 + /* "pyreadstat/_readstat_parser.pyx":816 * pass * else: * raise PyreadstatError("Failed convert C to python value") # <<<<<<<<<<<<<< @@ -12168,7 +12373,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py * dc.labels_raw[var_label] = cur_dict */ __pyx_t_6 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS @@ -12187,27 +12392,27 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 807, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) break; } } __pyx_L4:; - /* "pyreadstat/_readstat_parser.pyx":809 + /* "pyreadstat/_readstat_parser.pyx":818 * raise PyreadstatError("Failed convert C to python value") * * dc.labels_raw[var_label] = cur_dict # <<<<<<<<<<<<<< * * return READSTAT_HANDLER_OK */ - if (unlikely((PyObject_SetItem(__pyx_v_dc->labels_raw, __pyx_v_var_label, __pyx_v_cur_dict) < 0))) __PYX_ERR(0, 809, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_dc->labels_raw, __pyx_v_var_label, __pyx_v_cur_dict) < 0))) __PYX_ERR(0, 818, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":811 + /* "pyreadstat/_readstat_parser.pyx":820 * dc.labels_raw[var_label] = cur_dict * * return READSTAT_HANDLER_OK # <<<<<<<<<<<<<< @@ -12217,7 +12422,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py __pyx_r = READSTAT_HANDLER_OK; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":728 + /* "pyreadstat/_readstat_parser.pyx":737 * * * cdef int handle_value_label(char *val_labels, readstat_value_t value, char *label, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -12243,7 +12448,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_value_label(char *__py return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":813 +/* "pyreadstat/_readstat_parser.pyx":822 * return READSTAT_HANDLER_OK * * cdef int handle_note (int note_index, char *note, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -12264,7 +12469,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_note(CYTHON_UNUSED int int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_note", 0); - /* "pyreadstat/_readstat_parser.pyx":819 + /* "pyreadstat/_readstat_parser.pyx":828 * * cdef str pynote * cdef data_container dc = ctx # <<<<<<<<<<<<<< @@ -12276,14 +12481,14 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_note(CYTHON_UNUSED int __pyx_v_dc = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":821 + /* "pyreadstat/_readstat_parser.pyx":830 * cdef data_container dc = ctx * * pynote = note # <<<<<<<<<<<<<< * dc.notes.append(pynote) * */ - __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_note); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FromString(__pyx_v_note); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); @@ -12291,16 +12496,16 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_note(CYTHON_UNUSED int __pyx_v_pynote = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":822 + /* "pyreadstat/_readstat_parser.pyx":831 * * pynote = note * dc.notes.append(pynote) # <<<<<<<<<<<<<< * * return READSTAT_HANDLER_OK */ - __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_dc->notes, __pyx_v_pynote); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_dc->notes, __pyx_v_pynote); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 831, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":824 + /* "pyreadstat/_readstat_parser.pyx":833 * dc.notes.append(pynote) * * return READSTAT_HANDLER_OK # <<<<<<<<<<<<<< @@ -12310,7 +12515,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_note(CYTHON_UNUSED int __pyx_r = READSTAT_HANDLER_OK; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":813 + /* "pyreadstat/_readstat_parser.pyx":822 * return READSTAT_HANDLER_OK * * cdef int handle_note (int note_index, char *note, void *ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -12331,7 +12536,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_note(CYTHON_UNUSED int return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":826 +/* "pyreadstat/_readstat_parser.pyx":835 * return READSTAT_HANDLER_OK * * cdef int handle_open(const char *u8_path, void *io_ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -12358,21 +12563,21 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_open", 0); - /* "pyreadstat/_readstat_parser.pyx":834 + /* "pyreadstat/_readstat_parser.pyx":843 * cdef Py_ssize_t length * * if not os.path.isfile(u8_path): # <<<<<<<<<<<<<< * return -1 * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyUnicode_FromString(__pyx_v_u8_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_FromString(__pyx_v_u8_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 0; { @@ -12381,15 +12586,15 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { - /* "pyreadstat/_readstat_parser.pyx":835 + /* "pyreadstat/_readstat_parser.pyx":844 * * if not os.path.isfile(u8_path): * return -1 # <<<<<<<<<<<<<< @@ -12399,7 +12604,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx __pyx_r = -1; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":834 + /* "pyreadstat/_readstat_parser.pyx":843 * cdef Py_ssize_t length * * if not os.path.isfile(u8_path): # <<<<<<<<<<<<<< @@ -12408,36 +12613,36 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx */ } - /* "pyreadstat/_readstat_parser.pyx":837 + /* "pyreadstat/_readstat_parser.pyx":846 * return -1 * * if os.name == "nt": # <<<<<<<<<<<<<< * u16_path = PyUnicode_AsWideCharString(u8_path, &length) * fd = _wsopen(u16_path, _O_RDONLY | _O_BINARY, _SH_DENYWR, 0) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nt, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nt, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "pyreadstat/_readstat_parser.pyx":838 + /* "pyreadstat/_readstat_parser.pyx":847 * * if os.name == "nt": * u16_path = PyUnicode_AsWideCharString(u8_path, &length) # <<<<<<<<<<<<<< * fd = _wsopen(u16_path, _O_RDONLY | _O_BINARY, _SH_DENYWR, 0) * assign_fd(io_ctx, fd) */ - __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_u8_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_FromString(__pyx_v_u8_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyUnicode_AsWideCharString(__pyx_t_4, (&__pyx_v_length)); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_8 = PyUnicode_AsWideCharString(__pyx_t_4, (&__pyx_v_length)); if (unlikely(__pyx_t_8 == ((void *)NULL))) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_u16_path = __pyx_t_8; - /* "pyreadstat/_readstat_parser.pyx":839 + /* "pyreadstat/_readstat_parser.pyx":848 * if os.name == "nt": * u16_path = PyUnicode_AsWideCharString(u8_path, &length) * fd = _wsopen(u16_path, _O_RDONLY | _O_BINARY, _SH_DENYWR, 0) # <<<<<<<<<<<<<< @@ -12446,7 +12651,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx */ __pyx_v_fd = _wsopen(__pyx_v_u16_path, (_O_RDONLY | _O_BINARY), _SH_DENYWR, 0); - /* "pyreadstat/_readstat_parser.pyx":840 + /* "pyreadstat/_readstat_parser.pyx":849 * u16_path = PyUnicode_AsWideCharString(u8_path, &length) * fd = _wsopen(u16_path, _O_RDONLY | _O_BINARY, _SH_DENYWR, 0) * assign_fd(io_ctx, fd) # <<<<<<<<<<<<<< @@ -12455,7 +12660,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx */ assign_fd(__pyx_v_io_ctx, __pyx_v_fd); - /* "pyreadstat/_readstat_parser.pyx":841 + /* "pyreadstat/_readstat_parser.pyx":850 * fd = _wsopen(u16_path, _O_RDONLY | _O_BINARY, _SH_DENYWR, 0) * assign_fd(io_ctx, fd) * return fd # <<<<<<<<<<<<<< @@ -12465,7 +12670,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx __pyx_r = __pyx_v_fd; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":837 + /* "pyreadstat/_readstat_parser.pyx":846 * return -1 * * if os.name == "nt": # <<<<<<<<<<<<<< @@ -12474,7 +12679,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx */ } - /* "pyreadstat/_readstat_parser.pyx":843 + /* "pyreadstat/_readstat_parser.pyx":852 * return fd * else: * return -1 # <<<<<<<<<<<<<< @@ -12486,7 +12691,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":826 + /* "pyreadstat/_readstat_parser.pyx":835 * return READSTAT_HANDLER_OK * * cdef int handle_open(const char *u8_path, void *io_ctx) except READSTAT_HANDLER_ABORT: # <<<<<<<<<<<<<< @@ -12507,7 +12712,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":848 +/* "pyreadstat/_readstat_parser.pyx":857 * cdef object _file_object_ctx = None * * cdef int pyobject_open_handler(const char *path, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12518,7 +12723,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_handle_open(char const *__pyx static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_open_handler(CYTHON_UNUSED char const *__pyx_v_path, CYTHON_UNUSED void *__pyx_v_io_ctx) { int __pyx_r; - /* "pyreadstat/_readstat_parser.pyx":850 + /* "pyreadstat/_readstat_parser.pyx":859 * cdef int pyobject_open_handler(const char *path, void *io_ctx) noexcept: * """File is already open - this is a no-op""" * return 0 # <<<<<<<<<<<<<< @@ -12528,7 +12733,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_open_handler(CYTHON_ __pyx_r = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":848 + /* "pyreadstat/_readstat_parser.pyx":857 * cdef object _file_object_ctx = None * * cdef int pyobject_open_handler(const char *path, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12541,7 +12746,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_open_handler(CYTHON_ return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":852 +/* "pyreadstat/_readstat_parser.pyx":861 * return 0 * * cdef int pyobject_close_handler(void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12552,7 +12757,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_open_handler(CYTHON_ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_close_handler(CYTHON_UNUSED void *__pyx_v_io_ctx) { int __pyx_r; - /* "pyreadstat/_readstat_parser.pyx":854 + /* "pyreadstat/_readstat_parser.pyx":863 * cdef int pyobject_close_handler(void *io_ctx) noexcept: * """User manages file lifetime - this is a no-op""" * return 0 # <<<<<<<<<<<<<< @@ -12562,7 +12767,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_close_handler(CYTHON __pyx_r = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":852 + /* "pyreadstat/_readstat_parser.pyx":861 * return 0 * * cdef int pyobject_close_handler(void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12575,7 +12780,7 @@ static int __pyx_f_10pyreadstat_16_readstat_parser_pyobject_close_handler(CYTHON return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":856 +/* "pyreadstat/_readstat_parser.pyx":865 * return 0 * * cdef ssize_t pyobject_read_handler(void *buf, size_t nbyte, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12605,7 +12810,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pyobject_read_handler", 0); - /* "pyreadstat/_readstat_parser.pyx":863 + /* "pyreadstat/_readstat_parser.pyx":872 * cdef char *data_ptr * * try: # <<<<<<<<<<<<<< @@ -12621,7 +12826,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "pyreadstat/_readstat_parser.pyx":864 + /* "pyreadstat/_readstat_parser.pyx":873 * * try: * file_obj = _file_object_ctx # <<<<<<<<<<<<<< @@ -12631,7 +12836,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx); __pyx_v_file_obj = __pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx; - /* "pyreadstat/_readstat_parser.pyx":865 + /* "pyreadstat/_readstat_parser.pyx":874 * try: * file_obj = _file_object_ctx * data = file_obj.read(nbyte) # <<<<<<<<<<<<<< @@ -12640,7 +12845,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( */ __pyx_t_5 = __pyx_v_file_obj; __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyLong_FromSize_t(__pyx_v_nbyte); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyLong_FromSize_t(__pyx_v_nbyte); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; { @@ -12648,14 +12853,14 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 865, __pyx_L3_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 874, __pyx_L3_error) __pyx_v_data = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":866 + /* "pyreadstat/_readstat_parser.pyx":875 * file_obj = _file_object_ctx * data = file_obj.read(nbyte) * bytes_read = len(data) # <<<<<<<<<<<<<< @@ -12664,12 +12869,12 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 866, __pyx_L3_error) + __PYX_ERR(0, 875, __pyx_L3_error) } - __pyx_t_8 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 866, __pyx_L3_error) + __pyx_t_8 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 875, __pyx_L3_error) __pyx_v_bytes_read = __pyx_t_8; - /* "pyreadstat/_readstat_parser.pyx":867 + /* "pyreadstat/_readstat_parser.pyx":876 * data = file_obj.read(nbyte) * bytes_read = len(data) * if bytes_read > 0: # <<<<<<<<<<<<<< @@ -12679,7 +12884,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __pyx_t_9 = (__pyx_v_bytes_read > 0); if (__pyx_t_9) { - /* "pyreadstat/_readstat_parser.pyx":868 + /* "pyreadstat/_readstat_parser.pyx":877 * bytes_read = len(data) * if bytes_read > 0: * data_ptr = data # <<<<<<<<<<<<<< @@ -12688,12 +12893,12 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 868, __pyx_L3_error) + __PYX_ERR(0, 877, __pyx_L3_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L3_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L3_error) __pyx_v_data_ptr = ((char *)__pyx_t_10); - /* "pyreadstat/_readstat_parser.pyx":869 + /* "pyreadstat/_readstat_parser.pyx":878 * if bytes_read > 0: * data_ptr = data * memcpy(buf, data_ptr, bytes_read) # <<<<<<<<<<<<<< @@ -12702,7 +12907,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( */ (void)(memcpy(__pyx_v_buf, __pyx_v_data_ptr, __pyx_v_bytes_read)); - /* "pyreadstat/_readstat_parser.pyx":867 + /* "pyreadstat/_readstat_parser.pyx":876 * data = file_obj.read(nbyte) * bytes_read = len(data) * if bytes_read > 0: # <<<<<<<<<<<<<< @@ -12711,7 +12916,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( */ } - /* "pyreadstat/_readstat_parser.pyx":870 + /* "pyreadstat/_readstat_parser.pyx":879 * data_ptr = data * memcpy(buf, data_ptr, bytes_read) * return bytes_read # <<<<<<<<<<<<<< @@ -12721,7 +12926,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __pyx_r = __pyx_v_bytes_read; goto __pyx_L7_try_return; - /* "pyreadstat/_readstat_parser.pyx":863 + /* "pyreadstat/_readstat_parser.pyx":872 * cdef char *data_ptr * * try: # <<<<<<<<<<<<<< @@ -12734,7 +12939,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "pyreadstat/_readstat_parser.pyx":871 + /* "pyreadstat/_readstat_parser.pyx":880 * memcpy(buf, data_ptr, bytes_read) * return bytes_read * except: # <<<<<<<<<<<<<< @@ -12744,7 +12949,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( /*except:*/ { __Pyx_ErrRestore(0,0,0); - /* "pyreadstat/_readstat_parser.pyx":872 + /* "pyreadstat/_readstat_parser.pyx":881 * return bytes_read * except: * return -1 # <<<<<<<<<<<<<< @@ -12755,7 +12960,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( goto __pyx_L6_except_return; } - /* "pyreadstat/_readstat_parser.pyx":863 + /* "pyreadstat/_readstat_parser.pyx":872 * cdef char *data_ptr * * try: # <<<<<<<<<<<<<< @@ -12776,7 +12981,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":856 + /* "pyreadstat/_readstat_parser.pyx":865 * return 0 * * cdef ssize_t pyobject_read_handler(void *buf, size_t nbyte, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12792,7 +12997,7 @@ static Py_ssize_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler( return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":874 +/* "pyreadstat/_readstat_parser.pyx":883 * return -1 * * cdef readstat_off_t pyobject_seek_handler(readstat_off_t offset, readstat_io_flags_t whence, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -12819,7 +13024,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pyobject_seek_handler", 0); - /* "pyreadstat/_readstat_parser.pyx":879 + /* "pyreadstat/_readstat_parser.pyx":888 * cdef int py_whence * * try: # <<<<<<<<<<<<<< @@ -12835,7 +13040,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "pyreadstat/_readstat_parser.pyx":880 + /* "pyreadstat/_readstat_parser.pyx":889 * * try: * file_obj = _file_object_ctx # <<<<<<<<<<<<<< @@ -12845,7 +13050,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx); __pyx_v_file_obj = __pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx; - /* "pyreadstat/_readstat_parser.pyx":881 + /* "pyreadstat/_readstat_parser.pyx":890 * try: * file_obj = _file_object_ctx * if whence == READSTAT_SEEK_SET: # <<<<<<<<<<<<<< @@ -12855,7 +13060,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand switch (__pyx_v_whence) { case READSTAT_SEEK_SET: - /* "pyreadstat/_readstat_parser.pyx":882 + /* "pyreadstat/_readstat_parser.pyx":891 * file_obj = _file_object_ctx * if whence == READSTAT_SEEK_SET: * py_whence = 0 # <<<<<<<<<<<<<< @@ -12864,7 +13069,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand */ __pyx_v_py_whence = 0; - /* "pyreadstat/_readstat_parser.pyx":881 + /* "pyreadstat/_readstat_parser.pyx":890 * try: * file_obj = _file_object_ctx * if whence == READSTAT_SEEK_SET: # <<<<<<<<<<<<<< @@ -12874,7 +13079,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand break; case READSTAT_SEEK_CUR: - /* "pyreadstat/_readstat_parser.pyx":884 + /* "pyreadstat/_readstat_parser.pyx":893 * py_whence = 0 * elif whence == READSTAT_SEEK_CUR: * py_whence = 1 # <<<<<<<<<<<<<< @@ -12883,7 +13088,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand */ __pyx_v_py_whence = 1; - /* "pyreadstat/_readstat_parser.pyx":883 + /* "pyreadstat/_readstat_parser.pyx":892 * if whence == READSTAT_SEEK_SET: * py_whence = 0 * elif whence == READSTAT_SEEK_CUR: # <<<<<<<<<<<<<< @@ -12893,7 +13098,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand break; default: - /* "pyreadstat/_readstat_parser.pyx":886 + /* "pyreadstat/_readstat_parser.pyx":895 * py_whence = 1 * else: # READSTAT_SEEK_END * py_whence = 2 # <<<<<<<<<<<<<< @@ -12904,7 +13109,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand break; } - /* "pyreadstat/_readstat_parser.pyx":888 + /* "pyreadstat/_readstat_parser.pyx":897 * py_whence = 2 * * file_obj.seek(offset, py_whence) # <<<<<<<<<<<<<< @@ -12913,9 +13118,9 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand */ __pyx_t_5 = __pyx_v_file_obj; __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyLong_From_off_t(__pyx_v_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyLong_From_off_t(__pyx_v_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_py_whence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L3_error) + __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_py_whence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 0; { @@ -12924,12 +13129,12 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":889 + /* "pyreadstat/_readstat_parser.pyx":898 * * file_obj.seek(offset, py_whence) * return file_obj.tell() # <<<<<<<<<<<<<< @@ -12943,15 +13148,15 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tell, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_9 = __Pyx_PyLong_As_off_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((readstat_off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 889, __pyx_L3_error) + __pyx_t_9 = __Pyx_PyLong_As_off_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((readstat_off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_9; goto __pyx_L7_try_return; - /* "pyreadstat/_readstat_parser.pyx":879 + /* "pyreadstat/_readstat_parser.pyx":888 * cdef int py_whence * * try: # <<<<<<<<<<<<<< @@ -12965,7 +13170,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":890 + /* "pyreadstat/_readstat_parser.pyx":899 * file_obj.seek(offset, py_whence) * return file_obj.tell() * except: # <<<<<<<<<<<<<< @@ -12975,7 +13180,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand /*except:*/ { __Pyx_ErrRestore(0,0,0); - /* "pyreadstat/_readstat_parser.pyx":891 + /* "pyreadstat/_readstat_parser.pyx":900 * return file_obj.tell() * except: * return -1 # <<<<<<<<<<<<<< @@ -12986,7 +13191,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand goto __pyx_L6_except_return; } - /* "pyreadstat/_readstat_parser.pyx":879 + /* "pyreadstat/_readstat_parser.pyx":888 * cdef int py_whence * * try: # <<<<<<<<<<<<<< @@ -13007,7 +13212,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand goto __pyx_L0; } - /* "pyreadstat/_readstat_parser.pyx":874 + /* "pyreadstat/_readstat_parser.pyx":883 * return -1 * * cdef readstat_off_t pyobject_seek_handler(readstat_off_t offset, readstat_io_flags_t whence, void *io_ctx) noexcept: # <<<<<<<<<<<<<< @@ -13022,7 +13227,7 @@ static readstat_off_t __pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_hand return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":894 +/* "pyreadstat/_readstat_parser.pyx":903 * * * cdef void check_exit_status(readstat_error_t retcode) except *: # <<<<<<<<<<<<<< @@ -13044,7 +13249,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e int __pyx_clineno = 0; __Pyx_RefNannySetupContext("check_exit_status", 0); - /* "pyreadstat/_readstat_parser.pyx":901 + /* "pyreadstat/_readstat_parser.pyx":910 * cdef char * err_readstat * cdef str err_message * if retcode != READSTAT_OK: # <<<<<<<<<<<<<< @@ -13054,7 +13259,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e __pyx_t_1 = (__pyx_v_retcode != READSTAT_OK); if (unlikely(__pyx_t_1)) { - /* "pyreadstat/_readstat_parser.pyx":902 + /* "pyreadstat/_readstat_parser.pyx":911 * cdef str err_message * if retcode != READSTAT_OK: * err_readstat = readstat_error_message(retcode) # <<<<<<<<<<<<<< @@ -13063,14 +13268,14 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e */ __pyx_v_err_readstat = readstat_error_message(__pyx_v_retcode); - /* "pyreadstat/_readstat_parser.pyx":903 + /* "pyreadstat/_readstat_parser.pyx":912 * if retcode != READSTAT_OK: * err_readstat = readstat_error_message(retcode) * err_message = err_readstat # <<<<<<<<<<<<<< * raise ReadstatError(err_message) * */ - __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_err_readstat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FromString(__pyx_v_err_readstat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); @@ -13078,7 +13283,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e __pyx_v_err_message = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":904 + /* "pyreadstat/_readstat_parser.pyx":913 * err_readstat = readstat_error_message(retcode) * err_message = err_readstat * raise ReadstatError(err_message) # <<<<<<<<<<<<<< @@ -13086,7 +13291,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e * */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -13105,14 +13310,14 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __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_ERR(0, 904, __pyx_L1_error) + __PYX_ERR(0, 913, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":901 + /* "pyreadstat/_readstat_parser.pyx":910 * cdef char * err_readstat * cdef str err_message * if retcode != READSTAT_OK: # <<<<<<<<<<<<<< @@ -13121,7 +13326,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e */ } - /* "pyreadstat/_readstat_parser.pyx":894 + /* "pyreadstat/_readstat_parser.pyx":903 * * * cdef void check_exit_status(readstat_error_t retcode) except *: # <<<<<<<<<<<<<< @@ -13141,7 +13346,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_e __Pyx_RefNannyFinishContext(); } -/* "pyreadstat/_readstat_parser.pyx":907 +/* "pyreadstat/_readstat_parser.pyx":916 * * * cdef void run_readstat_parser(char * filename, data_container data, py_file_extension file_extension, long row_limit, long row_offset, object file_obj=None) except *: # <<<<<<<<<<<<<< @@ -13181,7 +13386,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ } } - /* "pyreadstat/_readstat_parser.pyx":934 + /* "pyreadstat/_readstat_parser.pyx":943 * cdef bytes encoding_byte * * metaonly = data.metaonly # <<<<<<<<<<<<<< @@ -13191,7 +13396,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = __pyx_v_data->metaonly; __pyx_v_metaonly = __pyx_t_1; - /* "pyreadstat/_readstat_parser.pyx":935 + /* "pyreadstat/_readstat_parser.pyx":944 * * metaonly = data.metaonly * ctx = data # <<<<<<<<<<<<<< @@ -13200,7 +13405,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_ctx = ((void *)__pyx_v_data); - /* "pyreadstat/_readstat_parser.pyx":938 + /* "pyreadstat/_readstat_parser.pyx":947 * * #readstat_error_t error = READSTAT_OK; * parser = readstat_parser_init() # <<<<<<<<<<<<<< @@ -13209,7 +13414,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_parser = readstat_parser_init(); - /* "pyreadstat/_readstat_parser.pyx":939 + /* "pyreadstat/_readstat_parser.pyx":948 * #readstat_error_t error = READSTAT_OK; * parser = readstat_parser_init() * metadata_handler = handle_metadata # <<<<<<<<<<<<<< @@ -13218,7 +13423,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_metadata_handler = ((readstat_metadata_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_metadata); - /* "pyreadstat/_readstat_parser.pyx":940 + /* "pyreadstat/_readstat_parser.pyx":949 * parser = readstat_parser_init() * metadata_handler = handle_metadata * variable_handler = handle_variable # <<<<<<<<<<<<<< @@ -13227,7 +13432,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_variable_handler = ((readstat_variable_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_variable); - /* "pyreadstat/_readstat_parser.pyx":941 + /* "pyreadstat/_readstat_parser.pyx":950 * metadata_handler = handle_metadata * variable_handler = handle_variable * value_handler = handle_value # <<<<<<<<<<<<<< @@ -13236,7 +13441,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_value_handler = ((readstat_value_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_value); - /* "pyreadstat/_readstat_parser.pyx":942 + /* "pyreadstat/_readstat_parser.pyx":951 * variable_handler = handle_variable * value_handler = handle_value * value_label_handler = handle_value_label # <<<<<<<<<<<<<< @@ -13245,7 +13450,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_value_label_handler = ((readstat_value_label_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_value_label); - /* "pyreadstat/_readstat_parser.pyx":943 + /* "pyreadstat/_readstat_parser.pyx":952 * value_handler = handle_value * value_label_handler = handle_value_label * note_handler = handle_note # <<<<<<<<<<<<<< @@ -13254,43 +13459,43 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_note_handler = ((readstat_note_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_note); - /* "pyreadstat/_readstat_parser.pyx":946 + /* "pyreadstat/_readstat_parser.pyx":955 * * * check_exit_status(readstat_set_metadata_handler(parser, metadata_handler)) # <<<<<<<<<<<<<< * check_exit_status(readstat_set_variable_handler(parser, variable_handler)) * check_exit_status(readstat_set_value_label_handler(parser, value_label_handler)) */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_metadata_handler(__pyx_v_parser, __pyx_v_metadata_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_metadata_handler(__pyx_v_parser, __pyx_v_metadata_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":947 + /* "pyreadstat/_readstat_parser.pyx":956 * * check_exit_status(readstat_set_metadata_handler(parser, metadata_handler)) * check_exit_status(readstat_set_variable_handler(parser, variable_handler)) # <<<<<<<<<<<<<< * check_exit_status(readstat_set_value_label_handler(parser, value_label_handler)) * check_exit_status(readstat_set_note_handler(parser, note_handler)) */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_variable_handler(__pyx_v_parser, __pyx_v_variable_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_variable_handler(__pyx_v_parser, __pyx_v_variable_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 956, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":948 + /* "pyreadstat/_readstat_parser.pyx":957 * check_exit_status(readstat_set_metadata_handler(parser, metadata_handler)) * check_exit_status(readstat_set_variable_handler(parser, variable_handler)) * check_exit_status(readstat_set_value_label_handler(parser, value_label_handler)) # <<<<<<<<<<<<<< * check_exit_status(readstat_set_note_handler(parser, note_handler)) * */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_value_label_handler(__pyx_v_parser, __pyx_v_value_label_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_value_label_handler(__pyx_v_parser, __pyx_v_value_label_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 957, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":949 + /* "pyreadstat/_readstat_parser.pyx":958 * check_exit_status(readstat_set_variable_handler(parser, variable_handler)) * check_exit_status(readstat_set_value_label_handler(parser, value_label_handler)) * check_exit_status(readstat_set_note_handler(parser, note_handler)) # <<<<<<<<<<<<<< * * # Set up custom I/O handlers for file objects */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_note_handler(__pyx_v_parser, __pyx_v_note_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_note_handler(__pyx_v_parser, __pyx_v_note_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":952 + /* "pyreadstat/_readstat_parser.pyx":961 * * # Set up custom I/O handlers for file objects * if file_obj is not None: # <<<<<<<<<<<<<< @@ -13300,7 +13505,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = (__pyx_v_file_obj != Py_None); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":953 + /* "pyreadstat/_readstat_parser.pyx":962 * # Set up custom I/O handlers for file objects * if file_obj is not None: * _file_object_ctx = file_obj # <<<<<<<<<<<<<< @@ -13312,7 +13517,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx, __pyx_v_file_obj); __Pyx_GIVEREF(__pyx_v_file_obj); - /* "pyreadstat/_readstat_parser.pyx":954 + /* "pyreadstat/_readstat_parser.pyx":963 * if file_obj is not None: * _file_object_ctx = file_obj * open_handler = pyobject_open_handler # <<<<<<<<<<<<<< @@ -13321,7 +13526,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_open_handler = ((readstat_open_handler)__pyx_f_10pyreadstat_16_readstat_parser_pyobject_open_handler); - /* "pyreadstat/_readstat_parser.pyx":955 + /* "pyreadstat/_readstat_parser.pyx":964 * _file_object_ctx = file_obj * open_handler = pyobject_open_handler * close_handler = pyobject_close_handler # <<<<<<<<<<<<<< @@ -13330,7 +13535,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_close_handler = ((readstat_close_handler)__pyx_f_10pyreadstat_16_readstat_parser_pyobject_close_handler); - /* "pyreadstat/_readstat_parser.pyx":956 + /* "pyreadstat/_readstat_parser.pyx":965 * open_handler = pyobject_open_handler * close_handler = pyobject_close_handler * read_handler = pyobject_read_handler # <<<<<<<<<<<<<< @@ -13339,7 +13544,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_read_handler = ((readstat_read_handler)__pyx_f_10pyreadstat_16_readstat_parser_pyobject_read_handler); - /* "pyreadstat/_readstat_parser.pyx":957 + /* "pyreadstat/_readstat_parser.pyx":966 * close_handler = pyobject_close_handler * read_handler = pyobject_read_handler * seek_handler = pyobject_seek_handler # <<<<<<<<<<<<<< @@ -13348,7 +13553,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_seek_handler = ((readstat_seek_handler)__pyx_f_10pyreadstat_16_readstat_parser_pyobject_seek_handler); - /* "pyreadstat/_readstat_parser.pyx":958 + /* "pyreadstat/_readstat_parser.pyx":967 * read_handler = pyobject_read_handler * seek_handler = pyobject_seek_handler * readstat_set_open_handler(parser, open_handler) # <<<<<<<<<<<<<< @@ -13357,7 +13562,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ (void)(readstat_set_open_handler(__pyx_v_parser, __pyx_v_open_handler)); - /* "pyreadstat/_readstat_parser.pyx":959 + /* "pyreadstat/_readstat_parser.pyx":968 * seek_handler = pyobject_seek_handler * readstat_set_open_handler(parser, open_handler) * readstat_set_close_handler(parser, close_handler) # <<<<<<<<<<<<<< @@ -13366,7 +13571,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ (void)(readstat_set_close_handler(__pyx_v_parser, __pyx_v_close_handler)); - /* "pyreadstat/_readstat_parser.pyx":960 + /* "pyreadstat/_readstat_parser.pyx":969 * readstat_set_open_handler(parser, open_handler) * readstat_set_close_handler(parser, close_handler) * readstat_set_read_handler(parser, read_handler) # <<<<<<<<<<<<<< @@ -13375,7 +13580,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ (void)(readstat_set_read_handler(__pyx_v_parser, __pyx_v_read_handler)); - /* "pyreadstat/_readstat_parser.pyx":961 + /* "pyreadstat/_readstat_parser.pyx":970 * readstat_set_close_handler(parser, close_handler) * readstat_set_read_handler(parser, read_handler) * readstat_set_seek_handler(parser, seek_handler) # <<<<<<<<<<<<<< @@ -13384,7 +13589,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ (void)(readstat_set_seek_handler(__pyx_v_parser, __pyx_v_seek_handler)); - /* "pyreadstat/_readstat_parser.pyx":952 + /* "pyreadstat/_readstat_parser.pyx":961 * * # Set up custom I/O handlers for file objects * if file_obj is not None: # <<<<<<<<<<<<<< @@ -13394,23 +13599,23 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":962 + /* "pyreadstat/_readstat_parser.pyx":971 * readstat_set_read_handler(parser, read_handler) * readstat_set_seek_handler(parser, seek_handler) * elif os.name == "nt": # <<<<<<<<<<<<<< * # on windows we need a custom open handler in order to deal with internation characters in the path. * open_handler = handle_open */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_nt, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_nt, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":964 + /* "pyreadstat/_readstat_parser.pyx":973 * elif os.name == "nt": * # on windows we need a custom open handler in order to deal with internation characters in the path. * open_handler = handle_open # <<<<<<<<<<<<<< @@ -13419,7 +13624,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_open_handler = ((readstat_open_handler)__pyx_f_10pyreadstat_16_readstat_parser_handle_open); - /* "pyreadstat/_readstat_parser.pyx":965 + /* "pyreadstat/_readstat_parser.pyx":974 * # on windows we need a custom open handler in order to deal with internation characters in the path. * open_handler = handle_open * readstat_set_open_handler(parser, open_handler) # <<<<<<<<<<<<<< @@ -13428,7 +13633,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ (void)(readstat_set_open_handler(__pyx_v_parser, __pyx_v_open_handler)); - /* "pyreadstat/_readstat_parser.pyx":962 + /* "pyreadstat/_readstat_parser.pyx":971 * readstat_set_read_handler(parser, read_handler) * readstat_set_seek_handler(parser, seek_handler) * elif os.name == "nt": # <<<<<<<<<<<<<< @@ -13438,7 +13643,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":967 + /* "pyreadstat/_readstat_parser.pyx":976 * readstat_set_open_handler(parser, open_handler) * * if not metaonly: # <<<<<<<<<<<<<< @@ -13448,16 +13653,16 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = (!__pyx_v_metaonly); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":968 + /* "pyreadstat/_readstat_parser.pyx":977 * * if not metaonly: * check_exit_status(readstat_set_value_handler(parser, value_handler)) # <<<<<<<<<<<<<< * * # if the user set the encoding manually */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_value_handler(__pyx_v_parser, __pyx_v_value_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_value_handler(__pyx_v_parser, __pyx_v_value_handler)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 977, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":967 + /* "pyreadstat/_readstat_parser.pyx":976 * readstat_set_open_handler(parser, open_handler) * * if not metaonly: # <<<<<<<<<<<<<< @@ -13466,7 +13671,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ } - /* "pyreadstat/_readstat_parser.pyx":971 + /* "pyreadstat/_readstat_parser.pyx":980 * * # if the user set the encoding manually * if data.user_encoding: # <<<<<<<<<<<<<< @@ -13477,13 +13682,13 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ else { Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_data->user_encoding); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 971, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 980, __pyx_L1_error) __pyx_t_1 = (__pyx_temp != 0); } if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":972 + /* "pyreadstat/_readstat_parser.pyx":981 * # if the user set the encoding manually * if data.user_encoding: * encoding_bytes = data.user_encoding.encode("utf-8") # <<<<<<<<<<<<<< @@ -13492,24 +13697,24 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ if (unlikely(__pyx_v_data->user_encoding == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(0, 972, __pyx_L1_error) + __PYX_ERR(0, 981, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_AsUTF8String(__pyx_v_data->user_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_3 = PyUnicode_AsUTF8String(__pyx_v_data->user_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_encoding_bytes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":973 + /* "pyreadstat/_readstat_parser.pyx":982 * if data.user_encoding: * encoding_bytes = data.user_encoding.encode("utf-8") * readstat_set_file_character_encoding(parser, encoding_bytes) # <<<<<<<<<<<<<< * * if row_limit: */ - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoding_bytes); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_encoding_bytes); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 982, __pyx_L1_error) (void)(readstat_set_file_character_encoding(__pyx_v_parser, ((char *)__pyx_t_4))); - /* "pyreadstat/_readstat_parser.pyx":971 + /* "pyreadstat/_readstat_parser.pyx":980 * * # if the user set the encoding manually * if data.user_encoding: # <<<<<<<<<<<<<< @@ -13518,7 +13723,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ } - /* "pyreadstat/_readstat_parser.pyx":975 + /* "pyreadstat/_readstat_parser.pyx":984 * readstat_set_file_character_encoding(parser, encoding_bytes) * * if row_limit: # <<<<<<<<<<<<<< @@ -13528,16 +13733,16 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = (__pyx_v_row_limit != 0); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":976 + /* "pyreadstat/_readstat_parser.pyx":985 * * if row_limit: * check_exit_status(readstat_set_row_limit(parser, row_limit)) # <<<<<<<<<<<<<< * * if row_offset: */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_row_limit(__pyx_v_parser, __pyx_v_row_limit)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 976, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_row_limit(__pyx_v_parser, __pyx_v_row_limit)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":975 + /* "pyreadstat/_readstat_parser.pyx":984 * readstat_set_file_character_encoding(parser, encoding_bytes) * * if row_limit: # <<<<<<<<<<<<<< @@ -13546,7 +13751,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ } - /* "pyreadstat/_readstat_parser.pyx":978 + /* "pyreadstat/_readstat_parser.pyx":987 * check_exit_status(readstat_set_row_limit(parser, row_limit)) * * if row_offset: # <<<<<<<<<<<<<< @@ -13556,16 +13761,16 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = (__pyx_v_row_offset != 0); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":979 + /* "pyreadstat/_readstat_parser.pyx":988 * * if row_offset: * check_exit_status(readstat_set_row_offset(parser, row_offset)) # <<<<<<<<<<<<<< * * # parse! */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_row_offset(__pyx_v_parser, __pyx_v_row_offset)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(readstat_set_row_offset(__pyx_v_parser, __pyx_v_row_offset)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":978 + /* "pyreadstat/_readstat_parser.pyx":987 * check_exit_status(readstat_set_row_limit(parser, row_limit)) * * if row_offset: # <<<<<<<<<<<<<< @@ -13574,7 +13779,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ } - /* "pyreadstat/_readstat_parser.pyx":982 + /* "pyreadstat/_readstat_parser.pyx":991 * * # parse! * if file_extension == FILE_EXT_SAV: # <<<<<<<<<<<<<< @@ -13584,7 +13789,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ switch (__pyx_v_file_extension) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAV: - /* "pyreadstat/_readstat_parser.pyx":983 + /* "pyreadstat/_readstat_parser.pyx":992 * # parse! * if file_extension == FILE_EXT_SAV: * error = readstat_parse_sav(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13593,7 +13798,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_sav(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":982 + /* "pyreadstat/_readstat_parser.pyx":991 * * # parse! * if file_extension == FILE_EXT_SAV: # <<<<<<<<<<<<<< @@ -13603,7 +13808,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAS7BDAT: - /* "pyreadstat/_readstat_parser.pyx":985 + /* "pyreadstat/_readstat_parser.pyx":994 * error = readstat_parse_sav(parser, filename, ctx); * elif file_extension == FILE_EXT_SAS7BDAT: * error = readstat_parse_sas7bdat(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13612,7 +13817,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_sas7bdat(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":984 + /* "pyreadstat/_readstat_parser.pyx":993 * if file_extension == FILE_EXT_SAV: * error = readstat_parse_sav(parser, filename, ctx); * elif file_extension == FILE_EXT_SAS7BDAT: # <<<<<<<<<<<<<< @@ -13622,7 +13827,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_DTA: - /* "pyreadstat/_readstat_parser.pyx":987 + /* "pyreadstat/_readstat_parser.pyx":996 * error = readstat_parse_sas7bdat(parser, filename, ctx); * elif file_extension == FILE_EXT_DTA: * error = readstat_parse_dta(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13631,7 +13836,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_dta(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":986 + /* "pyreadstat/_readstat_parser.pyx":995 * elif file_extension == FILE_EXT_SAS7BDAT: * error = readstat_parse_sas7bdat(parser, filename, ctx); * elif file_extension == FILE_EXT_DTA: # <<<<<<<<<<<<<< @@ -13641,7 +13846,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_XPORT: - /* "pyreadstat/_readstat_parser.pyx":989 + /* "pyreadstat/_readstat_parser.pyx":998 * error = readstat_parse_dta(parser, filename, ctx); * elif file_extension == FILE_EXT_XPORT: * error = readstat_parse_xport(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13650,7 +13855,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_xport(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":988 + /* "pyreadstat/_readstat_parser.pyx":997 * elif file_extension == FILE_EXT_DTA: * error = readstat_parse_dta(parser, filename, ctx); * elif file_extension == FILE_EXT_XPORT: # <<<<<<<<<<<<<< @@ -13660,7 +13865,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_POR: - /* "pyreadstat/_readstat_parser.pyx":991 + /* "pyreadstat/_readstat_parser.pyx":1000 * error = readstat_parse_xport(parser, filename, ctx); * elif file_extension == FILE_EXT_POR: * error = readstat_parse_por(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13669,7 +13874,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_por(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":990 + /* "pyreadstat/_readstat_parser.pyx":999 * elif file_extension == FILE_EXT_XPORT: * error = readstat_parse_xport(parser, filename, ctx); * elif file_extension == FILE_EXT_POR: # <<<<<<<<<<<<<< @@ -13679,7 +13884,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAS7BCAT: - /* "pyreadstat/_readstat_parser.pyx":993 + /* "pyreadstat/_readstat_parser.pyx":1002 * error = readstat_parse_por(parser, filename, ctx); * elif file_extension == FILE_EXT_SAS7BCAT: * error = readstat_parse_sas7bcat(parser, filename, ctx); # <<<<<<<<<<<<<< @@ -13688,7 +13893,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_error = readstat_parse_sas7bcat(__pyx_v_parser, __pyx_v_filename, __pyx_v_ctx); - /* "pyreadstat/_readstat_parser.pyx":992 + /* "pyreadstat/_readstat_parser.pyx":1001 * elif file_extension == FILE_EXT_POR: * error = readstat_parse_por(parser, filename, ctx); * elif file_extension == FILE_EXT_SAS7BCAT: # <<<<<<<<<<<<<< @@ -13699,7 +13904,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ default: break; } - /* "pyreadstat/_readstat_parser.pyx":995 + /* "pyreadstat/_readstat_parser.pyx":1004 * error = readstat_parse_sas7bcat(parser, filename, ctx); * #error = parse_func(parser, filename, ctx); * readstat_parser_free(parser) # <<<<<<<<<<<<<< @@ -13708,7 +13913,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ readstat_parser_free(__pyx_v_parser); - /* "pyreadstat/_readstat_parser.pyx":998 + /* "pyreadstat/_readstat_parser.pyx":1007 * # check if a python error ocurred, if yes, it will be printed by the interpreter, * # if not, make sure that the return from parse_func is OK, if not print * pyerr = PyErr_Occurred() # <<<<<<<<<<<<<< @@ -13717,7 +13922,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ __pyx_v_pyerr = PyErr_Occurred(); - /* "pyreadstat/_readstat_parser.pyx":999 + /* "pyreadstat/_readstat_parser.pyx":1008 * # if not, make sure that the return from parse_func is OK, if not print * pyerr = PyErr_Occurred() * if pyerr == NULL: # <<<<<<<<<<<<<< @@ -13727,16 +13932,16 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __pyx_t_1 = (((void *)__pyx_v_pyerr) == NULL); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1000 + /* "pyreadstat/_readstat_parser.pyx":1009 * pyerr = PyErr_Occurred() * if pyerr == NULL: * check_exit_status(error) # <<<<<<<<<<<<<< * * */ - __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(__pyx_v_error); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_f_10pyreadstat_16_readstat_parser_check_exit_status(__pyx_v_error); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":999 + /* "pyreadstat/_readstat_parser.pyx":1008 * # if not, make sure that the return from parse_func is OK, if not print * pyerr = PyErr_Occurred() * if pyerr == NULL: # <<<<<<<<<<<<<< @@ -13745,7 +13950,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ */ } - /* "pyreadstat/_readstat_parser.pyx":907 + /* "pyreadstat/_readstat_parser.pyx":916 * * * cdef void run_readstat_parser(char * filename, data_container data, py_file_extension file_extension, long row_limit, long row_offset, object file_obj=None) except *: # <<<<<<<<<<<<<< @@ -13764,7 +13969,7 @@ static void __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(char *__ __Pyx_RefNannyFinishContext(); } -/* "pyreadstat/_readstat_parser.pyx":1003 +/* "pyreadstat/_readstat_parser.pyx":1012 * * * cdef object data_container_to_dict(data_container data): # <<<<<<<<<<<<<< @@ -13798,7 +14003,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("data_container_to_dict", 0); - /* "pyreadstat/_readstat_parser.pyx":1017 + /* "pyreadstat/_readstat_parser.pyx":1026 * cdef bint metaonly * * final_container = OrderedDict() # <<<<<<<<<<<<<< @@ -13806,7 +14011,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( * col_names = data.col_names */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -13825,13 +14030,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_final_container = __pyx_t_1; __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1018 + /* "pyreadstat/_readstat_parser.pyx":1027 * * final_container = OrderedDict() * col_data = data.col_data # <<<<<<<<<<<<<< @@ -13843,7 +14048,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_v_col_data = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1019 + /* "pyreadstat/_readstat_parser.pyx":1028 * final_container = OrderedDict() * col_data = data.col_data * col_names = data.col_names # <<<<<<<<<<<<<< @@ -13855,7 +14060,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_v_col_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1020 + /* "pyreadstat/_readstat_parser.pyx":1029 * col_data = data.col_data * col_names = data.col_names * is_unkown_number_rows = data.is_unkown_number_rows # <<<<<<<<<<<<<< @@ -13865,7 +14070,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_t_5 = __pyx_v_data->is_unkown_number_rows; __pyx_v_is_unkown_number_rows = __pyx_t_5; - /* "pyreadstat/_readstat_parser.pyx":1021 + /* "pyreadstat/_readstat_parser.pyx":1030 * col_names = data.col_names * is_unkown_number_rows = data.is_unkown_number_rows * max_n_obs = data.max_n_obs # <<<<<<<<<<<<<< @@ -13875,7 +14080,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_t_6 = __pyx_v_data->max_n_obs; __pyx_v_max_n_obs = __pyx_t_6; - /* "pyreadstat/_readstat_parser.pyx":1022 + /* "pyreadstat/_readstat_parser.pyx":1031 * is_unkown_number_rows = data.is_unkown_number_rows * max_n_obs = data.max_n_obs * metaonly = data.metaonly # <<<<<<<<<<<<<< @@ -13885,7 +14090,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_t_5 = __pyx_v_data->metaonly; __pyx_v_metaonly = __pyx_t_5; - /* "pyreadstat/_readstat_parser.pyx":1024 + /* "pyreadstat/_readstat_parser.pyx":1033 * metaonly = data.metaonly * * for fc_cnt in range(0, len(col_names)): # <<<<<<<<<<<<<< @@ -13894,14 +14099,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( */ if (unlikely(__pyx_v_col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1024, __pyx_L1_error) + __PYX_ERR(0, 1033, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_col_names); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_col_names); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1033, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_8; __pyx_t_6+=1) { __pyx_v_fc_cnt = __pyx_t_6; - /* "pyreadstat/_readstat_parser.pyx":1025 + /* "pyreadstat/_readstat_parser.pyx":1034 * * for fc_cnt in range(0, len(col_names)): * cur_name_str = col_names[fc_cnt] # <<<<<<<<<<<<<< @@ -13910,15 +14115,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( */ if (unlikely(__pyx_v_col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1025, __pyx_L1_error) + __PYX_ERR(0, 1034, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_names, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1025, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_cur_name_str, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1026 + /* "pyreadstat/_readstat_parser.pyx":1035 * for fc_cnt in range(0, len(col_names)): * cur_name_str = col_names[fc_cnt] * cur_data = col_data[fc_cnt] # <<<<<<<<<<<<<< @@ -13927,14 +14132,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( */ if (unlikely(__pyx_v_col_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1026, __pyx_L1_error) + __PYX_ERR(0, 1035, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_data, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_col_data, __pyx_v_fc_cnt, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_cur_data, __pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1027 + /* "pyreadstat/_readstat_parser.pyx":1036 * cur_name_str = col_names[fc_cnt] * cur_data = col_data[fc_cnt] * if is_unkown_number_rows and not metaonly: # <<<<<<<<<<<<<< @@ -13951,19 +14156,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_L6_bool_binop_done:; if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":1028 + /* "pyreadstat/_readstat_parser.pyx":1037 * cur_data = col_data[fc_cnt] * if is_unkown_number_rows and not metaonly: * cur_data = cur_data[0:max_n_obs] # <<<<<<<<<<<<<< * if not metaonly: * final_container[cur_name_str] = cur_data */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_cur_data, 0, __pyx_v_max_n_obs, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_cur_data, 0, __pyx_v_max_n_obs, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_cur_data, __pyx_t_1); __pyx_t_1 = 0; - /* "pyreadstat/_readstat_parser.pyx":1027 + /* "pyreadstat/_readstat_parser.pyx":1036 * cur_name_str = col_names[fc_cnt] * cur_data = col_data[fc_cnt] * if is_unkown_number_rows and not metaonly: # <<<<<<<<<<<<<< @@ -13972,7 +14177,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( */ } - /* "pyreadstat/_readstat_parser.pyx":1029 + /* "pyreadstat/_readstat_parser.pyx":1038 * if is_unkown_number_rows and not metaonly: * cur_data = cur_data[0:max_n_obs] * if not metaonly: # <<<<<<<<<<<<<< @@ -13982,16 +14187,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_t_5 = (!__pyx_v_metaonly); if (__pyx_t_5) { - /* "pyreadstat/_readstat_parser.pyx":1030 + /* "pyreadstat/_readstat_parser.pyx":1039 * cur_data = cur_data[0:max_n_obs] * if not metaonly: * final_container[cur_name_str] = cur_data # <<<<<<<<<<<<<< * else: * final_container[cur_name_str] = list() */ - if (unlikely((PyObject_SetItem(__pyx_v_final_container, __pyx_v_cur_name_str, __pyx_v_cur_data) < 0))) __PYX_ERR(0, 1030, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_final_container, __pyx_v_cur_name_str, __pyx_v_cur_data) < 0))) __PYX_ERR(0, 1039, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1029 + /* "pyreadstat/_readstat_parser.pyx":1038 * if is_unkown_number_rows and not metaonly: * cur_data = cur_data[0:max_n_obs] * if not metaonly: # <<<<<<<<<<<<<< @@ -14001,7 +14206,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( goto __pyx_L8; } - /* "pyreadstat/_readstat_parser.pyx":1032 + /* "pyreadstat/_readstat_parser.pyx":1041 * final_container[cur_name_str] = cur_data * else: * final_container[cur_name_str] = list() # <<<<<<<<<<<<<< @@ -14009,15 +14214,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( * return final_container */ /*else*/ { - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_v_final_container, __pyx_v_cur_name_str, __pyx_t_1) < 0))) __PYX_ERR(0, 1032, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_final_container, __pyx_v_cur_name_str, __pyx_t_1) < 0))) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L8:; } - /* "pyreadstat/_readstat_parser.pyx":1034 + /* "pyreadstat/_readstat_parser.pyx":1043 * final_container[cur_name_str] = list() * * return final_container # <<<<<<<<<<<<<< @@ -14029,7 +14234,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( __pyx_r = __pyx_v_final_container; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":1003 + /* "pyreadstat/_readstat_parser.pyx":1012 * * * cdef object data_container_to_dict(data_container data): # <<<<<<<<<<<<<< @@ -14055,7 +14260,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict( return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":1036 +/* "pyreadstat/_readstat_parser.pyx":1045 * return final_container * * cdef object dict_to_dataframe(object dict_data, data_container dc): # <<<<<<<<<<<<<< @@ -14082,6 +14287,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyObject *__pyx_v_pd = NULL; PyObject *__pyx_v_pl = NULL; PyObject *__pyx_v_x = NULL; + PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -14102,12 +14308,18 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format __pyx_t_16; int __pyx_t_17; PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dict_to_dataframe", 0); - /* "pyreadstat/_readstat_parser.pyx":1046 + /* "pyreadstat/_readstat_parser.pyx":1055 * cdef py_datetime_format var_format * cdef list dtypes, sertypes, datetime_cols, date_cols * cdef dict schema = None # <<<<<<<<<<<<<< @@ -14117,7 +14329,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_INCREF(Py_None); __pyx_v_schema = ((PyObject*)Py_None); - /* "pyreadstat/_readstat_parser.pyx":1048 + /* "pyreadstat/_readstat_parser.pyx":1057 * cdef dict schema = None * * dates_as_pandas = dc.dates_as_pandas # <<<<<<<<<<<<<< @@ -14127,7 +14339,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_1 = __pyx_v_dc->dates_as_pandas; __pyx_v_dates_as_pandas = __pyx_t_1; - /* "pyreadstat/_readstat_parser.pyx":1049 + /* "pyreadstat/_readstat_parser.pyx":1058 * * dates_as_pandas = dc.dates_as_pandas * output_format = dc.output_format # <<<<<<<<<<<<<< @@ -14139,47 +14351,47 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_v_output_format = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1051 + /* "pyreadstat/_readstat_parser.pyx":1060 * output_format = dc.output_format * * if dict_data: # <<<<<<<<<<<<<< * #schema = None * # in polars if missing user values we need to explicitly set the type */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dict_data); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dict_data); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1060, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1055 + /* "pyreadstat/_readstat_parser.pyx":1064 * # in polars if missing user values we need to explicitly set the type * # of that column to Object if not all the elements are of the same type * if output_format != "pandas" and dc.missing_user_values: # <<<<<<<<<<<<<< * schema = dict() * for indx in range(0, len(dc.col_names)): */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1064, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_dc->missing_user_values); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_dc->missing_user_values); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1064, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1056 + /* "pyreadstat/_readstat_parser.pyx":1065 * # of that column to Object if not all the elements are of the same type * if output_format != "pandas" and dc.missing_user_values: * schema = dict() # <<<<<<<<<<<<<< * for indx in range(0, len(dc.col_names)): * col_name = dc.col_names[indx] */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_schema, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1057 + /* "pyreadstat/_readstat_parser.pyx":1066 * if output_format != "pandas" and dc.missing_user_values: * schema = dict() * for indx in range(0, len(dc.col_names)): # <<<<<<<<<<<<<< @@ -14190,15 +14402,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1057, __pyx_L1_error) + __PYX_ERR(0, 1066, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_indx = __pyx_t_6; - /* "pyreadstat/_readstat_parser.pyx":1058 + /* "pyreadstat/_readstat_parser.pyx":1067 * schema = dict() * for indx in range(0, len(dc.col_names)): * col_name = dc.col_names[indx] # <<<<<<<<<<<<<< @@ -14207,53 +14419,53 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ if (unlikely(__pyx_v_dc->col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1058, __pyx_L1_error) + __PYX_ERR(0, 1067, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_indx, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_names, __pyx_v_indx, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1058, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_col_name, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1059 + /* "pyreadstat/_readstat_parser.pyx":1068 * for indx in range(0, len(dc.col_names)): * col_name = dc.col_names[indx] * if indx in dc.missing_user_values.keys(): # <<<<<<<<<<<<<< * sertypes = [type(x) for x in dict_data[col_name] if x is not None] * # all missing, let polars decide */ - __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_indx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_indx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_dc->missing_user_values == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 1059, __pyx_L1_error) + __PYX_ERR(0, 1068, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_dc->missing_user_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_dc->missing_user_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1060 + /* "pyreadstat/_readstat_parser.pyx":1069 * col_name = dc.col_names[indx] * if indx in dc.missing_user_values.keys(): * sertypes = [type(x) for x in dict_data[col_name] if x is not None] # <<<<<<<<<<<<<< * # all missing, let polars decide * if not sertypes: */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict_data, __pyx_v_col_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dict_data, __pyx_v_col_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -14262,7 +14474,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1069, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } @@ -14272,7 +14484,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1069, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } @@ -14283,13 +14495,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif ++__pyx_t_9; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1069, __pyx_L1_error) PyErr_Clear(); } break; @@ -14300,14 +14512,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_2 = 0; __pyx_t_1 = (__pyx_v_x != Py_None); if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)((PyObject *)Py_TYPE(__pyx_v_x))))) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)((PyObject *)Py_TYPE(__pyx_v_x))))) __PYX_ERR(0, 1069, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_sertypes, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1062 + /* "pyreadstat/_readstat_parser.pyx":1071 * sertypes = [type(x) for x in dict_data[col_name] if x is not None] * # all missing, let polars decide * if not sertypes: # <<<<<<<<<<<<<< @@ -14316,23 +14528,23 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_sertypes); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1062, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1071, __pyx_L1_error) __pyx_t_1 = (__pyx_temp != 0); } __pyx_t_3 = (!__pyx_t_1); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1063 + /* "pyreadstat/_readstat_parser.pyx":1072 * # all missing, let polars decide * if not sertypes: * schema[col_name] = None # <<<<<<<<<<<<<< * continue * allsame = all([x==sertypes[0] for x in sertypes]) */ - if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1063, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1072, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1064 + /* "pyreadstat/_readstat_parser.pyx":1073 * if not sertypes: * schema[col_name] = None * continue # <<<<<<<<<<<<<< @@ -14341,7 +14553,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ goto __pyx_L7_continue; - /* "pyreadstat/_readstat_parser.pyx":1062 + /* "pyreadstat/_readstat_parser.pyx":1071 * sertypes = [type(x) for x in dict_data[col_name] if x is not None] * # all missing, let polars decide * if not sertypes: # <<<<<<<<<<<<<< @@ -14350,7 +14562,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ } - /* "pyreadstat/_readstat_parser.pyx":1065 + /* "pyreadstat/_readstat_parser.pyx":1074 * schema[col_name] = None * continue * allsame = all([x==sertypes[0] for x in sertypes]) # <<<<<<<<<<<<<< @@ -14358,7 +14570,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if allsame: */ __pyx_t_8 = NULL; - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __pyx_v_sertypes; __Pyx_INCREF(__pyx_t_11); __pyx_t_9 = 0; @@ -14366,21 +14578,21 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1074, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sertypes, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sertypes, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = PyObject_RichCompare(__pyx_v_x, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_13 = PyObject_RichCompare(__pyx_v_x, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -14390,14 +14602,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_all, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_allsame = __pyx_t_3; - /* "pyreadstat/_readstat_parser.pyx":1067 + /* "pyreadstat/_readstat_parser.pyx":1076 * allsame = all([x==sertypes[0] for x in sertypes]) * # all the same: let polars decide * if allsame: # <<<<<<<<<<<<<< @@ -14406,16 +14618,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ if (__pyx_v_allsame) { - /* "pyreadstat/_readstat_parser.pyx":1068 + /* "pyreadstat/_readstat_parser.pyx":1077 * # all the same: let polars decide * if allsame: * schema[col_name] = None # <<<<<<<<<<<<<< * # not all the same type, has to be Object * else: */ - if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1077, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1067 + /* "pyreadstat/_readstat_parser.pyx":1076 * allsame = all([x==sertypes[0] for x in sertypes]) * # all the same: let polars decide * if allsame: # <<<<<<<<<<<<<< @@ -14425,7 +14637,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj goto __pyx_L18; } - /* "pyreadstat/_readstat_parser.pyx":1071 + /* "pyreadstat/_readstat_parser.pyx":1080 * # not all the same type, has to be Object * else: * schema[col_name] = nw.Object # <<<<<<<<<<<<<< @@ -14433,17 +14645,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * schema[col_name] = None */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, __pyx_t_2) < 0))) __PYX_ERR(0, 1071, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, __pyx_t_2) < 0))) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L18:; - /* "pyreadstat/_readstat_parser.pyx":1059 + /* "pyreadstat/_readstat_parser.pyx":1068 * for indx in range(0, len(dc.col_names)): * col_name = dc.col_names[indx] * if indx in dc.missing_user_values.keys(): # <<<<<<<<<<<<<< @@ -14453,7 +14665,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj goto __pyx_L9; } - /* "pyreadstat/_readstat_parser.pyx":1073 + /* "pyreadstat/_readstat_parser.pyx":1082 * schema[col_name] = nw.Object * else: * schema[col_name] = None # <<<<<<<<<<<<<< @@ -14461,13 +14673,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = nw.from_dict(dict_data, backend=output_format, schema=schema) */ /*else*/ { - if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1073, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_schema, __pyx_v_col_name, Py_None) < 0))) __PYX_ERR(0, 1082, __pyx_L1_error) } __pyx_L9:; __pyx_L7_continue:; } - /* "pyreadstat/_readstat_parser.pyx":1055 + /* "pyreadstat/_readstat_parser.pyx":1064 * # in polars if missing user values we need to explicitly set the type * # of that column to Object if not all the elements are of the same type * if output_format != "pandas" and dc.missing_user_values: # <<<<<<<<<<<<<< @@ -14476,7 +14688,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ } - /* "pyreadstat/_readstat_parser.pyx":1075 + /* "pyreadstat/_readstat_parser.pyx":1084 * schema[col_name] = None * * data_frame = nw.from_dict(dict_data, backend=output_format, schema=schema) # <<<<<<<<<<<<<< @@ -14484,9 +14696,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * data_frame = data_frame.to_native() */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = 1; @@ -14503,21 +14715,21 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, __pyx_v_dict_data}; - __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1075, __pyx_L1_error) - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1075, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1084, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema, __pyx_v_schema, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 1084, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_data_frame = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1076 + /* "pyreadstat/_readstat_parser.pyx":1085 * * data_frame = nw.from_dict(dict_data, backend=output_format, schema=schema) * natnamespace = nw.get_native_namespace(data_frame) # <<<<<<<<<<<<<< @@ -14525,9 +14737,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1076, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_get_native_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_get_native_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = 1; @@ -14547,13 +14759,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_natnamespace = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1077 + /* "pyreadstat/_readstat_parser.pyx":1086 * data_frame = nw.from_dict(dict_data, backend=output_format, schema=schema) * natnamespace = nw.get_native_namespace(data_frame) * data_frame = data_frame.to_native() # <<<<<<<<<<<<<< @@ -14567,13 +14779,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_data_frame, __pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1079 + /* "pyreadstat/_readstat_parser.pyx":1088 * data_frame = data_frame.to_native() * * if dates_as_pandas and output_format=="pandas": # <<<<<<<<<<<<<< @@ -14585,12 +14797,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_3 = __pyx_v_dates_as_pandas; goto __pyx_L20_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) __pyx_t_3 = __pyx_t_1; __pyx_L20_bool_binop_done:; if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1080 + /* "pyreadstat/_readstat_parser.pyx":1089 * * if dates_as_pandas and output_format=="pandas": * pd = natnamespace # <<<<<<<<<<<<<< @@ -14600,14 +14812,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_INCREF(__pyx_v_natnamespace); __pyx_v_pd = __pyx_v_natnamespace; - /* "pyreadstat/_readstat_parser.pyx":1081 + /* "pyreadstat/_readstat_parser.pyx":1090 * if dates_as_pandas and output_format=="pandas": * pd = natnamespace * dtypes = data_frame.dtypes.tolist() # <<<<<<<<<<<<<< * # check that datetime columns are datetime type * # this is needed in case all date values are nan */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_dtypes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __pyx_t_11; __Pyx_INCREF(__pyx_t_7); @@ -14617,14 +14829,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tolist, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1081, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1090, __pyx_L1_error) __pyx_v_dtypes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1084 + /* "pyreadstat/_readstat_parser.pyx":1093 * # check that datetime columns are datetime type * # this is needed in case all date values are nan * for index, column in enumerate(data_frame.columns): # <<<<<<<<<<<<<< @@ -14632,16 +14844,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if dtypes[index] != '__pyx_n_u_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1093, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -14650,7 +14862,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1084, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1093, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -14660,7 +14872,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1084, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1093, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -14671,26 +14883,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_10(__pyx_t_11); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1084, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1093, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1084, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_column, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_index = __pyx_t_15; __pyx_t_15 = (__pyx_t_15 + 1); - /* "pyreadstat/_readstat_parser.pyx":1085 + /* "pyreadstat/_readstat_parser.pyx":1094 * # this is needed in case all date values are nan * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] # <<<<<<<<<<<<<< @@ -14699,15 +14911,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ if (unlikely(__pyx_v_dc->col_formats == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1085, __pyx_L1_error) + __PYX_ERR(0, 1094, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_var_format = __pyx_t_16; - /* "pyreadstat/_readstat_parser.pyx":1086 + /* "pyreadstat/_readstat_parser.pyx":1095 * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] * if dtypes[index] != '__pyx_kp_u_M8_ns, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_M8_ns, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1095, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { } else { @@ -14740,7 +14952,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_L25_bool_binop_done:; if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1087 + /* "pyreadstat/_readstat_parser.pyx":1096 * var_format = dc.col_formats[index] * if dtypes[index] != '__pyx_n_u_to_datetime, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 1087, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 1096, __pyx_L1_error); __Pyx_INCREF(__pyx_v_column); __Pyx_GIVEREF(__pyx_v_column); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_column) != (0)) __PYX_ERR(0, 1087, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_7, __pyx_t_2) < 0))) __PYX_ERR(0, 1087, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_column) != (0)) __PYX_ERR(0, 1096, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_7, __pyx_t_2) < 0))) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1086 + /* "pyreadstat/_readstat_parser.pyx":1095 * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] * if dtypes[index] != '__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1098, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; @@ -14821,7 +15033,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_L29_bool_binop_done:; if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1091 + /* "pyreadstat/_readstat_parser.pyx":1100 * if output_format == "polars" and not dc.no_datetime_conversion: * # datetime and date vectorized conversion * pl = natnamespace # <<<<<<<<<<<<<< @@ -14831,31 +15043,31 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_INCREF(__pyx_v_natnamespace); __pyx_v_pl = __pyx_v_natnamespace; - /* "pyreadstat/_readstat_parser.pyx":1092 + /* "pyreadstat/_readstat_parser.pyx":1101 * # datetime and date vectorized conversion * pl = natnamespace * datetime_cols = list() # <<<<<<<<<<<<<< * date_cols = list() * for index, column in enumerate(data_frame.columns): */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_v_datetime_cols = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - /* "pyreadstat/_readstat_parser.pyx":1093 + /* "pyreadstat/_readstat_parser.pyx":1102 * pl = natnamespace * datetime_cols = list() * date_cols = list() # <<<<<<<<<<<<<< * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_v_date_cols = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - /* "pyreadstat/_readstat_parser.pyx":1094 + /* "pyreadstat/_readstat_parser.pyx":1103 * datetime_cols = list() * date_cols = list() * for index, column in enumerate(data_frame.columns): # <<<<<<<<<<<<<< @@ -14863,16 +15075,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * if var_format == DATE_FORMAT_DATETIME: */ __pyx_t_15 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_frame, __pyx_mstate_global->__pyx_n_u_columns); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { __pyx_t_2 = __pyx_t_11; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1103, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (;;) { @@ -14881,7 +15093,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1103, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -14891,7 +15103,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1103, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -14902,26 +15114,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) } else { __pyx_t_11 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1103, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_11); - if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_11))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_11))) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_column, ((PyObject*)__pyx_t_11)); __pyx_t_11 = 0; __pyx_v_index = __pyx_t_15; __pyx_t_15 = (__pyx_t_15 + 1); - /* "pyreadstat/_readstat_parser.pyx":1095 + /* "pyreadstat/_readstat_parser.pyx":1104 * date_cols = list() * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] # <<<<<<<<<<<<<< @@ -14930,15 +15142,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ if (unlikely(__pyx_v_dc->col_formats == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1095, __pyx_L1_error) + __PYX_ERR(0, 1104, __pyx_L1_error) } - __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_dc->col_formats, __pyx_v_index, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_16 = ((__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format)__Pyx_PyLong_As___pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_var_format = __pyx_t_16; - /* "pyreadstat/_readstat_parser.pyx":1096 + /* "pyreadstat/_readstat_parser.pyx":1105 * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] * if var_format == DATE_FORMAT_DATETIME: # <<<<<<<<<<<<<< @@ -14948,16 +15160,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_3 = (__pyx_v_var_format == __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATETIME); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1097 + /* "pyreadstat/_readstat_parser.pyx":1106 * var_format = dc.col_formats[index] * if var_format == DATE_FORMAT_DATETIME: * datetime_cols.append(column) # <<<<<<<<<<<<<< * if var_format == DATE_FORMAT_DATE: * date_cols.append(column) */ - __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_datetime_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_datetime_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1106, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1096 + /* "pyreadstat/_readstat_parser.pyx":1105 * for index, column in enumerate(data_frame.columns): * var_format = dc.col_formats[index] * if var_format == DATE_FORMAT_DATETIME: # <<<<<<<<<<<<<< @@ -14966,7 +15178,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ } - /* "pyreadstat/_readstat_parser.pyx":1098 + /* "pyreadstat/_readstat_parser.pyx":1107 * if var_format == DATE_FORMAT_DATETIME: * datetime_cols.append(column) * if var_format == DATE_FORMAT_DATE: # <<<<<<<<<<<<<< @@ -14976,16 +15188,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_3 = (__pyx_v_var_format == __pyx_e_10pyreadstat_16_readstat_parser_DATE_FORMAT_DATE); if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1099 + /* "pyreadstat/_readstat_parser.pyx":1108 * datetime_cols.append(column) * if var_format == DATE_FORMAT_DATE: * date_cols.append(column) # <<<<<<<<<<<<<< * if datetime_cols: - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) + * data_frame = data_frame.with_columns( */ - __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_date_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1099, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_date_cols, __pyx_v_column); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1108, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1098 + /* "pyreadstat/_readstat_parser.pyx":1107 * if var_format == DATE_FORMAT_DATETIME: * datetime_cols.append(column) * if var_format == DATE_FORMAT_DATE: # <<<<<<<<<<<<<< @@ -14994,7 +15206,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ } - /* "pyreadstat/_readstat_parser.pyx":1094 + /* "pyreadstat/_readstat_parser.pyx":1103 * datetime_cols = list() * date_cols = list() * for index, column in enumerate(data_frame.columns): # <<<<<<<<<<<<<< @@ -15004,91 +15216,313 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1100 + /* "pyreadstat/_readstat_parser.pyx":1109 * if var_format == DATE_FORMAT_DATE: * date_cols.append(column) * if datetime_cols: # <<<<<<<<<<<<<< - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) - * if date_cols: + * data_frame = data_frame.with_columns( + * [ */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_datetime_cols); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1100, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1109, __pyx_L1_error) __pyx_t_3 = (__pyx_temp != 0); } if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1101 + /* "pyreadstat/_readstat_parser.pyx":1110 * date_cols.append(column) * if datetime_cols: - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) # <<<<<<<<<<<<<< - * if date_cols: - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) + * data_frame = data_frame.with_columns( # <<<<<<<<<<<<<< + * [ + * pl.from_epoch( */ __pyx_t_11 = __pyx_v_data_frame; __Pyx_INCREF(__pyx_t_11); - __pyx_t_8 = __pyx_v_pl; - __Pyx_INCREF(__pyx_t_8); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_12 = PySequence_Tuple(__pyx_v_datetime_cols); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_12, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_14 = 0; - { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_18}; - __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_s, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1101, __pyx_L1_error) - __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "pyreadstat/_readstat_parser.pyx":1111 + * if datetime_cols: + * data_frame = data_frame.with_columns( + * [ # <<<<<<<<<<<<<< + * pl.from_epoch( + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( +*/ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + + /* "pyreadstat/_readstat_parser.pyx":1117 + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), + * time_unit='us') + * for c in datetime_cols if data_frame[c].len() > 0 # <<<<<<<<<<<<<< + * ] + * ) +*/ + __pyx_t_8 = __pyx_v_datetime_cols; __Pyx_INCREF(__pyx_t_8); + __pyx_t_4 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1117, __pyx_L1_error) + #endif + if (__pyx_t_4 >= __pyx_temp) break; + } + __pyx_t_13 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_4; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_13); + __pyx_t_13 = 0; + __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_data_frame, __pyx_v_c); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_12 = __pyx_t_18; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_len, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_18 = PyObject_RichCompare(__pyx_t_13, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_3) { + + /* "pyreadstat/_readstat_parser.pyx":1112 + * data_frame = data_frame.with_columns( + * [ + * pl.from_epoch( # <<<<<<<<<<<<<< + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( +*/ + __pyx_t_13 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_13); + + /* "pyreadstat/_readstat_parser.pyx":1113 + * [ + * pl.from_epoch( + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( # <<<<<<<<<<<<<< + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), +*/ + __pyx_t_23 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_23); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_v_c}; + __pyx_t_22 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_col, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; + if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + } + __pyx_t_23 = __Pyx_PyLong_RemainderObjC(__pyx_t_22, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __pyx_t_22 = PyNumber_Multiply(__pyx_t_23, __pyx_mstate_global->__pyx_float_1e6); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_21 = __pyx_t_22; + __Pyx_INCREF(__pyx_t_21); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL}; + __pyx_t_20 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_round, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + } + __pyx_t_19 = __pyx_t_20; + __Pyx_INCREF(__pyx_t_19); + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_Int64); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_22); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_22}; + __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + + /* "pyreadstat/_readstat_parser.pyx":1114 + * pl.from_epoch( + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( # <<<<<<<<<<<<<< + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), + * time_unit='us') +*/ + __pyx_t_24 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_24); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_24, __pyx_v_c}; + __pyx_t_23 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_col, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; + if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + } + __pyx_t_21 = __pyx_t_23; + __Pyx_INCREF(__pyx_t_21); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_21, NULL}; + __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_floor, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + } + __pyx_t_23 = PyNumber_Multiply(__pyx_t_19, __pyx_mstate_global->__pyx_float_1e6); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_22 = __pyx_t_23; + __Pyx_INCREF(__pyx_t_22); + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_Int64); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_t_19}; + __pyx_t_20 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + } + + /* "pyreadstat/_readstat_parser.pyx":1113 + * [ + * pl.from_epoch( + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( # <<<<<<<<<<<<<< + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), +*/ + __pyx_t_23 = PyNumber_Add(__pyx_t_12, __pyx_t_20); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + + /* "pyreadstat/_readstat_parser.pyx":1115 + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), # <<<<<<<<<<<<<< + * time_unit='us') + * for c in datetime_cols if data_frame[c].len() > 0 +*/ + __pyx_t_22 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_22); + __pyx_t_21 = PyFloat_FromDouble(__pyx_v_dc->unix_to_origin_secs); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_22, __pyx_t_21}; + __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lit, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + } + __pyx_t_21 = PyNumber_Multiply(__pyx_t_19, __pyx_mstate_global->__pyx_float_1e6); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_12 = __pyx_t_21; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_Int64); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_19}; + __pyx_t_20 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cast, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + } + + /* "pyreadstat/_readstat_parser.pyx":1114 + * pl.from_epoch( + * (pl.col(c) % 1 * 1e6).round().cast(pl.Int64) + ( + * pl.col(c).floor() * 1e6).cast(pl.Int64) - ( # <<<<<<<<<<<<<< + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), + * time_unit='us') +*/ + __pyx_t_21 = PyNumber_Subtract(__pyx_t_23, __pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, __pyx_t_21}; + __pyx_t_20 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_us, __pyx_t_20, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_18 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_20); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_18))) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "pyreadstat/_readstat_parser.pyx":1117 + * pl.lit(dc.unix_to_origin_secs) * 1e6).cast(pl.Int64), + * time_unit='us') + * for c in datetime_cols if data_frame[c].len() > 0 # <<<<<<<<<<<<<< + * ] + * ) +*/ + } } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_data_frame, __pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1100 + /* "pyreadstat/_readstat_parser.pyx":1109 * if var_format == DATE_FORMAT_DATE: * date_cols.append(column) * if datetime_cols: # <<<<<<<<<<<<<< - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) - * if date_cols: + * data_frame = data_frame.with_columns( + * [ */ } - /* "pyreadstat/_readstat_parser.pyx":1102 - * if datetime_cols: - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) + /* "pyreadstat/_readstat_parser.pyx":1120 + * ] + * ) * if date_cols: # <<<<<<<<<<<<<< * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) * */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_date_cols); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1102, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1120, __pyx_L1_error) __pyx_t_3 = (__pyx_temp != 0); } if (__pyx_t_3) { - /* "pyreadstat/_readstat_parser.pyx":1103 - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) + /* "pyreadstat/_readstat_parser.pyx":1121 + * ) * if date_cols: * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) # <<<<<<<<<<<<<< * @@ -15096,27 +15530,27 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ __pyx_t_7 = __pyx_v_data_frame; __Pyx_INCREF(__pyx_t_7); - __pyx_t_12 = __pyx_v_pl; - __Pyx_INCREF(__pyx_t_12); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_8 = __pyx_v_pl; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_pl, __pyx_mstate_global->__pyx_n_u_col); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __pyx_t_8 = PySequence_Tuple(__pyx_v_date_cols); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_8, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_20 = PySequence_Tuple(__pyx_v_date_cols); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_20, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_14 = 0; { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_t_13}; - __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_d, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1103, __pyx_L1_error) - __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error) + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_21}; + __pyx_t_20 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_time_unit, __pyx_mstate_global->__pyx_n_u_d, __pyx_t_20, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_epoch, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_20); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_14 = 0; @@ -15125,22 +15559,22 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_with_columns, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_data_frame, __pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1102 - * if datetime_cols: - * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*datetime_cols), time_unit='s')) + /* "pyreadstat/_readstat_parser.pyx":1120 + * ] + * ) * if date_cols: # <<<<<<<<<<<<<< * data_frame = data_frame.with_columns(pl.from_epoch(pl.col(*date_cols), time_unit='d')) * */ } - /* "pyreadstat/_readstat_parser.pyx":1089 + /* "pyreadstat/_readstat_parser.pyx":1098 * data_frame.loc[:, column] = pd.to_datetime(data_frame[column]) * * if output_format == "polars" and not dc.no_datetime_conversion: # <<<<<<<<<<<<<< @@ -15149,7 +15583,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj */ } - /* "pyreadstat/_readstat_parser.pyx":1051 + /* "pyreadstat/_readstat_parser.pyx":1060 * output_format = dc.output_format * * if dict_data: # <<<<<<<<<<<<<< @@ -15159,7 +15593,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1106 + /* "pyreadstat/_readstat_parser.pyx":1124 * * else: * data_frame = nw.from_dict(dict_data, backend=output_format).to_native() # <<<<<<<<<<<<<< @@ -15167,34 +15601,34 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj * return data_frame */ /*else*/ { - __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_20 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_nw); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_12))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12); - assert(__pyx_t_8); - PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); - __Pyx_INCREF(__pyx_t_8); + if (unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_8); + assert(__pyx_t_20); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_20); __Pyx_INCREF(__pyx__function); - __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_14 = 0; } #endif { - PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_v_dict_data}; - __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_13, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1106, __pyx_L1_error) - __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error) + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_20, __pyx_v_dict_data}; + __pyx_t_21 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_21); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_backend, __pyx_v_output_format, __pyx_t_21, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_21); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_11 = __pyx_t_7; @@ -15205,7 +15639,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_native, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_data_frame = __pyx_t_2; @@ -15213,7 +15647,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":1108 + /* "pyreadstat/_readstat_parser.pyx":1126 * data_frame = nw.from_dict(dict_data, backend=output_format).to_native() * * return data_frame # <<<<<<<<<<<<<< @@ -15225,7 +15659,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __pyx_r = __pyx_v_data_frame; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":1036 + /* "pyreadstat/_readstat_parser.pyx":1045 * return final_container * * cdef object dict_to_dataframe(object dict_data, data_container dc): # <<<<<<<<<<<<<< @@ -15242,6 +15676,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_18); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_XDECREF(__pyx_t_21); + __Pyx_XDECREF(__pyx_t_22); + __Pyx_XDECREF(__pyx_t_23); + __Pyx_XDECREF(__pyx_t_24); __Pyx_AddTraceback("pyreadstat._readstat_parser.dict_to_dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -15258,12 +15698,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(PyObj __Pyx_XDECREF(__pyx_v_pd); __Pyx_XDECREF(__pyx_v_pl); __Pyx_XDECREF(__pyx_v_x); + __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":1110 +/* "pyreadstat/_readstat_parser.pyx":1128 * return data_frame * * cdef object data_container_extract_metadata(data_container data): # <<<<<<<<<<<<<< @@ -15309,7 +15750,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("data_container_extract_metadata", 0); - /* "pyreadstat/_readstat_parser.pyx":1127 + /* "pyreadstat/_readstat_parser.pyx":1145 * cdef readstat_type_t var_type * * metaonly = data.metaonly # <<<<<<<<<<<<<< @@ -15319,7 +15760,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_1 = __pyx_v_data->metaonly; __pyx_v_metaonly = __pyx_t_1; - /* "pyreadstat/_readstat_parser.pyx":1128 + /* "pyreadstat/_readstat_parser.pyx":1146 * * metaonly = data.metaonly * is_unkown_number_rows = data.is_unkown_number_rows # <<<<<<<<<<<<<< @@ -15329,7 +15770,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_1 = __pyx_v_data->is_unkown_number_rows; __pyx_v_is_unkown_number_rows = __pyx_t_1; - /* "pyreadstat/_readstat_parser.pyx":1130 + /* "pyreadstat/_readstat_parser.pyx":1148 * is_unkown_number_rows = data.is_unkown_number_rows * * cdef object metadata = metadata_container() # <<<<<<<<<<<<<< @@ -15337,7 +15778,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * # mr sets */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_metadata_container); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_metadata_container); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -15356,13 +15797,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_metadata = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1133 + /* "pyreadstat/_readstat_parser.pyx":1151 * * # mr sets * metadata.mr_sets = data.mr_sets # <<<<<<<<<<<<<< @@ -15371,22 +15812,22 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_2 = __pyx_v_data->mr_sets; __Pyx_INCREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_mr_sets, __pyx_t_2) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_mr_sets, __pyx_t_2) < (0)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1136 + /* "pyreadstat/_readstat_parser.pyx":1154 * * # number of rows * metadata.number_columns = data.n_vars # <<<<<<<<<<<<<< * if is_unkown_number_rows: * if not metaonly: */ - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns, __pyx_t_2) < (0)) __PYX_ERR(0, 1136, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns, __pyx_t_2) < (0)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1137 + /* "pyreadstat/_readstat_parser.pyx":1155 * # number of rows * metadata.number_columns = data.n_vars * if is_unkown_number_rows: # <<<<<<<<<<<<<< @@ -15395,7 +15836,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (__pyx_v_is_unkown_number_rows) { - /* "pyreadstat/_readstat_parser.pyx":1138 + /* "pyreadstat/_readstat_parser.pyx":1156 * metadata.number_columns = data.n_vars * if is_unkown_number_rows: * if not metaonly: # <<<<<<<<<<<<<< @@ -15405,19 +15846,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_1 = (!__pyx_v_metaonly); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1139 + /* "pyreadstat/_readstat_parser.pyx":1157 * if is_unkown_number_rows: * if not metaonly: * metadata.number_rows = data.max_n_obs # <<<<<<<<<<<<<< * else: * metadata.number_rows = data.n_obs */ - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->max_n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->max_n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1139, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1138 + /* "pyreadstat/_readstat_parser.pyx":1156 * metadata.number_columns = data.n_vars * if is_unkown_number_rows: * if not metaonly: # <<<<<<<<<<<<<< @@ -15426,7 +15867,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ } - /* "pyreadstat/_readstat_parser.pyx":1137 + /* "pyreadstat/_readstat_parser.pyx":1155 * # number of rows * metadata.number_columns = data.n_vars * if is_unkown_number_rows: # <<<<<<<<<<<<<< @@ -15436,7 +15877,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1141 + /* "pyreadstat/_readstat_parser.pyx":1159 * metadata.number_rows = data.max_n_obs * else: * metadata.number_rows = data.n_obs # <<<<<<<<<<<<<< @@ -15444,14 +15885,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * # value labels */ /*else*/ { - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->n_obs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1141, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":1144 + /* "pyreadstat/_readstat_parser.pyx":1162 * * # value labels * labels_raw = data.labels_raw # <<<<<<<<<<<<<< @@ -15463,7 +15904,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_v_labels_raw = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1145 + /* "pyreadstat/_readstat_parser.pyx":1163 * # value labels * labels_raw = data.labels_raw * label_to_var_name = data.label_to_var_name # <<<<<<<<<<<<<< @@ -15475,29 +15916,29 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_v_label_to_var_name = __pyx_t_2; __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1146 + /* "pyreadstat/_readstat_parser.pyx":1164 * labels_raw = data.labels_raw * label_to_var_name = data.label_to_var_name * variable_value_labels = dict() # <<<<<<<<<<<<<< * * if labels_raw: */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_variable_value_labels = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1148 + /* "pyreadstat/_readstat_parser.pyx":1166 * variable_value_labels = dict() * * if labels_raw: # <<<<<<<<<<<<<< * for var_name, var_label in label_to_var_name.items(): * current_labels = labels_raw.get(var_label) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_labels_raw); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_labels_raw); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1166, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1149 + /* "pyreadstat/_readstat_parser.pyx":1167 * * if labels_raw: * for var_name, var_label in label_to_var_name.items(): # <<<<<<<<<<<<<< @@ -15511,7 +15952,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -15519,9 +15960,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1167, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -15530,7 +15971,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -15540,7 +15981,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -15551,13 +15992,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1167, __pyx_L1_error) PyErr_Clear(); } break; @@ -15570,7 +16011,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1149, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15580,22 +16021,22 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1149, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -15603,7 +16044,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1167, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -15611,17 +16052,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1149, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) __pyx_L9_unpacking_done:; } - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1149, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 1149, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_3))) __PYX_ERR(0, 1167, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_var_name, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_var_label, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "pyreadstat/_readstat_parser.pyx":1150 + /* "pyreadstat/_readstat_parser.pyx":1168 * if labels_raw: * for var_name, var_label in label_to_var_name.items(): * current_labels = labels_raw.get(var_label) # <<<<<<<<<<<<<< @@ -15635,32 +16076,32 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_var_label}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_current_labels, __pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1151 + /* "pyreadstat/_readstat_parser.pyx":1169 * for var_name, var_label in label_to_var_name.items(): * current_labels = labels_raw.get(var_label) * if current_labels: # <<<<<<<<<<<<<< * variable_value_labels[var_name] = current_labels * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_labels); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_current_labels); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1169, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1152 + /* "pyreadstat/_readstat_parser.pyx":1170 * current_labels = labels_raw.get(var_label) * if current_labels: * variable_value_labels[var_name] = current_labels # <<<<<<<<<<<<<< * * original_types = dict() */ - if (unlikely((PyDict_SetItem(__pyx_v_variable_value_labels, __pyx_v_var_name, __pyx_v_current_labels) < 0))) __PYX_ERR(0, 1152, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_variable_value_labels, __pyx_v_var_name, __pyx_v_current_labels) < 0))) __PYX_ERR(0, 1170, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1151 + /* "pyreadstat/_readstat_parser.pyx":1169 * for var_name, var_label in label_to_var_name.items(): * current_labels = labels_raw.get(var_label) * if current_labels: # <<<<<<<<<<<<<< @@ -15669,7 +16110,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ } - /* "pyreadstat/_readstat_parser.pyx":1149 + /* "pyreadstat/_readstat_parser.pyx":1167 * * if labels_raw: * for var_name, var_label in label_to_var_name.items(): # <<<<<<<<<<<<<< @@ -15679,7 +16120,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1148 + /* "pyreadstat/_readstat_parser.pyx":1166 * variable_value_labels = dict() * * if labels_raw: # <<<<<<<<<<<<<< @@ -15688,31 +16129,31 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ } - /* "pyreadstat/_readstat_parser.pyx":1154 + /* "pyreadstat/_readstat_parser.pyx":1172 * variable_value_labels[var_name] = current_labels * * original_types = dict() # <<<<<<<<<<<<<< * readstat_types = dict() * for indx in range(metadata.number_columns): */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_original_types = __pyx_t_4; __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1155 + /* "pyreadstat/_readstat_parser.pyx":1173 * * original_types = dict() * readstat_types = dict() # <<<<<<<<<<<<<< * for indx in range(metadata.number_columns): * cur_col = data.col_names[indx] */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_readstat_types = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1156 + /* "pyreadstat/_readstat_parser.pyx":1174 * original_types = dict() * readstat_types = dict() * for indx in range(metadata.number_columns): # <<<<<<<<<<<<<< @@ -15720,7 +16161,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * cur_type = data.col_formats_original[indx] */ __pyx_t_2 = NULL; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_number_columns); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; { @@ -15728,12 +16169,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { { @@ -15741,7 +16182,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1156, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1174, __pyx_L1_error) PyErr_Clear(); } break; @@ -15751,7 +16192,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1157 + /* "pyreadstat/_readstat_parser.pyx":1175 * readstat_types = dict() * for indx in range(metadata.number_columns): * cur_col = data.col_names[indx] # <<<<<<<<<<<<<< @@ -15760,14 +16201,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (unlikely(__pyx_v_data->col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1157, __pyx_L1_error) + __PYX_ERR(0, 1175, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_names, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_names, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_cur_col, __pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1158 + /* "pyreadstat/_readstat_parser.pyx":1176 * for indx in range(metadata.number_columns): * cur_col = data.col_names[indx] * cur_type = data.col_formats_original[indx] # <<<<<<<<<<<<<< @@ -15776,23 +16217,23 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (unlikely(__pyx_v_data->col_formats_original == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1176, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_formats_original, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_formats_original, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_cur_type, __pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1159 + /* "pyreadstat/_readstat_parser.pyx":1177 * cur_col = data.col_names[indx] * cur_type = data.col_formats_original[indx] * original_types[cur_col] = cur_type # <<<<<<<<<<<<<< * var_type = data.col_dtypes[indx] * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: */ - if (unlikely((PyObject_SetItem(__pyx_v_original_types, __pyx_v_cur_col, __pyx_v_cur_type) < 0))) __PYX_ERR(0, 1159, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_original_types, __pyx_v_cur_col, __pyx_v_cur_type) < 0))) __PYX_ERR(0, 1177, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1160 + /* "pyreadstat/_readstat_parser.pyx":1178 * cur_type = data.col_formats_original[indx] * original_types[cur_col] = cur_type * var_type = data.col_dtypes[indx] # <<<<<<<<<<<<<< @@ -15801,15 +16242,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (unlikely(__pyx_v_data->col_dtypes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1160, __pyx_L1_error) + __PYX_ERR(0, 1178, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_dtypes, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data->col_dtypes, __pyx_v_indx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_11 = ((readstat_type_t)__Pyx_PyLong_As_readstat_type_t(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_var_type = __pyx_t_11; - /* "pyreadstat/_readstat_parser.pyx":1161 + /* "pyreadstat/_readstat_parser.pyx":1179 * original_types[cur_col] = cur_type * var_type = data.col_dtypes[indx] * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -15820,16 +16261,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ case READSTAT_TYPE_STRING: case READSTAT_TYPE_STRING_REF: - /* "pyreadstat/_readstat_parser.pyx":1162 + /* "pyreadstat/_readstat_parser.pyx":1180 * var_type = data.col_dtypes[indx] * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: * readstat_types[cur_col] = "string" # <<<<<<<<<<<<<< * elif var_type == READSTAT_TYPE_INT8: * readstat_types[cur_col] = "int8" */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_string) < 0))) __PYX_ERR(0, 1162, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_string) < 0))) __PYX_ERR(0, 1180, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1161 + /* "pyreadstat/_readstat_parser.pyx":1179 * original_types[cur_col] = cur_type * var_type = data.col_dtypes[indx] * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: # <<<<<<<<<<<<<< @@ -15839,16 +16280,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; case READSTAT_TYPE_INT8: - /* "pyreadstat/_readstat_parser.pyx":1164 + /* "pyreadstat/_readstat_parser.pyx":1182 * readstat_types[cur_col] = "string" * elif var_type == READSTAT_TYPE_INT8: * readstat_types[cur_col] = "int8" # <<<<<<<<<<<<<< * elif var_type == READSTAT_TYPE_INT16: * readstat_types[cur_col] = "int16" */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int8) < 0))) __PYX_ERR(0, 1164, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int8) < 0))) __PYX_ERR(0, 1182, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1163 + /* "pyreadstat/_readstat_parser.pyx":1181 * if var_type == READSTAT_TYPE_STRING or var_type == READSTAT_TYPE_STRING_REF: * readstat_types[cur_col] = "string" * elif var_type == READSTAT_TYPE_INT8: # <<<<<<<<<<<<<< @@ -15858,16 +16299,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; case READSTAT_TYPE_INT16: - /* "pyreadstat/_readstat_parser.pyx":1166 + /* "pyreadstat/_readstat_parser.pyx":1184 * readstat_types[cur_col] = "int8" * elif var_type == READSTAT_TYPE_INT16: * readstat_types[cur_col] = "int16" # <<<<<<<<<<<<<< * elif var_type == READSTAT_TYPE_INT32: * readstat_types[cur_col] = "int32" */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int16) < 0))) __PYX_ERR(0, 1166, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int16) < 0))) __PYX_ERR(0, 1184, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1165 + /* "pyreadstat/_readstat_parser.pyx":1183 * elif var_type == READSTAT_TYPE_INT8: * readstat_types[cur_col] = "int8" * elif var_type == READSTAT_TYPE_INT16: # <<<<<<<<<<<<<< @@ -15877,16 +16318,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; case READSTAT_TYPE_INT32: - /* "pyreadstat/_readstat_parser.pyx":1168 + /* "pyreadstat/_readstat_parser.pyx":1186 * readstat_types[cur_col] = "int16" * elif var_type == READSTAT_TYPE_INT32: * readstat_types[cur_col] = "int32" # <<<<<<<<<<<<<< * elif var_type == READSTAT_TYPE_FLOAT: * readstat_types[cur_col] = "float" */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int32) < 0))) __PYX_ERR(0, 1168, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_int32) < 0))) __PYX_ERR(0, 1186, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1167 + /* "pyreadstat/_readstat_parser.pyx":1185 * elif var_type == READSTAT_TYPE_INT16: * readstat_types[cur_col] = "int16" * elif var_type == READSTAT_TYPE_INT32: # <<<<<<<<<<<<<< @@ -15896,16 +16337,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; case READSTAT_TYPE_FLOAT: - /* "pyreadstat/_readstat_parser.pyx":1170 + /* "pyreadstat/_readstat_parser.pyx":1188 * readstat_types[cur_col] = "int32" * elif var_type == READSTAT_TYPE_FLOAT: * readstat_types[cur_col] = "float" # <<<<<<<<<<<<<< * elif var_type == READSTAT_TYPE_DOUBLE: * readstat_types[cur_col] = "double" */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_float) < 0))) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_float) < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1169 + /* "pyreadstat/_readstat_parser.pyx":1187 * elif var_type == READSTAT_TYPE_INT32: * readstat_types[cur_col] = "int32" * elif var_type == READSTAT_TYPE_FLOAT: # <<<<<<<<<<<<<< @@ -15915,16 +16356,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; case READSTAT_TYPE_DOUBLE: - /* "pyreadstat/_readstat_parser.pyx":1172 + /* "pyreadstat/_readstat_parser.pyx":1190 * readstat_types[cur_col] = "float" * elif var_type == READSTAT_TYPE_DOUBLE: * readstat_types[cur_col] = "double" # <<<<<<<<<<<<<< * else: * raise PyreadstatError("Unkown data type") */ - if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_double) < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_readstat_types, __pyx_v_cur_col, __pyx_mstate_global->__pyx_n_u_double) < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1171 + /* "pyreadstat/_readstat_parser.pyx":1189 * elif var_type == READSTAT_TYPE_FLOAT: * readstat_types[cur_col] = "float" * elif var_type == READSTAT_TYPE_DOUBLE: # <<<<<<<<<<<<<< @@ -15934,7 +16375,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ break; default: - /* "pyreadstat/_readstat_parser.pyx":1174 + /* "pyreadstat/_readstat_parser.pyx":1192 * readstat_types[cur_col] = "double" * else: * raise PyreadstatError("Unkown data type") # <<<<<<<<<<<<<< @@ -15942,7 +16383,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * for indx, curset in data.missing_user_values.items(): */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -15961,16 +16402,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 1174, __pyx_L1_error) + __PYX_ERR(0, 1192, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":1156 + /* "pyreadstat/_readstat_parser.pyx":1174 * original_types = dict() * readstat_types = dict() * for indx in range(metadata.number_columns): # <<<<<<<<<<<<<< @@ -15980,7 +16421,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pyreadstat/_readstat_parser.pyx":1176 + /* "pyreadstat/_readstat_parser.pyx":1194 * raise PyreadstatError("Unkown data type") * * for indx, curset in data.missing_user_values.items(): # <<<<<<<<<<<<<< @@ -15989,18 +16430,18 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (unlikely(__pyx_v_data->missing_user_values == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1176, __pyx_L1_error) + __PYX_ERR(0, 1194, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_data->missing_user_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_data->missing_user_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1194, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -16009,7 +16450,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1194, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -16019,7 +16460,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1194, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -16030,13 +16471,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1194, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1194, __pyx_L1_error) PyErr_Clear(); } break; @@ -16049,7 +16490,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1176, __pyx_L1_error) + __PYX_ERR(0, 1194, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -16059,22 +16500,22 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -16082,7 +16523,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1194, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L18_unpacking_done; @@ -16090,7 +16531,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1176, __pyx_L1_error) + __PYX_ERR(0, 1194, __pyx_L1_error) __pyx_L18_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_indx, __pyx_t_3); @@ -16098,7 +16539,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_XDECREF_SET(__pyx_v_curset, __pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1177 + /* "pyreadstat/_readstat_parser.pyx":1195 * * for indx, curset in data.missing_user_values.items(): * cur_col = data.col_names[indx] # <<<<<<<<<<<<<< @@ -16107,33 +16548,33 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ if (unlikely(__pyx_v_data->col_names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1177, __pyx_L1_error) + __PYX_ERR(0, 1195, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_data->col_names, __pyx_v_indx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_data->col_names, __pyx_v_indx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_cur_col, __pyx_t_8); __pyx_t_8 = 0; - /* "pyreadstat/_readstat_parser.pyx":1178 + /* "pyreadstat/_readstat_parser.pyx":1196 * for indx, curset in data.missing_user_values.items(): * cur_col = data.col_names[indx] * metadata.missing_user_values[cur_col] = sorted(list(curset)) # <<<<<<<<<<<<<< * * metadata.notes = data.notes */ - __pyx_t_8 = PySequence_List(__pyx_v_curset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_v_curset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely((PyList_Sort(__pyx_t_2) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_user_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely((PyList_Sort(__pyx_t_2) < 0))) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_user_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_v_cur_col, __pyx_t_2) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_v_cur_col, __pyx_t_2) < 0))) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":1176 + /* "pyreadstat/_readstat_parser.pyx":1194 * raise PyreadstatError("Unkown data type") * * for indx, curset in data.missing_user_values.items(): # <<<<<<<<<<<<<< @@ -16143,7 +16584,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1180 + /* "pyreadstat/_readstat_parser.pyx":1198 * metadata.missing_user_values[cur_col] = sorted(list(curset)) * * metadata.notes = data.notes # <<<<<<<<<<<<<< @@ -16152,10 +16593,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->notes; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_notes, __pyx_t_4) < (0)) __PYX_ERR(0, 1180, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_notes, __pyx_t_4) < (0)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1181 + /* "pyreadstat/_readstat_parser.pyx":1199 * * metadata.notes = data.notes * metadata.column_names = data.col_names # <<<<<<<<<<<<<< @@ -16164,10 +16605,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->col_names; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_4) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_4) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1182 + /* "pyreadstat/_readstat_parser.pyx":1200 * metadata.notes = data.notes * metadata.column_names = data.col_names * metadata.column_labels = data.col_labels # <<<<<<<<<<<<<< @@ -16176,10 +16617,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->col_labels; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1182, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1183 + /* "pyreadstat/_readstat_parser.pyx":1201 * metadata.column_names = data.col_names * metadata.column_labels = data.col_labels * metadata.column_names_to_labels = {k:v for k,v in zip(data.col_names, data.col_labels)} # <<<<<<<<<<<<<< @@ -16187,7 +16628,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ * metadata.file_label = data.file_label */ { /* enter inner scope */ - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_5 = 1; @@ -16195,7 +16636,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_data->col_names, __pyx_v_data->col_labels}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_2); } if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -16203,9 +16644,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L22_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -16214,7 +16655,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1201, __pyx_L22_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -16224,7 +16665,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1201, __pyx_L22_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -16235,13 +16676,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L22_error) } else { __pyx_t_2 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1201, __pyx_L22_error) PyErr_Clear(); } break; @@ -16254,7 +16695,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1183, __pyx_L22_error) + __PYX_ERR(0, 1201, __pyx_L22_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -16264,22 +16705,22 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1183, __pyx_L22_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1201, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); @@ -16287,7 +16728,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 1183, __pyx_L22_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 1201, __pyx_L22_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L26_unpacking_done; @@ -16295,14 +16736,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1183, __pyx_L22_error) + __PYX_ERR(0, 1201, __pyx_L22_error) __pyx_L26_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_9); __pyx_t_9 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 1183, __pyx_L22_error) + if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 1201, __pyx_L22_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; @@ -16314,10 +16755,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ goto __pyx_L1_error; __pyx_L28_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names_to_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1183, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_column_names_to_labels, __pyx_t_4) < (0)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1184 + /* "pyreadstat/_readstat_parser.pyx":1202 * metadata.column_labels = data.col_labels * metadata.column_names_to_labels = {k:v for k,v in zip(data.col_names, data.col_labels)} * metadata.file_encoding = data.file_encoding # <<<<<<<<<<<<<< @@ -16326,10 +16767,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->file_encoding; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_encoding, __pyx_t_4) < (0)) __PYX_ERR(0, 1184, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_encoding, __pyx_t_4) < (0)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1185 + /* "pyreadstat/_readstat_parser.pyx":1203 * metadata.column_names_to_labels = {k:v for k,v in zip(data.col_names, data.col_labels)} * metadata.file_encoding = data.file_encoding * metadata.file_label = data.file_label # <<<<<<<<<<<<<< @@ -16338,55 +16779,55 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->file_label; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_label, __pyx_t_4) < (0)) __PYX_ERR(0, 1185, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_file_label, __pyx_t_4) < (0)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1186 + /* "pyreadstat/_readstat_parser.pyx":1204 * metadata.file_encoding = data.file_encoding * metadata.file_label = data.file_label * metadata.variable_value_labels = variable_value_labels # <<<<<<<<<<<<<< * metadata.value_labels = labels_raw * metadata.variable_to_label = label_to_var_name */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_value_labels, __pyx_v_variable_value_labels) < (0)) __PYX_ERR(0, 1186, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_value_labels, __pyx_v_variable_value_labels) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1187 + /* "pyreadstat/_readstat_parser.pyx":1205 * metadata.file_label = data.file_label * metadata.variable_value_labels = variable_value_labels * metadata.value_labels = labels_raw # <<<<<<<<<<<<<< * metadata.variable_to_label = label_to_var_name * metadata.original_variable_types = original_types */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_value_labels, __pyx_v_labels_raw) < (0)) __PYX_ERR(0, 1187, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_value_labels, __pyx_v_labels_raw) < (0)) __PYX_ERR(0, 1205, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1188 + /* "pyreadstat/_readstat_parser.pyx":1206 * metadata.variable_value_labels = variable_value_labels * metadata.value_labels = labels_raw * metadata.variable_to_label = label_to_var_name # <<<<<<<<<<<<<< * metadata.original_variable_types = original_types * metadata.readstat_variable_types = readstat_types */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_to_label, __pyx_v_label_to_var_name) < (0)) __PYX_ERR(0, 1188, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_to_label, __pyx_v_label_to_var_name) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1189 + /* "pyreadstat/_readstat_parser.pyx":1207 * metadata.value_labels = labels_raw * metadata.variable_to_label = label_to_var_name * metadata.original_variable_types = original_types # <<<<<<<<<<<<<< * metadata.readstat_variable_types = readstat_types * metadata.table_name = data.table_name */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_original_variable_types, __pyx_v_original_types) < (0)) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_original_variable_types, __pyx_v_original_types) < (0)) __PYX_ERR(0, 1207, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1190 + /* "pyreadstat/_readstat_parser.pyx":1208 * metadata.variable_to_label = label_to_var_name * metadata.original_variable_types = original_types * metadata.readstat_variable_types = readstat_types # <<<<<<<<<<<<<< * metadata.table_name = data.table_name * metadata.missing_ranges = data.missing_ranges */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_readstat_variable_types, __pyx_v_readstat_types) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_readstat_variable_types, __pyx_v_readstat_types) < (0)) __PYX_ERR(0, 1208, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1191 + /* "pyreadstat/_readstat_parser.pyx":1209 * metadata.original_variable_types = original_types * metadata.readstat_variable_types = readstat_types * metadata.table_name = data.table_name # <<<<<<<<<<<<<< @@ -16395,10 +16836,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->table_name; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_table_name, __pyx_t_4) < (0)) __PYX_ERR(0, 1191, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_table_name, __pyx_t_4) < (0)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1192 + /* "pyreadstat/_readstat_parser.pyx":1210 * metadata.readstat_variable_types = readstat_types * metadata.table_name = data.table_name * metadata.missing_ranges = data.missing_ranges # <<<<<<<<<<<<<< @@ -16407,10 +16848,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->missing_ranges; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_ranges, __pyx_t_4) < (0)) __PYX_ERR(0, 1192, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_missing_ranges, __pyx_t_4) < (0)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1193 + /* "pyreadstat/_readstat_parser.pyx":1211 * metadata.table_name = data.table_name * metadata.missing_ranges = data.missing_ranges * metadata.variable_storage_width = data.variable_storage_width # <<<<<<<<<<<<<< @@ -16419,10 +16860,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_storage_width; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_storage_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1193, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_storage_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1194 + /* "pyreadstat/_readstat_parser.pyx":1212 * metadata.missing_ranges = data.missing_ranges * metadata.variable_storage_width = data.variable_storage_width * metadata.variable_display_width = data.variable_display_width # <<<<<<<<<<<<<< @@ -16431,10 +16872,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_display_width; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_display_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1194, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_display_width, __pyx_t_4) < (0)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1195 + /* "pyreadstat/_readstat_parser.pyx":1213 * metadata.variable_storage_width = data.variable_storage_width * metadata.variable_display_width = data.variable_display_width * metadata.variable_alignment = data.variable_alignment # <<<<<<<<<<<<<< @@ -16443,10 +16884,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_alignment; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_alignment, __pyx_t_4) < (0)) __PYX_ERR(0, 1195, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_alignment, __pyx_t_4) < (0)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1196 + /* "pyreadstat/_readstat_parser.pyx":1214 * metadata.variable_display_width = data.variable_display_width * metadata.variable_alignment = data.variable_alignment * metadata.variable_measure = data.variable_measure # <<<<<<<<<<<<<< @@ -16455,24 +16896,24 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ */ __pyx_t_4 = __pyx_v_data->variable_measure; __Pyx_INCREF(__pyx_t_4); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_measure, __pyx_t_4) < (0)) __PYX_ERR(0, 1196, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_variable_measure, __pyx_t_4) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1197 + /* "pyreadstat/_readstat_parser.pyx":1215 * metadata.variable_alignment = data.variable_alignment * metadata.variable_measure = data.variable_measure * metadata.creation_time = datetime.datetime.fromtimestamp(data.ctime) # <<<<<<<<<<<<<< * metadata.modification_time = datetime.datetime.fromtimestamp(data.mtime) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->ctime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->ctime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { @@ -16481,27 +16922,27 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_creation_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_creation_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1198 + /* "pyreadstat/_readstat_parser.pyx":1216 * metadata.variable_measure = data.variable_measure * metadata.creation_time = datetime.datetime.fromtimestamp(data.ctime) * metadata.modification_time = datetime.datetime.fromtimestamp(data.mtime) # <<<<<<<<<<<<<< * * return metadata */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->mtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_data->mtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { @@ -16510,13 +16951,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_modification_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_metadata, __pyx_mstate_global->__pyx_n_u_modification_time, __pyx_t_4) < (0)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":1200 + /* "pyreadstat/_readstat_parser.pyx":1218 * metadata.modification_time = datetime.datetime.fromtimestamp(data.mtime) * * return metadata # <<<<<<<<<<<<<< @@ -16528,7 +16969,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ __pyx_r = __pyx_v_metadata; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":1110 + /* "pyreadstat/_readstat_parser.pyx":1128 * return data_frame * * cdef object data_container_extract_metadata(data_container data): # <<<<<<<<<<<<<< @@ -16567,7 +17008,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_ return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":1203 +/* "pyreadstat/_readstat_parser.pyx":1221 * * * cdef object run_conversion(object filename_path, py_file_format file_format, py_file_extension file_extension, # <<<<<<<<<<<<<< @@ -16589,6 +17030,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject CYTHON_UNUSED void *__pyx_v_ctx; PyObject *__pyx_v_unix_to_origin_secs = NULL; PyObject *__pyx_v_metadata = NULL; + PyObject *__pyx_v_edf = NULL; + PyObject *__pyx_v_edtf = NULL; + PyObject *__pyx_v_etf = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -16609,17 +17053,18 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; - int __pyx_t_19; - char *__pyx_t_20; - double __pyx_t_21; - struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser __pyx_t_22; + Py_ssize_t __pyx_t_19; + int __pyx_t_20; + char *__pyx_t_21; + double __pyx_t_22; + struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser __pyx_t_23; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run_conversion", 0); __Pyx_INCREF(__pyx_v_output_format); - /* "pyreadstat/_readstat_parser.pyx":1222 + /* "pyreadstat/_readstat_parser.pyx":1240 * cdef object data_dict * cdef object data_frame * cdef object file_obj = None # <<<<<<<<<<<<<< @@ -16629,25 +17074,25 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(Py_None); __pyx_v_file_obj = Py_None; - /* "pyreadstat/_readstat_parser.pyx":1225 + /* "pyreadstat/_readstat_parser.pyx":1243 * * # Check if filename_path is a file-like object * if hasattr(filename_path, 'read') and hasattr(filename_path, 'seek'): # <<<<<<<<<<<<<< * file_obj = filename_path * filename_bytes = b"" # Empty path - will be ignored when file_obj is used */ - __pyx_t_2 = __Pyx_HasAttr(__pyx_v_filename_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_filename_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1243, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = __Pyx_HasAttr(__pyx_v_filename_path, __pyx_mstate_global->__pyx_n_u_seek); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_filename_path, __pyx_mstate_global->__pyx_n_u_seek); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1243, __pyx_L1_error) __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1226 + /* "pyreadstat/_readstat_parser.pyx":1244 * # Check if filename_path is a file-like object * if hasattr(filename_path, 'read') and hasattr(filename_path, 'seek'): * file_obj = filename_path # <<<<<<<<<<<<<< @@ -16657,7 +17102,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_filename_path); __Pyx_DECREF_SET(__pyx_v_file_obj, __pyx_v_filename_path); - /* "pyreadstat/_readstat_parser.pyx":1227 + /* "pyreadstat/_readstat_parser.pyx":1245 * if hasattr(filename_path, 'read') and hasattr(filename_path, 'seek'): * file_obj = filename_path * filename_bytes = b"" # Empty path - will be ignored when file_obj is used # <<<<<<<<<<<<<< @@ -16667,7 +17112,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_); __pyx_v_filename_bytes = __pyx_mstate_global->__pyx_kp_b_; - /* "pyreadstat/_readstat_parser.pyx":1225 + /* "pyreadstat/_readstat_parser.pyx":1243 * * # Check if filename_path is a file-like object * if hasattr(filename_path, 'read') and hasattr(filename_path, 'seek'): # <<<<<<<<<<<<<< @@ -16677,20 +17122,20 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1228 + /* "pyreadstat/_readstat_parser.pyx":1246 * file_obj = filename_path * filename_bytes = b"" # Empty path - will be ignored when file_obj is used * elif hasattr(os, 'fsencode'): # <<<<<<<<<<<<<< * try: * filename_bytes = os.fsencode(filename_path) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_HasAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_fsencode); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_fsencode); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1229 + /* "pyreadstat/_readstat_parser.pyx":1247 * filename_bytes = b"" # Empty path - will be ignored when file_obj is used * elif hasattr(os, 'fsencode'): * try: # <<<<<<<<<<<<<< @@ -16706,7 +17151,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "pyreadstat/_readstat_parser.pyx":1230 + /* "pyreadstat/_readstat_parser.pyx":1248 * elif hasattr(os, 'fsencode'): * try: * filename_bytes = os.fsencode(filename_path) # <<<<<<<<<<<<<< @@ -16714,9 +17159,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1230, __pyx_L6_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1248, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fsencode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1230, __pyx_L6_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fsencode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1248, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = 1; @@ -16736,14 +17181,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L6_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); } - if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 1230, __pyx_L6_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 1248, __pyx_L6_error) __pyx_v_filename_bytes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1229 + /* "pyreadstat/_readstat_parser.pyx":1247 * filename_bytes = b"" # Empty path - will be ignored when file_obj is used * elif hasattr(os, 'fsencode'): * try: # <<<<<<<<<<<<<< @@ -16761,7 +17206,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pyreadstat/_readstat_parser.pyx":1231 + /* "pyreadstat/_readstat_parser.pyx":1249 * try: * filename_bytes = os.fsencode(filename_path) * except UnicodeError: # <<<<<<<<<<<<<< @@ -16771,12 +17216,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_UnicodeError)))); if (__pyx_t_11) { __Pyx_AddTraceback("pyreadstat._readstat_parser.run_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 1231, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 1249, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); - /* "pyreadstat/_readstat_parser.pyx":1232 + /* "pyreadstat/_readstat_parser.pyx":1250 * filename_bytes = os.fsencode(filename_path) * except UnicodeError: * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) # <<<<<<<<<<<<<< @@ -16784,15 +17229,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * else: */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_15 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_getfilesystemencoding); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_getfilesystemencoding); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_10 = 1; @@ -16812,10 +17257,10 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_13); } - __pyx_t_17 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_file_path_could_not_be_encoded_w, __pyx_t_13); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + __pyx_t_17 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_file_path_could_not_be_encoded_w, __pyx_t_13); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_10 = 1; @@ -16836,12 +17281,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1232, __pyx_L8_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1250, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pyreadstat/_readstat_parser.pyx":1233 + /* "pyreadstat/_readstat_parser.pyx":1251 * except UnicodeError: * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") # <<<<<<<<<<<<<< @@ -16849,9 +17294,9 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * if type(filename_path) == str: */ __pyx_t_14 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1233, __pyx_L8_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_fsdecode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1233, __pyx_L8_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_fsdecode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_10 = 1; @@ -16871,16 +17316,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1233, __pyx_L8_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1233, __pyx_L8_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_encode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1233, __pyx_L8_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_8))) __PYX_ERR(0, 1233, __pyx_L8_except_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_8))) __PYX_ERR(0, 1251, __pyx_L8_except_error) __Pyx_XDECREF_SET(__pyx_v_filename_bytes, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16890,7 +17335,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject } goto __pyx_L8_except_error; - /* "pyreadstat/_readstat_parser.pyx":1229 + /* "pyreadstat/_readstat_parser.pyx":1247 * filename_bytes = b"" # Empty path - will be ignored when file_obj is used * elif hasattr(os, 'fsencode'): * try: # <<<<<<<<<<<<<< @@ -16911,7 +17356,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_L11_try_end:; } - /* "pyreadstat/_readstat_parser.pyx":1228 + /* "pyreadstat/_readstat_parser.pyx":1246 * file_obj = filename_path * filename_bytes = b"" # Empty path - will be ignored when file_obj is used * elif hasattr(os, 'fsencode'): # <<<<<<<<<<<<<< @@ -16921,7 +17366,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1235 + /* "pyreadstat/_readstat_parser.pyx":1253 * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") * else: * if type(filename_path) == str: # <<<<<<<<<<<<<< @@ -16929,12 +17374,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * elif type(filename_path) == bytes: */ /*else*/ { - __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_filename_path)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1235, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_filename_path)), ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1236 + /* "pyreadstat/_readstat_parser.pyx":1254 * else: * if type(filename_path) == str: * filename_bytes = filename_path.encode('utf-8') # <<<<<<<<<<<<<< @@ -16948,14 +17393,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1236, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1254, __pyx_L1_error) __pyx_v_filename_bytes = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1235 + /* "pyreadstat/_readstat_parser.pyx":1253 * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") * else: * if type(filename_path) == str: # <<<<<<<<<<<<<< @@ -16965,19 +17410,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject goto __pyx_L14; } - /* "pyreadstat/_readstat_parser.pyx":1237 + /* "pyreadstat/_readstat_parser.pyx":1255 * if type(filename_path) == str: * filename_bytes = filename_path.encode('utf-8') * elif type(filename_path) == bytes: # <<<<<<<<<<<<<< * filename_bytes = filename_path * else: */ - __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_filename_path)), ((PyObject *)(&PyBytes_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1237, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1237, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_filename_path)), ((PyObject *)(&PyBytes_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (likely(__pyx_t_1)) { - /* "pyreadstat/_readstat_parser.pyx":1238 + /* "pyreadstat/_readstat_parser.pyx":1256 * filename_bytes = filename_path.encode('utf-8') * elif type(filename_path) == bytes: * filename_bytes = filename_path # <<<<<<<<<<<<<< @@ -16986,11 +17431,11 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_t_7 = __pyx_v_filename_path; __Pyx_INCREF(__pyx_t_7); - if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1238, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1256, __pyx_L1_error) __pyx_v_filename_bytes = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1237 + /* "pyreadstat/_readstat_parser.pyx":1255 * if type(filename_path) == str: * filename_bytes = filename_path.encode('utf-8') * elif type(filename_path) == bytes: # <<<<<<<<<<<<<< @@ -17000,7 +17445,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject goto __pyx_L14; } - /* "pyreadstat/_readstat_parser.pyx":1240 + /* "pyreadstat/_readstat_parser.pyx":1258 * filename_bytes = filename_path * else: * raise PyreadstatError("path must be either str or bytes") # <<<<<<<<<<<<<< @@ -17009,7 +17454,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ /*else*/ { __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17028,16 +17473,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1240, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1240, __pyx_L1_error) + __PYX_ERR(0, 1258, __pyx_L1_error) } __pyx_L14:; - /* "pyreadstat/_readstat_parser.pyx":1241 + /* "pyreadstat/_readstat_parser.pyx":1259 * else: * raise PyreadstatError("path must be either str or bytes") * if type(filename_path) not in (str, bytes, unicode): # <<<<<<<<<<<<<< @@ -17046,24 +17491,24 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_filename_path))); __pyx_t_7 = ((PyObject *)Py_TYPE(__pyx_v_filename_path)); - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyBytes_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyBytes_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_7), ((PyObject *)(&PyUnicode_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L16_bool_binop_done:; @@ -17071,7 +17516,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_2 = __pyx_t_1; if (unlikely(__pyx_t_2)) { - /* "pyreadstat/_readstat_parser.pyx":1242 + /* "pyreadstat/_readstat_parser.pyx":1260 * raise PyreadstatError("path must be either str or bytes") * if type(filename_path) not in (str, bytes, unicode): * raise PyreadstatError("path must be str, bytes or unicode") # <<<<<<<<<<<<<< @@ -17079,7 +17524,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1242, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17098,14 +17543,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1242, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1242, __pyx_L1_error) + __PYX_ERR(0, 1260, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1241 + /* "pyreadstat/_readstat_parser.pyx":1259 * else: * raise PyreadstatError("path must be either str or bytes") * if type(filename_path) not in (str, bytes, unicode): # <<<<<<<<<<<<<< @@ -17114,7 +17559,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1243 + /* "pyreadstat/_readstat_parser.pyx":1261 * if type(filename_path) not in (str, bytes, unicode): * raise PyreadstatError("path must be str, bytes or unicode") * filename_bytes = filename_path.encode('utf-8') # <<<<<<<<<<<<<< @@ -17128,16 +17573,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1243, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1243, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_filename_bytes, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":1246 + /* "pyreadstat/_readstat_parser.pyx":1264 * * # Only check file existence for path-based reads * if file_obj is None: # <<<<<<<<<<<<<< @@ -17147,16 +17592,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_2 = (__pyx_v_file_obj == Py_None); if (__pyx_t_2) { - /* "pyreadstat/_readstat_parser.pyx":1247 + /* "pyreadstat/_readstat_parser.pyx":1265 * # Only check file existence for path-based reads * if file_obj is None: * filename_bytes = os.path.expanduser(filename_bytes) # <<<<<<<<<<<<<< * if not os.path.isfile(filename_bytes): * raise PyreadstatError("File {0} does not exist!".format(filename_path)) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1247, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_8; @@ -17167,23 +17612,23 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_expanduser, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1247, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_7))) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_filename_bytes, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1248 + /* "pyreadstat/_readstat_parser.pyx":1266 * if file_obj is None: * filename_bytes = os.path.expanduser(filename_bytes) * if not os.path.isfile(filename_bytes): # <<<<<<<<<<<<<< * raise PyreadstatError("File {0} does not exist!".format(filename_path)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1248, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __pyx_t_3; @@ -17194,15 +17639,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isfile, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1248, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = (!__pyx_t_2); if (unlikely(__pyx_t_1)) { - /* "pyreadstat/_readstat_parser.pyx":1249 + /* "pyreadstat/_readstat_parser.pyx":1267 * filename_bytes = os.path.expanduser(filename_bytes) * if not os.path.isfile(filename_bytes): * raise PyreadstatError("File {0} does not exist!".format(filename_path)) # <<<<<<<<<<<<<< @@ -17210,7 +17655,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * if output_format is None: */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1249, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __pyx_mstate_global->__pyx_kp_u_File_0_does_not_exist; __Pyx_INCREF(__pyx_t_12); @@ -17219,7 +17664,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_filename_path}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1249, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_10 = 1; @@ -17240,14 +17685,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1249, __pyx_L1_error) + __PYX_ERR(0, 1267, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1248 + /* "pyreadstat/_readstat_parser.pyx":1266 * if file_obj is None: * filename_bytes = os.path.expanduser(filename_bytes) * if not os.path.isfile(filename_bytes): # <<<<<<<<<<<<<< @@ -17256,7 +17701,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1246 + /* "pyreadstat/_readstat_parser.pyx":1264 * * # Only check file existence for path-based reads * if file_obj is None: # <<<<<<<<<<<<<< @@ -17265,7 +17710,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1251 + /* "pyreadstat/_readstat_parser.pyx":1269 * raise PyreadstatError("File {0} does not exist!".format(filename_path)) * * if output_format is None: # <<<<<<<<<<<<<< @@ -17275,7 +17720,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_1 = (__pyx_v_output_format == ((PyObject*)Py_None)); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1252 + /* "pyreadstat/_readstat_parser.pyx":1270 * * if output_format is None: * output_format = 'pandas' # <<<<<<<<<<<<<< @@ -17285,7 +17730,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_pandas); __Pyx_DECREF_SET(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas); - /* "pyreadstat/_readstat_parser.pyx":1251 + /* "pyreadstat/_readstat_parser.pyx":1269 * raise PyreadstatError("File {0} does not exist!".format(filename_path)) * * if output_format is None: # <<<<<<<<<<<<<< @@ -17294,32 +17739,32 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1253 + /* "pyreadstat/_readstat_parser.pyx":1271 * if output_format is None: * output_format = 'pandas' * allowed_formats = {'pandas', 'dict', 'polars'} # <<<<<<<<<<<<<< * if output_format not in allowed_formats: * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) */ - __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_7 = PySet_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pandas) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) - if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_polars) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_pandas) < (0)) __PYX_ERR(0, 1271, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1271, __pyx_L1_error) + if (PySet_Add(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_polars) < (0)) __PYX_ERR(0, 1271, __pyx_L1_error) __pyx_v_allowed_formats = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1254 + /* "pyreadstat/_readstat_parser.pyx":1272 * output_format = 'pandas' * allowed_formats = {'pandas', 'dict', 'polars'} * if output_format not in allowed_formats: # <<<<<<<<<<<<<< * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": */ - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_output_format, __pyx_v_allowed_formats, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_output_format, __pyx_v_allowed_formats, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1272, __pyx_L1_error) if (unlikely(__pyx_t_1)) { - /* "pyreadstat/_readstat_parser.pyx":1255 + /* "pyreadstat/_readstat_parser.pyx":1273 * allowed_formats = {'pandas', 'dict', 'polars'} * if output_format not in allowed_formats: * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) # <<<<<<<<<<<<<< @@ -17327,21 +17772,21 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * try: */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __pyx_mstate_global->__pyx_kp_u_output_format_must_be_one_of_all; __Pyx_INCREF(__pyx_t_12); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, NULL}; - __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_allowed_formats, __pyx_v_allowed_formats, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_format, __pyx_v_output_format, __pyx_t_14, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_allowed_formats, __pyx_v_allowed_formats, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1273, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_output_format, __pyx_v_output_format, __pyx_t_14, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1273, __pyx_L1_error) __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_10 = 1; @@ -17362,14 +17807,14 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1255, __pyx_L1_error) + __PYX_ERR(0, 1273, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1254 + /* "pyreadstat/_readstat_parser.pyx":1272 * output_format = 'pandas' * allowed_formats = {'pandas', 'dict', 'polars'} * if output_format not in allowed_formats: # <<<<<<<<<<<<<< @@ -17378,17 +17823,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1256 + /* "pyreadstat/_readstat_parser.pyx":1274 * if output_format not in allowed_formats: * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": # <<<<<<<<<<<<<< * try: * import pandas */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_pandas, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1274, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1257 + /* "pyreadstat/_readstat_parser.pyx":1275 * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": * try: # <<<<<<<<<<<<<< @@ -17404,20 +17849,20 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "pyreadstat/_readstat_parser.pyx":1258 + /* "pyreadstat/_readstat_parser.pyx":1276 * if output_format == "pandas": * try: * import pandas # <<<<<<<<<<<<<< * except: * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") */ - __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pandas, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1258, __pyx_L24_error) + __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pandas, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1276, __pyx_L24_error) __pyx_t_7 = __pyx_t_18; __Pyx_GOTREF(__pyx_t_7); __pyx_v_pandas = __pyx_t_7; __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1257 + /* "pyreadstat/_readstat_parser.pyx":1275 * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": * try: # <<<<<<<<<<<<<< @@ -17441,7 +17886,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pyreadstat/_readstat_parser.pyx":1259 + /* "pyreadstat/_readstat_parser.pyx":1277 * try: * import pandas * except: # <<<<<<<<<<<<<< @@ -17450,12 +17895,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ /*except:*/ { __Pyx_AddTraceback("pyreadstat._readstat_parser.run_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1259, __pyx_L26_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1277, __pyx_L26_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_3); - /* "pyreadstat/_readstat_parser.pyx":1260 + /* "pyreadstat/_readstat_parser.pyx":1278 * import pandas * except: * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") # <<<<<<<<<<<<<< @@ -17463,7 +17908,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * try: */ __pyx_t_14 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1260, __pyx_L26_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1278, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17482,15 +17927,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L26_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1278, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 1260, __pyx_L26_except_error) + __PYX_ERR(0, 1278, __pyx_L26_except_error) } - /* "pyreadstat/_readstat_parser.pyx":1257 + /* "pyreadstat/_readstat_parser.pyx":1275 * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": * try: # <<<<<<<<<<<<<< @@ -17506,7 +17951,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_L29_try_end:; } - /* "pyreadstat/_readstat_parser.pyx":1256 + /* "pyreadstat/_readstat_parser.pyx":1274 * if output_format not in allowed_formats: * raise PyreadstatError("output format must be one of {allowed_formats}, '{output_format}' was given".format(allowed_formats=allowed_formats, output_format=output_format)) * if output_format == "pandas": # <<<<<<<<<<<<<< @@ -17515,17 +17960,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1261 + /* "pyreadstat/_readstat_parser.pyx":1279 * except: * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") * if output_format == "polars": # <<<<<<<<<<<<<< * try: * import polars */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_polars, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1279, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1262 + /* "pyreadstat/_readstat_parser.pyx":1280 * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") * if output_format == "polars": * try: # <<<<<<<<<<<<<< @@ -17541,20 +17986,20 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "pyreadstat/_readstat_parser.pyx":1263 + /* "pyreadstat/_readstat_parser.pyx":1281 * if output_format == "polars": * try: * import polars # <<<<<<<<<<<<<< * except: * raise PyreadstatError("You requested polars as output_format but cannot import polars") */ - __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_polars, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_polars, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1263, __pyx_L33_error) + __pyx_t_18 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_polars, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_polars, -1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1281, __pyx_L33_error) __pyx_t_3 = __pyx_t_18; __Pyx_GOTREF(__pyx_t_3); __pyx_v_polars = __pyx_t_3; __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1262 + /* "pyreadstat/_readstat_parser.pyx":1280 * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") * if output_format == "polars": * try: # <<<<<<<<<<<<<< @@ -17578,7 +18023,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pyreadstat/_readstat_parser.pyx":1264 + /* "pyreadstat/_readstat_parser.pyx":1282 * try: * import polars * except: # <<<<<<<<<<<<<< @@ -17587,12 +18032,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ /*except:*/ { __Pyx_AddTraceback("pyreadstat._readstat_parser.run_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 1264, __pyx_L35_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 1282, __pyx_L35_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); - /* "pyreadstat/_readstat_parser.pyx":1265 + /* "pyreadstat/_readstat_parser.pyx":1283 * import polars * except: * raise PyreadstatError("You requested polars as output_format but cannot import polars") # <<<<<<<<<<<<<< @@ -17600,7 +18045,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1265, __pyx_L35_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1283, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17619,15 +18064,15 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1265, __pyx_L35_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1283, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 1265, __pyx_L35_except_error) + __PYX_ERR(0, 1283, __pyx_L35_except_error) } - /* "pyreadstat/_readstat_parser.pyx":1262 + /* "pyreadstat/_readstat_parser.pyx":1280 * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") * if output_format == "polars": * try: # <<<<<<<<<<<<<< @@ -17643,7 +18088,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_L38_try_end:; } - /* "pyreadstat/_readstat_parser.pyx":1261 + /* "pyreadstat/_readstat_parser.pyx":1279 * except: * raise PyreadstatError("You requested pandas as output_format but cannot import pandas") * if output_format == "polars": # <<<<<<<<<<<<<< @@ -17652,74 +18097,198 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1268 + /* "pyreadstat/_readstat_parser.pyx":1286 * * * if extra_date_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_date_formats.extend(extra_date_formats) + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) */ __pyx_t_1 = (__pyx_v_extra_date_formats != ((PyObject*)Py_None)); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1269 + /* "pyreadstat/_readstat_parser.pyx":1287 * * if extra_date_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_date_formats.extend(extra_date_formats) + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_SPSS: */ switch (__pyx_v_file_format) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS: - /* "pyreadstat/_readstat_parser.pyx":1270 + /* "pyreadstat/_readstat_parser.pyx":1288 * if extra_date_formats is not None: * if file_format == FILE_FORMAT_SAS: - * sas_date_formats.extend(extra_date_formats) # <<<<<<<<<<<<<< + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_SPSS: - * spss_date_formats.extend(extra_date_formats) + * spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1270, __pyx_L1_error) + __PYX_ERR(0, 1288, __pyx_L1_error) + } + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_date_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1288, __pyx_L1_error) + } + __pyx_t_9 = __pyx_v_extra_date_formats; __Pyx_INCREF(__pyx_t_9); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_edf, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_8 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_edf}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_edf}; + __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_8 = __pyx_t_14; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1270, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1269 + /* "pyreadstat/_readstat_parser.pyx":1287 * * if extra_date_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_date_formats.extend(extra_date_formats) + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_SPSS: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS: - /* "pyreadstat/_readstat_parser.pyx":1272 - * sas_date_formats.extend(extra_date_formats) + /* "pyreadstat/_readstat_parser.pyx":1290 + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_SPSS: - * spss_date_formats.extend(extra_date_formats) # <<<<<<<<<<<<<< + * spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_STATA: * stata_date_formats.extend(extra_date_formats) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1272, __pyx_L1_error) + __PYX_ERR(0, 1290, __pyx_L1_error) + } + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_date_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1290, __pyx_L1_error) + } + __pyx_t_9 = __pyx_v_extra_date_formats; __Pyx_INCREF(__pyx_t_9); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1290, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_edf, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_14 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_edf}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_edf}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_14 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1271 + /* "pyreadstat/_readstat_parser.pyx":1289 * if file_format == FILE_FORMAT_SAS: - * sas_date_formats.extend(extra_date_formats) + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< - * spss_date_formats.extend(extra_date_formats) + * spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_STATA: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA: - /* "pyreadstat/_readstat_parser.pyx":1274 - * spss_date_formats.extend(extra_date_formats) + /* "pyreadstat/_readstat_parser.pyx":1292 + * spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_STATA: * stata_date_formats.extend(extra_date_formats) # <<<<<<<<<<<<<< * else: @@ -17727,13 +18296,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1274, __pyx_L1_error) + __PYX_ERR(0, 1292, __pyx_L1_error) } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_extra_date_formats); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1292, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1273 + /* "pyreadstat/_readstat_parser.pyx":1291 * elif file_format == FILE_FORMAT_SPSS: - * spss_date_formats.extend(extra_date_formats) + * spss_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) * elif file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * stata_date_formats.extend(extra_date_formats) * else: @@ -17741,7 +18310,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; default: - /* "pyreadstat/_readstat_parser.pyx":1276 + /* "pyreadstat/_readstat_parser.pyx":1294 * stata_date_formats.extend(extra_date_formats) * else: * raise PyreadstatError("Unknown file format") # <<<<<<<<<<<<<< @@ -17749,7 +18318,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * if file_format == FILE_FORMAT_SAS: */ __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17768,92 +18337,216 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1276, __pyx_L1_error) + __PYX_ERR(0, 1294, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":1268 + /* "pyreadstat/_readstat_parser.pyx":1286 * * * if extra_date_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_date_formats.extend(extra_date_formats) + * sas_date_formats.extend([format_regex.match(edf).group(1) for edf in extra_date_formats if format_regex.match(edf)]) */ } - /* "pyreadstat/_readstat_parser.pyx":1277 + /* "pyreadstat/_readstat_parser.pyx":1295 * else: * raise PyreadstatError("Unknown file format") * if extra_datetime_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_datetime_formats.extend(extra_datetime_formats) + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) */ __pyx_t_1 = (__pyx_v_extra_datetime_formats != ((PyObject*)Py_None)); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1278 + /* "pyreadstat/_readstat_parser.pyx":1296 * raise PyreadstatError("Unknown file format") * if extra_datetime_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_datetime_formats.extend(extra_datetime_formats) + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_SPSS: */ switch (__pyx_v_file_format) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS: - /* "pyreadstat/_readstat_parser.pyx":1279 + /* "pyreadstat/_readstat_parser.pyx":1297 * if extra_datetime_formats is not None: * if file_format == FILE_FORMAT_SAS: - * sas_datetime_formats.extend(extra_datetime_formats) # <<<<<<<<<<<<<< + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_SPSS: - * spss_datetime_formats.extend(extra_datetime_formats) + * spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1279, __pyx_L1_error) + __PYX_ERR(0, 1297, __pyx_L1_error) + } + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_datetime_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1297, __pyx_L1_error) + } + __pyx_t_3 = __pyx_v_extra_datetime_formats; __Pyx_INCREF(__pyx_t_3); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1297, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_edtf, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_8 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_edtf}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_edtf}; + __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_8 = __pyx_t_14; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1278 + /* "pyreadstat/_readstat_parser.pyx":1296 * raise PyreadstatError("Unknown file format") * if extra_datetime_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_datetime_formats.extend(extra_datetime_formats) + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_SPSS: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS: - /* "pyreadstat/_readstat_parser.pyx":1281 - * sas_datetime_formats.extend(extra_datetime_formats) + /* "pyreadstat/_readstat_parser.pyx":1299 + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_SPSS: - * spss_datetime_formats.extend(extra_datetime_formats) # <<<<<<<<<<<<<< + * spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_STATA: * stata_datetime_formats.extend(extra_datetime_formats) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1281, __pyx_L1_error) + __PYX_ERR(0, 1299, __pyx_L1_error) } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_datetime_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1299, __pyx_L1_error) + } + __pyx_t_3 = __pyx_v_extra_datetime_formats; __Pyx_INCREF(__pyx_t_3); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1299, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_edtf, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_14 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_edtf}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_edtf}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_14 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1299, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1280 + /* "pyreadstat/_readstat_parser.pyx":1298 * if file_format == FILE_FORMAT_SAS: - * sas_datetime_formats.extend(extra_datetime_formats) + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< - * spss_datetime_formats.extend(extra_datetime_formats) + * spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_STATA: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA: - /* "pyreadstat/_readstat_parser.pyx":1283 - * spss_datetime_formats.extend(extra_datetime_formats) + /* "pyreadstat/_readstat_parser.pyx":1301 + * spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_STATA: * stata_datetime_formats.extend(extra_datetime_formats) # <<<<<<<<<<<<<< * else: @@ -17861,13 +18554,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1283, __pyx_L1_error) + __PYX_ERR(0, 1301, __pyx_L1_error) } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, __pyx_v_extra_datetime_formats); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1301, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1282 + /* "pyreadstat/_readstat_parser.pyx":1300 * elif file_format == FILE_FORMAT_SPSS: - * spss_datetime_formats.extend(extra_datetime_formats) + * spss_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) * elif file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * stata_datetime_formats.extend(extra_datetime_formats) * else: @@ -17875,7 +18568,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; default: - /* "pyreadstat/_readstat_parser.pyx":1285 + /* "pyreadstat/_readstat_parser.pyx":1303 * stata_datetime_formats.extend(extra_datetime_formats) * else: * raise PyreadstatError("Unknown file format") # <<<<<<<<<<<<<< @@ -17883,7 +18576,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * if file_format == FILE_FORMAT_SAS: */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -17902,92 +18595,216 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1285, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1285, __pyx_L1_error) + __PYX_ERR(0, 1303, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":1277 + /* "pyreadstat/_readstat_parser.pyx":1295 * else: * raise PyreadstatError("Unknown file format") * if extra_datetime_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_datetime_formats.extend(extra_datetime_formats) + * sas_datetime_formats.extend([format_regex.match(edtf).group(1) for edtf in extra_datetime_formats if format_regex.match(edtf)]) */ } - /* "pyreadstat/_readstat_parser.pyx":1286 + /* "pyreadstat/_readstat_parser.pyx":1304 * else: * raise PyreadstatError("Unknown file format") * if extra_time_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_time_formats.extend(extra_time_formats) + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) */ __pyx_t_1 = (__pyx_v_extra_time_formats != ((PyObject*)Py_None)); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1287 + /* "pyreadstat/_readstat_parser.pyx":1305 * raise PyreadstatError("Unknown file format") * if extra_time_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_time_formats.extend(extra_time_formats) + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_SPSS: */ switch (__pyx_v_file_format) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS: - /* "pyreadstat/_readstat_parser.pyx":1288 + /* "pyreadstat/_readstat_parser.pyx":1306 * if extra_time_formats is not None: * if file_format == FILE_FORMAT_SAS: - * sas_time_formats.extend(extra_time_formats) # <<<<<<<<<<<<<< + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_SPSS: - * spss_time_formats.extend(extra_time_formats) + * spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1288, __pyx_L1_error) + __PYX_ERR(0, 1306, __pyx_L1_error) + } + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_time_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1306, __pyx_L1_error) + } + __pyx_t_9 = __pyx_v_extra_time_formats; __Pyx_INCREF(__pyx_t_9); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1306, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_etf, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_8 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_etf}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_etf}; + __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + } + __pyx_t_8 = __pyx_t_14; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1287 + /* "pyreadstat/_readstat_parser.pyx":1305 * raise PyreadstatError("Unknown file format") * if extra_time_formats is not None: * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< - * sas_time_formats.extend(extra_time_formats) + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_SPSS: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS: - /* "pyreadstat/_readstat_parser.pyx":1290 - * sas_time_formats.extend(extra_time_formats) + /* "pyreadstat/_readstat_parser.pyx":1308 + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_SPSS: - * spss_time_formats.extend(extra_time_formats) # <<<<<<<<<<<<<< + * spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) # <<<<<<<<<<<<<< * elif file_format == FILE_FORMAT_STATA: * stata_time_formats.extend(extra_time_formats) */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1290, __pyx_L1_error) + __PYX_ERR(0, 1308, __pyx_L1_error) + } + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_extra_time_formats == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1308, __pyx_L1_error) + } + __pyx_t_9 = __pyx_v_extra_time_formats; __Pyx_INCREF(__pyx_t_9); + __pyx_t_19 = 0; + for (;;) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1308, __pyx_L1_error) + #endif + if (__pyx_t_19 >= __pyx_temp) break; + } + __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_19, __Pyx_ReferenceSharing_OwnStrongReference); + ++__pyx_t_19; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_etf, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_14 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_etf}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_1) { + __pyx_t_12 = __pyx_v_10pyreadstat_16_readstat_parser_format_regex; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_etf}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_14 = __pyx_t_8; + __Pyx_INCREF(__pyx_t_14); + __pyx_t_10 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, __pyx_t_7); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1289 + /* "pyreadstat/_readstat_parser.pyx":1307 * if file_format == FILE_FORMAT_SAS: - * sas_time_formats.extend(extra_time_formats) + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< - * spss_time_formats.extend(extra_time_formats) + * spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_STATA: */ break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA: - /* "pyreadstat/_readstat_parser.pyx":1292 - * spss_time_formats.extend(extra_time_formats) + /* "pyreadstat/_readstat_parser.pyx":1310 + * spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_STATA: * stata_time_formats.extend(extra_time_formats) # <<<<<<<<<<<<<< * else: @@ -17995,13 +18812,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ if (unlikely(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); - __PYX_ERR(0, 1292, __pyx_L1_error) + __PYX_ERR(0, 1310, __pyx_L1_error) } - __pyx_t_19 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Extend(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, __pyx_v_extra_time_formats); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1310, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1291 + /* "pyreadstat/_readstat_parser.pyx":1309 * elif file_format == FILE_FORMAT_SPSS: - * spss_time_formats.extend(extra_time_formats) + * spss_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) * elif file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< * stata_time_formats.extend(extra_time_formats) * else: @@ -18009,7 +18826,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; default: - /* "pyreadstat/_readstat_parser.pyx":1294 + /* "pyreadstat/_readstat_parser.pyx":1312 * stata_time_formats.extend(extra_time_formats) * else: * raise PyreadstatError("Unknown file format") # <<<<<<<<<<<<<< @@ -18017,7 +18834,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats */ __pyx_t_9 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -18036,34 +18853,34 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 1294, __pyx_L1_error) + __PYX_ERR(0, 1312, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":1286 + /* "pyreadstat/_readstat_parser.pyx":1304 * else: * raise PyreadstatError("Unknown file format") * if extra_time_formats is not None: # <<<<<<<<<<<<<< * if file_format == FILE_FORMAT_SAS: - * sas_time_formats.extend(extra_time_formats) + * sas_time_formats.extend([format_regex.match(etf).group(1) for etf in extra_time_formats if format_regex.match(etf)]) */ } - /* "pyreadstat/_readstat_parser.pyx":1296 + /* "pyreadstat/_readstat_parser.pyx":1314 * raise PyreadstatError("Unknown file format") * global sas_all_formats, spss_all_formats, stata_all_formats * sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats # <<<<<<<<<<<<<< * stata_all_formats = stata_date_formats + stata_datetime_formats + stata_time_formats * spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats */ - __pyx_t_7 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_all_formats); @@ -18071,16 +18888,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1297 + /* "pyreadstat/_readstat_parser.pyx":1315 * global sas_all_formats, spss_all_formats, stata_all_formats * sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats * stata_all_formats = stata_date_formats + stata_datetime_formats + stata_time_formats # <<<<<<<<<<<<<< * spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats * */ - __pyx_t_3 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats); @@ -18088,16 +18905,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":1298 + /* "pyreadstat/_readstat_parser.pyx":1316 * sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats * stata_all_formats = stata_date_formats + stata_datetime_formats + stata_time_formats * spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats # <<<<<<<<<<<<<< * * filename = filename_bytes */ - __pyx_t_7 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, __pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_all_formats); @@ -18105,7 +18922,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1300 + /* "pyreadstat/_readstat_parser.pyx":1318 * spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats * * filename = filename_bytes # <<<<<<<<<<<<<< @@ -18114,12 +18931,12 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ if (unlikely(__pyx_v_filename_bytes == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 1300, __pyx_L1_error) + __PYX_ERR(0, 1318, __pyx_L1_error) } - __pyx_t_20 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename_bytes); if (unlikely((!__pyx_t_20) && PyErr_Occurred())) __PYX_ERR(0, 1300, __pyx_L1_error) - __pyx_v_filename = ((char *)__pyx_t_20); + __pyx_t_21 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename_bytes); if (unlikely((!__pyx_t_21) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_v_filename = ((char *)__pyx_t_21); - /* "pyreadstat/_readstat_parser.pyx":1302 + /* "pyreadstat/_readstat_parser.pyx":1320 * filename = filename_bytes * * data = data_container() # <<<<<<<<<<<<<< @@ -18132,13 +18949,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_3); } __pyx_v_data = ((struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)__pyx_t_3); __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1303 + /* "pyreadstat/_readstat_parser.pyx":1321 * * data = data_container() * ctx = data # <<<<<<<<<<<<<< @@ -18147,7 +18964,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_ctx = ((void *)__pyx_v_data); - /* "pyreadstat/_readstat_parser.pyx":1305 + /* "pyreadstat/_readstat_parser.pyx":1323 * ctx = data * * data.file_format = file_format # <<<<<<<<<<<<<< @@ -18156,7 +18973,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->file_format = __pyx_v_file_format; - /* "pyreadstat/_readstat_parser.pyx":1306 + /* "pyreadstat/_readstat_parser.pyx":1324 * * data.file_format = file_format * data.metaonly = metaonly # <<<<<<<<<<<<<< @@ -18165,7 +18982,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->metaonly = __pyx_v_metaonly; - /* "pyreadstat/_readstat_parser.pyx":1307 + /* "pyreadstat/_readstat_parser.pyx":1325 * data.file_format = file_format * data.metaonly = metaonly * data.dates_as_pandas = dates_as_pandas # <<<<<<<<<<<<<< @@ -18174,7 +18991,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->dates_as_pandas = __pyx_v_dates_as_pandas; - /* "pyreadstat/_readstat_parser.pyx":1308 + /* "pyreadstat/_readstat_parser.pyx":1326 * data.metaonly = metaonly * data.dates_as_pandas = dates_as_pandas * data.output_format = output_format # <<<<<<<<<<<<<< @@ -18187,7 +19004,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_DECREF(__pyx_v_data->output_format); __pyx_v_data->output_format = __pyx_v_output_format; - /* "pyreadstat/_readstat_parser.pyx":1310 + /* "pyreadstat/_readstat_parser.pyx":1328 * data.output_format = output_format * * if encoding: # <<<<<<<<<<<<<< @@ -18198,13 +19015,13 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject else { Py_ssize_t __pyx_temp = __Pyx_PyUnicode_IS_TRUE(__pyx_v_encoding); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1328, __pyx_L1_error) __pyx_t_1 = (__pyx_temp != 0); } if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1311 + /* "pyreadstat/_readstat_parser.pyx":1329 * * if encoding: * data.user_encoding = encoding # <<<<<<<<<<<<<< @@ -18217,7 +19034,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_DECREF(__pyx_v_data->user_encoding); __pyx_v_data->user_encoding = __pyx_v_encoding; - /* "pyreadstat/_readstat_parser.pyx":1310 + /* "pyreadstat/_readstat_parser.pyx":1328 * data.output_format = output_format * * if encoding: # <<<<<<<<<<<<<< @@ -18226,7 +19043,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1313 + /* "pyreadstat/_readstat_parser.pyx":1331 * data.user_encoding = encoding * * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< @@ -18236,7 +19053,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject switch (__pyx_v_file_format) { case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS: - /* "pyreadstat/_readstat_parser.pyx":1314 + /* "pyreadstat/_readstat_parser.pyx":1332 * * if file_format == FILE_FORMAT_SAS: * origin = sas_origin # <<<<<<<<<<<<<< @@ -18246,7 +19063,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_origin); __pyx_v_origin = __pyx_v_10pyreadstat_16_readstat_parser_sas_origin; - /* "pyreadstat/_readstat_parser.pyx":1315 + /* "pyreadstat/_readstat_parser.pyx":1333 * if file_format == FILE_FORMAT_SAS: * origin = sas_origin * unix_to_origin_secs = sas_secs_from_unix # <<<<<<<<<<<<<< @@ -18256,7 +19073,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix); __pyx_v_unix_to_origin_secs = __pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix; - /* "pyreadstat/_readstat_parser.pyx":1313 + /* "pyreadstat/_readstat_parser.pyx":1331 * data.user_encoding = encoding * * if file_format == FILE_FORMAT_SAS: # <<<<<<<<<<<<<< @@ -18266,7 +19083,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS: - /* "pyreadstat/_readstat_parser.pyx":1317 + /* "pyreadstat/_readstat_parser.pyx":1335 * unix_to_origin_secs = sas_secs_from_unix * elif file_format == FILE_FORMAT_SPSS: * origin = spss_origin # <<<<<<<<<<<<<< @@ -18276,7 +19093,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin); __pyx_v_origin = __pyx_v_10pyreadstat_16_readstat_parser_spss_origin; - /* "pyreadstat/_readstat_parser.pyx":1318 + /* "pyreadstat/_readstat_parser.pyx":1336 * elif file_format == FILE_FORMAT_SPSS: * origin = spss_origin * unix_to_origin_secs = spss_secs_from_unix # <<<<<<<<<<<<<< @@ -18286,7 +19103,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix); __pyx_v_unix_to_origin_secs = __pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix; - /* "pyreadstat/_readstat_parser.pyx":1316 + /* "pyreadstat/_readstat_parser.pyx":1334 * origin = sas_origin * unix_to_origin_secs = sas_secs_from_unix * elif file_format == FILE_FORMAT_SPSS: # <<<<<<<<<<<<<< @@ -18296,7 +19113,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; case __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA: - /* "pyreadstat/_readstat_parser.pyx":1320 + /* "pyreadstat/_readstat_parser.pyx":1338 * unix_to_origin_secs = spss_secs_from_unix * elif file_format == FILE_FORMAT_STATA: * origin = stata_origin # <<<<<<<<<<<<<< @@ -18306,7 +19123,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_origin); __pyx_v_origin = __pyx_v_10pyreadstat_16_readstat_parser_stata_origin; - /* "pyreadstat/_readstat_parser.pyx":1321 + /* "pyreadstat/_readstat_parser.pyx":1339 * elif file_format == FILE_FORMAT_STATA: * origin = stata_origin * unix_to_origin_secs = stata_secs_from_unix # <<<<<<<<<<<<<< @@ -18316,7 +19133,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix); __pyx_v_unix_to_origin_secs = __pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix; - /* "pyreadstat/_readstat_parser.pyx":1319 + /* "pyreadstat/_readstat_parser.pyx":1337 * origin = spss_origin * unix_to_origin_secs = spss_secs_from_unix * elif file_format == FILE_FORMAT_STATA: # <<<<<<<<<<<<<< @@ -18326,7 +19143,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject break; default: - /* "pyreadstat/_readstat_parser.pyx":1323 + /* "pyreadstat/_readstat_parser.pyx":1341 * unix_to_origin_secs = stata_secs_from_unix * else: * raise PyreadstatError("Unknown file format") # <<<<<<<<<<<<<< @@ -18334,7 +19151,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * data.origin = origin */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1323, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS @@ -18353,16 +19170,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __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_ERR(0, 1323, __pyx_L1_error) + __PYX_ERR(0, 1341, __pyx_L1_error) break; } - /* "pyreadstat/_readstat_parser.pyx":1325 + /* "pyreadstat/_readstat_parser.pyx":1343 * raise PyreadstatError("Unknown file format") * * data.origin = origin # <<<<<<<<<<<<<< @@ -18375,17 +19192,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_DECREF(__pyx_v_data->origin); __pyx_v_data->origin = __pyx_v_origin; - /* "pyreadstat/_readstat_parser.pyx":1326 + /* "pyreadstat/_readstat_parser.pyx":1344 * * data.origin = origin * data.unix_to_origin_secs = unix_to_origin_secs # <<<<<<<<<<<<<< * * if usecols is not None: */ - __pyx_t_21 = __Pyx_PyFloat_AsDouble(__pyx_v_unix_to_origin_secs); if (unlikely((__pyx_t_21 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) - __pyx_v_data->unix_to_origin_secs = __pyx_t_21; + __pyx_t_22 = __Pyx_PyFloat_AsDouble(__pyx_v_unix_to_origin_secs); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_v_data->unix_to_origin_secs = __pyx_t_22; - /* "pyreadstat/_readstat_parser.pyx":1328 + /* "pyreadstat/_readstat_parser.pyx":1346 * data.unix_to_origin_secs = unix_to_origin_secs * * if usecols is not None: # <<<<<<<<<<<<<< @@ -18395,7 +19212,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __pyx_t_1 = (__pyx_v_usecols != ((PyObject*)Py_None)); if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1329 + /* "pyreadstat/_readstat_parser.pyx":1347 * * if usecols is not None: * data.filter_cols = 1 # <<<<<<<<<<<<<< @@ -18404,7 +19221,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->filter_cols = 1; - /* "pyreadstat/_readstat_parser.pyx":1330 + /* "pyreadstat/_readstat_parser.pyx":1348 * if usecols is not None: * data.filter_cols = 1 * data.use_cols = usecols # <<<<<<<<<<<<<< @@ -18417,7 +19234,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_DECREF(__pyx_v_data->use_cols); __pyx_v_data->use_cols = __pyx_v_usecols; - /* "pyreadstat/_readstat_parser.pyx":1328 + /* "pyreadstat/_readstat_parser.pyx":1346 * data.unix_to_origin_secs = unix_to_origin_secs * * if usecols is not None: # <<<<<<<<<<<<<< @@ -18426,7 +19243,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ } - /* "pyreadstat/_readstat_parser.pyx":1332 + /* "pyreadstat/_readstat_parser.pyx":1350 * data.use_cols = usecols * * data.usernan = usernan # <<<<<<<<<<<<<< @@ -18435,7 +19252,7 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->usernan = __pyx_v_usernan; - /* "pyreadstat/_readstat_parser.pyx":1333 + /* "pyreadstat/_readstat_parser.pyx":1351 * * data.usernan = usernan * data.no_datetime_conversion = no_datetime_conversion # <<<<<<<<<<<<<< @@ -18444,40 +19261,40 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject */ __pyx_v_data->no_datetime_conversion = __pyx_v_no_datetime_conversion; - /* "pyreadstat/_readstat_parser.pyx":1336 + /* "pyreadstat/_readstat_parser.pyx":1354 * * # go! * run_readstat_parser(filename, data, file_extension, row_limit, row_offset, file_obj) # <<<<<<<<<<<<<< * data_dict = data_container_to_dict(data) * if output_format == 'dict': */ - __pyx_t_22.__pyx_n = 1; - __pyx_t_22.file_obj = __pyx_v_file_obj; - __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(__pyx_v_filename, __pyx_v_data, __pyx_v_file_extension, __pyx_v_row_limit, __pyx_v_row_offset, &__pyx_t_22); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_23.__pyx_n = 1; + __pyx_t_23.file_obj = __pyx_v_file_obj; + __pyx_f_10pyreadstat_16_readstat_parser_run_readstat_parser(__pyx_v_filename, __pyx_v_data, __pyx_v_file_extension, __pyx_v_row_limit, __pyx_v_row_offset, &__pyx_t_23); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L1_error) - /* "pyreadstat/_readstat_parser.pyx":1337 + /* "pyreadstat/_readstat_parser.pyx":1355 * # go! * run_readstat_parser(filename, data, file_extension, row_limit, row_offset, file_obj) * data_dict = data_container_to_dict(data) # <<<<<<<<<<<<<< * if output_format == 'dict': * data_frame = data_dict */ - __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_data_container_to_dict(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_data_dict = __pyx_t_3; __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1338 + /* "pyreadstat/_readstat_parser.pyx":1356 * run_readstat_parser(filename, data, file_extension, row_limit, row_offset, file_obj) * data_dict = data_container_to_dict(data) * if output_format == 'dict': # <<<<<<<<<<<<<< * data_frame = data_dict * else: */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_output_format, __pyx_mstate_global->__pyx_n_u_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1356, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1339 + /* "pyreadstat/_readstat_parser.pyx":1357 * data_dict = data_container_to_dict(data) * if output_format == 'dict': * data_frame = data_dict # <<<<<<<<<<<<<< @@ -18487,17 +19304,17 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_INCREF(__pyx_v_data_dict); __pyx_v_data_frame = __pyx_v_data_dict; - /* "pyreadstat/_readstat_parser.pyx":1338 + /* "pyreadstat/_readstat_parser.pyx":1356 * run_readstat_parser(filename, data, file_extension, row_limit, row_offset, file_obj) * data_dict = data_container_to_dict(data) * if output_format == 'dict': # <<<<<<<<<<<<<< * data_frame = data_dict * else: */ - goto __pyx_L46; + goto __pyx_L70; } - /* "pyreadstat/_readstat_parser.pyx":1341 + /* "pyreadstat/_readstat_parser.pyx":1359 * data_frame = data_dict * else: * data_frame = dict_to_dataframe(data_dict, data) # <<<<<<<<<<<<<< @@ -18505,26 +19322,26 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * */ /*else*/ { - __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(__pyx_v_data_dict, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_dict_to_dataframe(__pyx_v_data_dict, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_data_frame = __pyx_t_3; __pyx_t_3 = 0; } - __pyx_L46:; + __pyx_L70:; - /* "pyreadstat/_readstat_parser.pyx":1342 + /* "pyreadstat/_readstat_parser.pyx":1360 * else: * data_frame = dict_to_dataframe(data_dict, data) * metadata = data_container_extract_metadata(data) # <<<<<<<<<<<<<< * * return data_frame, metadata */ - __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_metadata(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10pyreadstat_16_readstat_parser_data_container_extract_metadata(__pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_metadata = __pyx_t_3; __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1344 + /* "pyreadstat/_readstat_parser.pyx":1362 * metadata = data_container_extract_metadata(data) * * return data_frame, metadata # <<<<<<<<<<<<<< @@ -18532,19 +19349,19 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject * def parser_entry_point(filename_path, str parser_format=None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_data_frame); __Pyx_GIVEREF(__pyx_v_data_frame); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data_frame) != (0)) __PYX_ERR(0, 1344, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data_frame) != (0)) __PYX_ERR(0, 1362, __pyx_L1_error); __Pyx_INCREF(__pyx_v_metadata); __Pyx_GIVEREF(__pyx_v_metadata); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_metadata) != (0)) __PYX_ERR(0, 1344, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_metadata) != (0)) __PYX_ERR(0, 1362, __pyx_L1_error); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":1203 + /* "pyreadstat/_readstat_parser.pyx":1221 * * * cdef object run_conversion(object filename_path, py_file_format file_format, py_file_extension file_extension, # <<<<<<<<<<<<<< @@ -18578,13 +19395,16 @@ static PyObject *__pyx_f_10pyreadstat_16_readstat_parser_run_conversion(PyObject __Pyx_XDECREF(__pyx_v_polars); __Pyx_XDECREF(__pyx_v_unix_to_origin_secs); __Pyx_XDECREF(__pyx_v_metadata); + __Pyx_XDECREF(__pyx_v_edf); + __Pyx_XDECREF(__pyx_v_edtf); + __Pyx_XDECREF(__pyx_v_etf); __Pyx_XDECREF(__pyx_v_output_format); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "pyreadstat/_readstat_parser.pyx":1346 +/* "pyreadstat/_readstat_parser.pyx":1364 * return data_frame, metadata * * def parser_entry_point(filename_path, str parser_format=None, # <<<<<<<<<<<<<< @@ -18646,81 +19466,81 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_filename_path,&__pyx_mstate_global->__pyx_n_u_parser_format,&__pyx_mstate_global->__pyx_n_u_metadataonly,&__pyx_mstate_global->__pyx_n_u_dates_as_pandas_datetime,&__pyx_mstate_global->__pyx_n_u_formats_as_category,&__pyx_mstate_global->__pyx_n_u_formats_as_ordered_category,&__pyx_mstate_global->__pyx_n_u_encoding,&__pyx_mstate_global->__pyx_n_u_usecols,&__pyx_mstate_global->__pyx_n_u_user_missing,&__pyx_mstate_global->__pyx_n_u_disable_datetime_conversion,&__pyx_mstate_global->__pyx_n_u_row_limit,&__pyx_mstate_global->__pyx_n_u_row_offset,&__pyx_mstate_global->__pyx_n_u_output_format,&__pyx_mstate_global->__pyx_n_u_extra_datetime_formats,&__pyx_mstate_global->__pyx_n_u_extra_date_formats,&__pyx_mstate_global->__pyx_n_u_extra_time_formats,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1346, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1364, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 16: values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 15: values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parser_entry_point", 0) < (0)) __PYX_ERR(0, 1346, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parser_entry_point", 0) < (0)) __PYX_ERR(0, 1364, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); - /* "pyreadstat/_readstat_parser.pyx":1347 + /* "pyreadstat/_readstat_parser.pyx":1365 * * def parser_entry_point(filename_path, str parser_format=None, * metadataonly=False, dates_as_pandas_datetime=False, # <<<<<<<<<<<<<< @@ -18730,7 +19550,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); - /* "pyreadstat/_readstat_parser.pyx":1348 + /* "pyreadstat/_readstat_parser.pyx":1366 * def parser_entry_point(filename_path, str parser_format=None, * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, # <<<<<<<<<<<<<< @@ -18743,7 +19563,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); - /* "pyreadstat/_readstat_parser.pyx":1349 + /* "pyreadstat/_readstat_parser.pyx":1367 * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, * disable_datetime_conversion=False, int row_limit=0, int row_offset=0, str output_format=None, list extra_datetime_formats=None, # <<<<<<<<<<<<<< @@ -18754,7 +19574,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[12]) values[12] = __Pyx_NewRef(((PyObject*)Py_None)); if (!values[13]) values[13] = __Pyx_NewRef(((PyObject*)Py_None)); - /* "pyreadstat/_readstat_parser.pyx":1350 + /* "pyreadstat/_readstat_parser.pyx":1368 * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, * disable_datetime_conversion=False, int row_limit=0, int row_offset=0, str output_format=None, list extra_datetime_formats=None, * list extra_date_formats=None, list extra_time_formats=None): # <<<<<<<<<<<<<< @@ -18764,78 +19584,78 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[14]) values[14] = __Pyx_NewRef(((PyObject*)Py_None)); if (!values[15]) values[15] = __Pyx_NewRef(((PyObject*)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parser_entry_point", 0, 1, 16, i); __PYX_ERR(0, 1346, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parser_entry_point", 0, 1, 16, i); __PYX_ERR(0, 1364, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 16: values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 15: values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1364, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1346, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1364, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } - /* "pyreadstat/_readstat_parser.pyx":1346 + /* "pyreadstat/_readstat_parser.pyx":1364 * return data_frame, metadata * * def parser_entry_point(filename_path, str parser_format=None, # <<<<<<<<<<<<<< @@ -18848,7 +19668,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); - /* "pyreadstat/_readstat_parser.pyx":1348 + /* "pyreadstat/_readstat_parser.pyx":1366 * def parser_entry_point(filename_path, str parser_format=None, * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, # <<<<<<<<<<<<<< @@ -18860,7 +19680,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); - /* "pyreadstat/_readstat_parser.pyx":1349 + /* "pyreadstat/_readstat_parser.pyx":1367 * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, * disable_datetime_conversion=False, int row_limit=0, int row_offset=0, str output_format=None, list extra_datetime_formats=None, # <<<<<<<<<<<<<< @@ -18870,7 +19690,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[12]) values[12] = __Pyx_NewRef(((PyObject*)Py_None)); if (!values[13]) values[13] = __Pyx_NewRef(((PyObject*)Py_None)); - /* "pyreadstat/_readstat_parser.pyx":1350 + /* "pyreadstat/_readstat_parser.pyx":1368 * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, * disable_datetime_conversion=False, int row_limit=0, int row_offset=0, str output_format=None, list extra_datetime_formats=None, * list extra_date_formats=None, list extra_time_formats=None): # <<<<<<<<<<<<<< @@ -18891,12 +19711,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_user_missing = values[8]; __pyx_v_disable_datetime_conversion = values[9]; if (values[10]) { - __pyx_v_row_limit = __Pyx_PyLong_As_int(values[10]); if (unlikely((__pyx_v_row_limit == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1349, __pyx_L3_error) + __pyx_v_row_limit = __Pyx_PyLong_As_int(values[10]); if (unlikely((__pyx_v_row_limit == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error) } else { __pyx_v_row_limit = ((int)((int)0)); } if (values[11]) { - __pyx_v_row_offset = __Pyx_PyLong_As_int(values[11]); if (unlikely((__pyx_v_row_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1349, __pyx_L3_error) + __pyx_v_row_offset = __Pyx_PyLong_As_int(values[11]); if (unlikely((__pyx_v_row_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error) } else { __pyx_v_row_offset = ((int)((int)0)); } @@ -18907,7 +19727,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parser_entry_point", 0, 1, 16, __pyx_nargs); __PYX_ERR(0, 1346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parser_entry_point", 0, 1, 16, __pyx_nargs); __PYX_ERR(0, 1364, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18918,16 +19738,16 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser_format), (&PyUnicode_Type), 1, "parser_format", 1))) __PYX_ERR(0, 1346, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoding), (&PyUnicode_Type), 1, "encoding", 1))) __PYX_ERR(0, 1348, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_usecols), (&PyList_Type), 1, "usecols", 1))) __PYX_ERR(0, 1348, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_output_format), (&PyUnicode_Type), 1, "output_format", 1))) __PYX_ERR(0, 1349, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_datetime_formats), (&PyList_Type), 1, "extra_datetime_formats", 1))) __PYX_ERR(0, 1349, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_date_formats), (&PyList_Type), 1, "extra_date_formats", 1))) __PYX_ERR(0, 1350, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_time_formats), (&PyList_Type), 1, "extra_time_formats", 1))) __PYX_ERR(0, 1350, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser_format), (&PyUnicode_Type), 1, "parser_format", 1))) __PYX_ERR(0, 1364, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoding), (&PyUnicode_Type), 1, "encoding", 1))) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_usecols), (&PyList_Type), 1, "usecols", 1))) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_output_format), (&PyUnicode_Type), 1, "output_format", 1))) __PYX_ERR(0, 1367, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_datetime_formats), (&PyList_Type), 1, "extra_datetime_formats", 1))) __PYX_ERR(0, 1367, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_date_formats), (&PyList_Type), 1, "extra_date_formats", 1))) __PYX_ERR(0, 1368, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_extra_time_formats), (&PyList_Type), 1, "extra_time_formats", 1))) __PYX_ERR(0, 1368, __pyx_L1_error) __pyx_r = __pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(__pyx_self, __pyx_v_filename_path, __pyx_v_parser_format, __pyx_v_metadataonly, __pyx_v_dates_as_pandas_datetime, __pyx_v_formats_as_category, __pyx_v_formats_as_ordered_category, __pyx_v_encoding, __pyx_v_usecols, __pyx_v_user_missing, __pyx_v_disable_datetime_conversion, __pyx_v_row_limit, __pyx_v_row_offset, __pyx_v_output_format, __pyx_v_extra_datetime_formats, __pyx_v_extra_date_formats, __pyx_v_extra_time_formats); - /* "pyreadstat/_readstat_parser.pyx":1346 + /* "pyreadstat/_readstat_parser.pyx":1364 * return data_frame, metadata * * def parser_entry_point(filename_path, str parser_format=None, # <<<<<<<<<<<<<< @@ -18975,17 +19795,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parser_entry_point", 0); - /* "pyreadstat/_readstat_parser.pyx":1356 + /* "pyreadstat/_readstat_parser.pyx":1374 * cdef py_file_extension file_extension * * if parser_format == "sav/zsav": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_SAV */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_kp_u_sav_zsav, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_kp_u_sav_zsav, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1374, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1357 + /* "pyreadstat/_readstat_parser.pyx":1375 * * if parser_format == "sav/zsav": * file_format = FILE_FORMAT_SPSS # <<<<<<<<<<<<<< @@ -18994,7 +19814,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS; - /* "pyreadstat/_readstat_parser.pyx":1358 + /* "pyreadstat/_readstat_parser.pyx":1376 * if parser_format == "sav/zsav": * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_SAV # <<<<<<<<<<<<<< @@ -19003,7 +19823,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAV; - /* "pyreadstat/_readstat_parser.pyx":1356 + /* "pyreadstat/_readstat_parser.pyx":1374 * cdef py_file_extension file_extension * * if parser_format == "sav/zsav": # <<<<<<<<<<<<<< @@ -19013,17 +19833,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1359 + /* "pyreadstat/_readstat_parser.pyx":1377 * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_SAV * elif parser_format == "sas7bdat": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BDAT */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_sas7bdat, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_sas7bdat, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1377, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1360 + /* "pyreadstat/_readstat_parser.pyx":1378 * file_extension = FILE_EXT_SAV * elif parser_format == "sas7bdat": * file_format = FILE_FORMAT_SAS # <<<<<<<<<<<<<< @@ -19032,7 +19852,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS; - /* "pyreadstat/_readstat_parser.pyx":1361 + /* "pyreadstat/_readstat_parser.pyx":1379 * elif parser_format == "sas7bdat": * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BDAT # <<<<<<<<<<<<<< @@ -19041,7 +19861,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAS7BDAT; - /* "pyreadstat/_readstat_parser.pyx":1359 + /* "pyreadstat/_readstat_parser.pyx":1377 * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_SAV * elif parser_format == "sas7bdat": # <<<<<<<<<<<<<< @@ -19051,17 +19871,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1362 + /* "pyreadstat/_readstat_parser.pyx":1380 * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BDAT * elif parser_format == "xport": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_XPORT */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_xport, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_xport, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1380, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1363 + /* "pyreadstat/_readstat_parser.pyx":1381 * file_extension = FILE_EXT_SAS7BDAT * elif parser_format == "xport": * file_format = FILE_FORMAT_SAS # <<<<<<<<<<<<<< @@ -19070,7 +19890,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS; - /* "pyreadstat/_readstat_parser.pyx":1364 + /* "pyreadstat/_readstat_parser.pyx":1382 * elif parser_format == "xport": * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_XPORT # <<<<<<<<<<<<<< @@ -19079,7 +19899,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_XPORT; - /* "pyreadstat/_readstat_parser.pyx":1362 + /* "pyreadstat/_readstat_parser.pyx":1380 * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BDAT * elif parser_format == "xport": # <<<<<<<<<<<<<< @@ -19089,17 +19909,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1365 + /* "pyreadstat/_readstat_parser.pyx":1383 * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_XPORT * elif parser_format == "dta": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_STATA * file_extension = FILE_EXT_DTA */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_dta, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_dta, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1383, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1366 + /* "pyreadstat/_readstat_parser.pyx":1384 * file_extension = FILE_EXT_XPORT * elif parser_format == "dta": * file_format = FILE_FORMAT_STATA # <<<<<<<<<<<<<< @@ -19108,7 +19928,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_STATA; - /* "pyreadstat/_readstat_parser.pyx":1367 + /* "pyreadstat/_readstat_parser.pyx":1385 * elif parser_format == "dta": * file_format = FILE_FORMAT_STATA * file_extension = FILE_EXT_DTA # <<<<<<<<<<<<<< @@ -19117,7 +19937,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_DTA; - /* "pyreadstat/_readstat_parser.pyx":1365 + /* "pyreadstat/_readstat_parser.pyx":1383 * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_XPORT * elif parser_format == "dta": # <<<<<<<<<<<<<< @@ -19127,17 +19947,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1368 + /* "pyreadstat/_readstat_parser.pyx":1386 * file_format = FILE_FORMAT_STATA * file_extension = FILE_EXT_DTA * elif parser_format == "por": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_POR */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_por, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_por, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1386, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1369 + /* "pyreadstat/_readstat_parser.pyx":1387 * file_extension = FILE_EXT_DTA * elif parser_format == "por": * file_format = FILE_FORMAT_SPSS # <<<<<<<<<<<<<< @@ -19146,7 +19966,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SPSS; - /* "pyreadstat/_readstat_parser.pyx":1370 + /* "pyreadstat/_readstat_parser.pyx":1388 * elif parser_format == "por": * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_POR # <<<<<<<<<<<<<< @@ -19155,7 +19975,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_POR; - /* "pyreadstat/_readstat_parser.pyx":1368 + /* "pyreadstat/_readstat_parser.pyx":1386 * file_format = FILE_FORMAT_STATA * file_extension = FILE_EXT_DTA * elif parser_format == "por": # <<<<<<<<<<<<<< @@ -19165,17 +19985,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1371 + /* "pyreadstat/_readstat_parser.pyx":1389 * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_POR * elif parser_format == "sas7bcat": # <<<<<<<<<<<<<< * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BCAT */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_sas7bcat, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_parser_format, __pyx_mstate_global->__pyx_n_u_sas7bcat, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1389, __pyx_L1_error) if (likely(__pyx_t_1)) { - /* "pyreadstat/_readstat_parser.pyx":1372 + /* "pyreadstat/_readstat_parser.pyx":1390 * file_extension = FILE_EXT_POR * elif parser_format == "sas7bcat": * file_format = FILE_FORMAT_SAS # <<<<<<<<<<<<<< @@ -19184,7 +20004,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_format = __pyx_e_10pyreadstat_16_readstat_parser_FILE_FORMAT_SAS; - /* "pyreadstat/_readstat_parser.pyx":1373 + /* "pyreadstat/_readstat_parser.pyx":1391 * elif parser_format == "sas7bcat": * file_format = FILE_FORMAT_SAS * file_extension = FILE_EXT_SAS7BCAT # <<<<<<<<<<<<<< @@ -19193,7 +20013,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_file_extension = __pyx_e_10pyreadstat_16_readstat_parser_FILE_EXT_SAS7BCAT; - /* "pyreadstat/_readstat_parser.pyx":1371 + /* "pyreadstat/_readstat_parser.pyx":1389 * file_format = FILE_FORMAT_SPSS * file_extension = FILE_EXT_POR * elif parser_format == "sas7bcat": # <<<<<<<<<<<<<< @@ -19203,7 +20023,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT goto __pyx_L3; } - /* "pyreadstat/_readstat_parser.pyx":1375 + /* "pyreadstat/_readstat_parser.pyx":1393 * file_extension = FILE_EXT_SAS7BCAT * else: * raise PyreadstatError("wrong parser format") # <<<<<<<<<<<<<< @@ -19212,7 +20032,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ /*else*/ { __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyreadstatError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -19231,16 +20051,16 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1375, __pyx_L1_error) + __PYX_ERR(0, 1393, __pyx_L1_error) } __pyx_L3:; - /* "pyreadstat/_readstat_parser.pyx":1377 + /* "pyreadstat/_readstat_parser.pyx":1395 * raise PyreadstatError("wrong parser format") * * cdef bint metaonly = 0 # <<<<<<<<<<<<<< @@ -19249,17 +20069,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_metaonly = 0; - /* "pyreadstat/_readstat_parser.pyx":1378 + /* "pyreadstat/_readstat_parser.pyx":1396 * * cdef bint metaonly = 0 * if metadataonly: # <<<<<<<<<<<<<< * metaonly = 1 * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_metadataonly); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_metadataonly); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1396, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1379 + /* "pyreadstat/_readstat_parser.pyx":1397 * cdef bint metaonly = 0 * if metadataonly: * metaonly = 1 # <<<<<<<<<<<<<< @@ -19268,7 +20088,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_metaonly = 1; - /* "pyreadstat/_readstat_parser.pyx":1378 + /* "pyreadstat/_readstat_parser.pyx":1396 * * cdef bint metaonly = 0 * if metadataonly: # <<<<<<<<<<<<<< @@ -19277,7 +20097,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ } - /* "pyreadstat/_readstat_parser.pyx":1381 + /* "pyreadstat/_readstat_parser.pyx":1399 * metaonly = 1 * * cdef bint dates_as_pandas = 0 # <<<<<<<<<<<<<< @@ -19286,17 +20106,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_dates_as_pandas = 0; - /* "pyreadstat/_readstat_parser.pyx":1382 + /* "pyreadstat/_readstat_parser.pyx":1400 * * cdef bint dates_as_pandas = 0 * if dates_as_pandas_datetime: # <<<<<<<<<<<<<< * dates_as_pandas = 1 * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dates_as_pandas_datetime); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dates_as_pandas_datetime); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1400, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1383 + /* "pyreadstat/_readstat_parser.pyx":1401 * cdef bint dates_as_pandas = 0 * if dates_as_pandas_datetime: * dates_as_pandas = 1 # <<<<<<<<<<<<<< @@ -19305,7 +20125,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_dates_as_pandas = 1; - /* "pyreadstat/_readstat_parser.pyx":1382 + /* "pyreadstat/_readstat_parser.pyx":1400 * * cdef bint dates_as_pandas = 0 * if dates_as_pandas_datetime: # <<<<<<<<<<<<<< @@ -19314,7 +20134,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ } - /* "pyreadstat/_readstat_parser.pyx":1385 + /* "pyreadstat/_readstat_parser.pyx":1403 * dates_as_pandas = 1 * * cdef bint usernan = 0 # <<<<<<<<<<<<<< @@ -19323,17 +20143,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_usernan = 0; - /* "pyreadstat/_readstat_parser.pyx":1386 + /* "pyreadstat/_readstat_parser.pyx":1404 * * cdef bint usernan = 0 * if user_missing: # <<<<<<<<<<<<<< * usernan = 1 * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_user_missing); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_user_missing); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1404, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1387 + /* "pyreadstat/_readstat_parser.pyx":1405 * cdef bint usernan = 0 * if user_missing: * usernan = 1 # <<<<<<<<<<<<<< @@ -19342,7 +20162,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_usernan = 1; - /* "pyreadstat/_readstat_parser.pyx":1386 + /* "pyreadstat/_readstat_parser.pyx":1404 * * cdef bint usernan = 0 * if user_missing: # <<<<<<<<<<<<<< @@ -19351,7 +20171,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ } - /* "pyreadstat/_readstat_parser.pyx":1389 + /* "pyreadstat/_readstat_parser.pyx":1407 * usernan = 1 * * cdef bint no_datetime_conversion = 0 # <<<<<<<<<<<<<< @@ -19360,17 +20180,17 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_no_datetime_conversion = 0; - /* "pyreadstat/_readstat_parser.pyx":1390 + /* "pyreadstat/_readstat_parser.pyx":1408 * * cdef bint no_datetime_conversion = 0 * if disable_datetime_conversion: # <<<<<<<<<<<<<< * no_datetime_conversion = 1 * */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_disable_datetime_conversion); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_disable_datetime_conversion); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1408, __pyx_L1_error) if (__pyx_t_1) { - /* "pyreadstat/_readstat_parser.pyx":1391 + /* "pyreadstat/_readstat_parser.pyx":1409 * cdef bint no_datetime_conversion = 0 * if disable_datetime_conversion: * no_datetime_conversion = 1 # <<<<<<<<<<<<<< @@ -19379,7 +20199,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ __pyx_v_no_datetime_conversion = 1; - /* "pyreadstat/_readstat_parser.pyx":1390 + /* "pyreadstat/_readstat_parser.pyx":1408 * * cdef bint no_datetime_conversion = 0 * if disable_datetime_conversion: # <<<<<<<<<<<<<< @@ -19388,14 +20208,14 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT */ } - /* "pyreadstat/_readstat_parser.pyx":1393 + /* "pyreadstat/_readstat_parser.pyx":1411 * no_datetime_conversion = 1 * * data_frame, metadata = run_conversion(filename_path, file_format, file_extension, encoding, metaonly, # <<<<<<<<<<<<<< * dates_as_pandas, usecols, usernan, no_datetime_conversion, row_limit, row_offset, * output_format, extra_datetime_formats, extra_date_formats, extra_time_formats) */ - __pyx_t_2 = __pyx_f_10pyreadstat_16_readstat_parser_run_conversion(__pyx_v_filename_path, __pyx_v_file_format, __pyx_v_file_extension, __pyx_v_encoding, __pyx_v_metaonly, __pyx_v_dates_as_pandas, __pyx_v_usecols, __pyx_v_usernan, __pyx_v_no_datetime_conversion, ((long)__pyx_v_row_limit), ((long)__pyx_v_row_offset), __pyx_v_output_format, __pyx_v_extra_datetime_formats, __pyx_v_extra_date_formats, __pyx_v_extra_time_formats); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10pyreadstat_16_readstat_parser_run_conversion(__pyx_v_filename_path, __pyx_v_file_format, __pyx_v_file_extension, __pyx_v_encoding, __pyx_v_metaonly, __pyx_v_dates_as_pandas, __pyx_v_usecols, __pyx_v_usernan, __pyx_v_no_datetime_conversion, ((long)__pyx_v_row_limit), ((long)__pyx_v_row_offset), __pyx_v_output_format, __pyx_v_extra_datetime_formats, __pyx_v_extra_date_formats, __pyx_v_extra_time_formats); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; @@ -19403,7 +20223,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1393, __pyx_L1_error) + __PYX_ERR(0, 1411, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -19413,22 +20233,22 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -19436,7 +20256,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 1393, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 1411, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_unpacking_done; @@ -19444,7 +20264,7 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1393, __pyx_L1_error) + __PYX_ERR(0, 1411, __pyx_L1_error) __pyx_L9_unpacking_done:; } __pyx_v_data_frame = __pyx_t_4; @@ -19452,26 +20272,26 @@ static PyObject *__pyx_pf_10pyreadstat_16_readstat_parser_parser_entry_point(CYT __pyx_v_metadata = __pyx_t_3; __pyx_t_3 = 0; - /* "pyreadstat/_readstat_parser.pyx":1397 + /* "pyreadstat/_readstat_parser.pyx":1415 * output_format, extra_datetime_formats, extra_date_formats, extra_time_formats) * * return data_frame, metadata # <<<<<<<<<<<<<< * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_data_frame); __Pyx_GIVEREF(__pyx_v_data_frame); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_frame) != (0)) __PYX_ERR(0, 1397, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_frame) != (0)) __PYX_ERR(0, 1415, __pyx_L1_error); __Pyx_INCREF(__pyx_v_metadata); __Pyx_GIVEREF(__pyx_v_metadata); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_metadata) != (0)) __PYX_ERR(0, 1397, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_metadata) != (0)) __PYX_ERR(0, 1415, __pyx_L1_error); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pyreadstat/_readstat_parser.pyx":1346 + /* "pyreadstat/_readstat_parser.pyx":1364 * return data_frame, metadata * * def parser_entry_point(filename_path, str parser_format=None, # <<<<<<<<<<<<<< @@ -19872,6 +20692,7 @@ static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { __pyx_v_10pyreadstat_16_readstat_parser_stata_all_formats = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_10pyreadstat_16_readstat_parser_stata_origin = Py_None; Py_INCREF(Py_None); __pyx_v_10pyreadstat_16_readstat_parser_unix_origin = Py_None; Py_INCREF(Py_None); + __pyx_v_10pyreadstat_16_readstat_parser_format_regex = Py_None; Py_INCREF(Py_None); __pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix = Py_None; Py_INCREF(Py_None); __pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix = Py_None; Py_INCREF(Py_None); __pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix = Py_None; Py_INCREF(Py_None); @@ -19963,15 +20784,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container)) __PYX_ERR(0, 83, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container)) __PYX_ERR(0, 84, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10pyreadstat_16_readstat_parser_data_container_spec, __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container = &__pyx_type_10pyreadstat_16_readstat_parser_data_container; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container); @@ -19981,8 +20802,8 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container->tp_getattro = PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_data_container, (PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_data_container, (PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_10pyreadstat_16_readstat_parser_data_container) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -20270,6 +21091,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__readstat_parser(PyObject *__pyx_p PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -20411,7 +21233,7 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import os * import warnings # <<<<<<<<<<<<<< * import sys - * + * import re */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_warnings, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; @@ -20423,8 +21245,8 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * import os * import warnings * import sys # <<<<<<<<<<<<<< + * import re * - * import narwhals.stable.v2 as nw */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_sys, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; @@ -20432,41 +21254,54 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":33 + /* "pyreadstat/_readstat_parser.pyx":32 + * import warnings * import sys + * import re # <<<<<<<<<<<<<< + * + * import narwhals.stable.v2 as nw +*/ + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_re, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_2 = __pyx_t_1; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_2) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "pyreadstat/_readstat_parser.pyx":34 + * import re * * import narwhals.stable.v2 as nw # <<<<<<<<<<<<<< * import numpy as np * */ - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_narwhals_stable_v2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_narwhals_stable_v2, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_narwhals_stable_v2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_stable); Py_DECREF(__pyx_t_1); - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_t_1 = __pyx_t_5; __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_v2); Py_DECREF(__pyx_t_1); - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_t_1 = __pyx_t_5; __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nw, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":34 + /* "pyreadstat/_readstat_parser.pyx":35 * * import narwhals.stable.v2 as nw * import numpy as np # <<<<<<<<<<<<<< * * from readstat_api cimport * */ - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_numpy, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, __pyx_mstate_global->__pyx_kp_u_pyreadstat_numpy, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":38 + /* "pyreadstat/_readstat_parser.pyx":39 * from readstat_api cimport * * * from pyclasses import metadata_container # <<<<<<<<<<<<<< @@ -20475,22 +21310,22 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metadata_container}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyclasses, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pyclasses, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pyclasses, __pyx_imported_names, 1, __pyx_mstate_global->__pyx_kp_u_pyreadstat_pyclasses, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_metadata_container}; __pyx_t_3 = 0; { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":41 + /* "pyreadstat/_readstat_parser.pyx":42 * * # necessary to work with the datetime C API * import_datetime() # <<<<<<<<<<<<<< @@ -20499,342 +21334,369 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); */ __pyx_f_7cpython_8datetime_import_datetime(); - /* "pyreadstat/_readstat_parser.pyx":43 + /* "pyreadstat/_readstat_parser.pyx":44 * import_datetime() * * cdef object unix_origin = datetime_new(1970, 1, 1, 0, 0, 0, 0, None) # <<<<<<<<<<<<<< * - * cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "DATE9", "YYMMDD10", + * cdef object format_regex = re.compile(r"^([A-Z][A-Z0-9]+[A-Z])(\d+)?(?(2)(?:\.\d+)?$|$)") */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7B2, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7B2, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":45 + /* "pyreadstat/_readstat_parser.pyx":46 * cdef object unix_origin = datetime_new(1970, 1, 1, 0, 0, 0, 0, None) * - * cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "DATE9", "YYMMDD10", # <<<<<<<<<<<<<< - * "DDMMYYB", "DDMMYYB10", "DDMMYYC", "DDMMYYC10", "DDMMYYD", "DDMMYYD10", - * "DDMMYYN6", "DDMMYYN8", "DDMMYYP", "DDMMYYP10", "DDMMYYS", "DDMMYYS10", + * cdef object format_regex = re.compile(r"^([A-Z][A-Z0-9]+[A-Z])(\d+)?(?(2)(?:\.\d+)?$|$)") # <<<<<<<<<<<<<< + * cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "YYMMDD", + * "DDMMYYB", "DDMMYYC", "DDMMYYD", +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_compile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_A_Z_A_Z0_9_A_Z_d_2_d}; + __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_format_regex); + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_format_regex, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "pyreadstat/_readstat_parser.pyx":47 + * + * cdef object format_regex = re.compile(r"^([A-Z][A-Z0-9]+[A-Z])(\d+)?(?(2)(?:\.\d+)?$|$)") + * cdef list sas_date_formats = ["WEEKDATE", "MMDDYY", "DDMMYY", "YYMMDD", "DATE", "YYMMDD", # <<<<<<<<<<<<<< + * "DDMMYYB", "DDMMYYC", "DDMMYYD", + * "DDMMYYN", "DDMMYYP", "DDMMYYS", */ - __pyx_t_2 = __Pyx_PyList_Pack(41, __pyx_mstate_global->__pyx_n_u_WEEKDATE, __pyx_mstate_global->__pyx_n_u_MMDDYY, __pyx_mstate_global->__pyx_n_u_DDMMYY, __pyx_mstate_global->__pyx_n_u_YYMMDD, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_DATE9, __pyx_mstate_global->__pyx_n_u_YYMMDD10, __pyx_mstate_global->__pyx_n_u_DDMMYYB, __pyx_mstate_global->__pyx_n_u_DDMMYYB10, __pyx_mstate_global->__pyx_n_u_DDMMYYC, __pyx_mstate_global->__pyx_n_u_DDMMYYC10, __pyx_mstate_global->__pyx_n_u_DDMMYYD, __pyx_mstate_global->__pyx_n_u_DDMMYYD10, __pyx_mstate_global->__pyx_n_u_DDMMYYN6, __pyx_mstate_global->__pyx_n_u_DDMMYYN8, __pyx_mstate_global->__pyx_n_u_DDMMYYP, __pyx_mstate_global->__pyx_n_u_DDMMYYP10, __pyx_mstate_global->__pyx_n_u_DDMMYYS, __pyx_mstate_global->__pyx_n_u_DDMMYYS10, __pyx_mstate_global->__pyx_n_u_MMDDYYB, __pyx_mstate_global->__pyx_n_u_MMDDYYB10, __pyx_mstate_global->__pyx_n_u_MMDDYYC, __pyx_mstate_global->__pyx_n_u_MMDDYYC10, __pyx_mstate_global->__pyx_n_u_MMDDYYD, __pyx_mstate_global->__pyx_n_u_MMDDYYD10, __pyx_mstate_global->__pyx_n_u_MMDDYYN6, __pyx_mstate_global->__pyx_n_u_MMDDYYN8, __pyx_mstate_global->__pyx_n_u_MMDDYYP, __pyx_mstate_global->__pyx_n_u_MMDDYYP10, __pyx_mstate_global->__pyx_n_u_MMDDYYS, __pyx_mstate_global->__pyx_n_u_MMDDYYS10, __pyx_mstate_global->__pyx_n_u_WEEKDATX, __pyx_mstate_global->__pyx_n_u_DTDATE, __pyx_mstate_global->__pyx_n_u_IS8601DA, __pyx_mstate_global->__pyx_n_u_E8601DA, __pyx_mstate_global->__pyx_n_u_B8601DA, __pyx_mstate_global->__pyx_n_u_YYMMDDB, __pyx_mstate_global->__pyx_n_u_YYMMDDD, __pyx_mstate_global->__pyx_n_u_YYMMDDN, __pyx_mstate_global->__pyx_n_u_YYMMDDP, __pyx_mstate_global->__pyx_n_u_YYMMDDS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(28, __pyx_mstate_global->__pyx_n_u_WEEKDATE, __pyx_mstate_global->__pyx_n_u_MMDDYY, __pyx_mstate_global->__pyx_n_u_DDMMYY, __pyx_mstate_global->__pyx_n_u_YYMMDD, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_YYMMDD, __pyx_mstate_global->__pyx_n_u_DDMMYYB, __pyx_mstate_global->__pyx_n_u_DDMMYYC, __pyx_mstate_global->__pyx_n_u_DDMMYYD, __pyx_mstate_global->__pyx_n_u_DDMMYYN, __pyx_mstate_global->__pyx_n_u_DDMMYYP, __pyx_mstate_global->__pyx_n_u_DDMMYYS, __pyx_mstate_global->__pyx_n_u_MMDDYYB, __pyx_mstate_global->__pyx_n_u_MMDDYYC, __pyx_mstate_global->__pyx_n_u_MMDDYYD, __pyx_mstate_global->__pyx_n_u_MMDDYYN, __pyx_mstate_global->__pyx_n_u_MMDDYYP, __pyx_mstate_global->__pyx_n_u_MMDDYYS, __pyx_mstate_global->__pyx_n_u_WEEKDATX, __pyx_mstate_global->__pyx_n_u_DTDATE, __pyx_mstate_global->__pyx_n_u_IS8601DA, __pyx_mstate_global->__pyx_n_u_E8601DA, __pyx_mstate_global->__pyx_n_u_B8601DA, __pyx_mstate_global->__pyx_n_u_YYMMDDB, __pyx_mstate_global->__pyx_n_u_YYMMDDD, __pyx_mstate_global->__pyx_n_u_YYMMDDN, __pyx_mstate_global->__pyx_n_u_YYMMDDP, __pyx_mstate_global->__pyx_n_u_YYMMDDS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_date_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":54 + /* "pyreadstat/_readstat_parser.pyx":56 * "IS8601DA", "E8601DA", "B8601DA", - * "YYMMDDB", "YYMMDDD", "YYMMDDN", "YYMMDDP", "YYMMDDS",] - * cdef list sas_datetime_formats = ["DATETIME", "DATETIME18", "DATETIME19", "DATETIME20", "DATETIME21", "DATETIME22", # <<<<<<<<<<<<<< - * "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] - * cdef list sas_time_formats = ["TIME", "HHMM", "TIME20.3", "TIME20", "TIME5", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM", ] + * "YYMMDDB", "YYMMDDD", "YYMMDDN", "YYMMDDP", "YYMMDDS"] + * cdef list sas_datetime_formats = ["DATETIME", "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] # <<<<<<<<<<<<<< + * cdef list sas_time_formats = ["TIME", "HHMM", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM"] + * # "HOUR" # these do not print as full time formats in sas */ - __pyx_t_2 = __Pyx_PyList_Pack(12, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_DATETIME18, __pyx_mstate_global->__pyx_n_u_DATETIME19, __pyx_mstate_global->__pyx_n_u_DATETIME20, __pyx_mstate_global->__pyx_n_u_DATETIME21, __pyx_mstate_global->__pyx_n_u_DATETIME22, __pyx_mstate_global->__pyx_n_u_E8601DT, __pyx_mstate_global->__pyx_n_u_DATEAMPM, __pyx_mstate_global->__pyx_n_u_MDYAMPM, __pyx_mstate_global->__pyx_n_u_IS8601DT, __pyx_mstate_global->__pyx_n_u_B8601DT, __pyx_mstate_global->__pyx_n_u_B8601DN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(7, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_E8601DT, __pyx_mstate_global->__pyx_n_u_DATEAMPM, __pyx_mstate_global->__pyx_n_u_MDYAMPM, __pyx_mstate_global->__pyx_n_u_IS8601DT, __pyx_mstate_global->__pyx_n_u_B8601DT, __pyx_mstate_global->__pyx_n_u_B8601DN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_datetime_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":56 - * cdef list sas_datetime_formats = ["DATETIME", "DATETIME18", "DATETIME19", "DATETIME20", "DATETIME21", "DATETIME22", - * "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] - * cdef list sas_time_formats = ["TIME", "HHMM", "TIME20.3", "TIME20", "TIME5", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM", ] # <<<<<<<<<<<<<< + /* "pyreadstat/_readstat_parser.pyx":57 + * "YYMMDDB", "YYMMDDD", "YYMMDDN", "YYMMDDP", "YYMMDDS"] + * cdef list sas_datetime_formats = ["DATETIME", "E8601DT", "DATEAMPM", "MDYAMPM", "IS8601DT", "B8601DT", "B8601DN"] + * cdef list sas_time_formats = ["TIME", "HHMM", "TOD", "TIMEAMPM", "IS8601TM", "E8601TM", "B8601TM"] # <<<<<<<<<<<<<< * # "HOUR" # these do not print as full time formats in sas * #cdef list sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats */ - __pyx_t_2 = __Pyx_PyList_Pack(10, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_HHMM, __pyx_mstate_global->__pyx_kp_u_TIME20_3, __pyx_mstate_global->__pyx_n_u_TIME20, __pyx_mstate_global->__pyx_n_u_TIME5, __pyx_mstate_global->__pyx_n_u_TOD, __pyx_mstate_global->__pyx_n_u_TIMEAMPM, __pyx_mstate_global->__pyx_n_u_IS8601TM, __pyx_mstate_global->__pyx_n_u_E8601TM, __pyx_mstate_global->__pyx_n_u_B8601TM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(7, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_HHMM, __pyx_mstate_global->__pyx_n_u_TOD, __pyx_mstate_global->__pyx_n_u_TIMEAMPM, __pyx_mstate_global->__pyx_n_u_IS8601TM, __pyx_mstate_global->__pyx_n_u_E8601TM, __pyx_mstate_global->__pyx_n_u_B8601TM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_time_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":60 + /* "pyreadstat/_readstat_parser.pyx":61 * #cdef list sas_all_formats = sas_date_formats + sas_datetime_formats + sas_time_formats * cdef list sas_all_formats * cdef object sas_origin = datetime_new(1960, 1, 1, 0, 0, 0, 0, None) # <<<<<<<<<<<<<< * cdef object sas_secs_from_unix = total_seconds(unix_origin - sas_origin) * */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7A8, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7A8, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_origin); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_origin, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":61 + /* "pyreadstat/_readstat_parser.pyx":62 * cdef list sas_all_formats * cdef object sas_origin = datetime_new(1960, 1, 1, 0, 0, 0, 0, None) * cdef object sas_secs_from_unix = total_seconds(unix_origin - sas_origin) # <<<<<<<<<<<<<< * - * cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] + * cdef list spss_datetime_formats = ["DATETIME", "YMDHMS"] */ - __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_sas_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_sas_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 61, __pyx_L1_error) - __pyx_t_4 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_sas_secs_from_unix, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":63 + /* "pyreadstat/_readstat_parser.pyx":64 * cdef object sas_secs_from_unix = total_seconds(unix_origin - sas_origin) * - * cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] # <<<<<<<<<<<<<< - * cdef list spss_date_formats = ["DATE",'DATE8','DATE11', 'DATE12', "ADATE","ADATE8", "ADATE10", "EDATE", 'EDATE8','EDATE10', "JDATE", "JDATE5", "JDATE7", "SDATE", "SDATE8", "SDATE10",] - * cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] + * cdef list spss_datetime_formats = ["DATETIME", "YMDHMS"] # <<<<<<<<<<<<<< + * cdef list spss_date_formats = ["DATE", "ADATE", "EDATE", "JDATE", "SDATE"] + * cdef list spss_time_formats = ["TIME", "DTIME"] */ - __pyx_t_4 = __Pyx_PyList_Pack(9, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_DATETIME8, __pyx_mstate_global->__pyx_n_u_DATETIME17, __pyx_mstate_global->__pyx_n_u_DATETIME20, __pyx_mstate_global->__pyx_kp_u_DATETIME23_2, __pyx_mstate_global->__pyx_n_u_YMDHMS16, __pyx_mstate_global->__pyx_n_u_YMDHMS19, __pyx_mstate_global->__pyx_kp_u_YMDHMS19_2, __pyx_mstate_global->__pyx_n_u_YMDHMS20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_DATETIME, __pyx_mstate_global->__pyx_n_u_YMDHMS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, ((PyObject*)__pyx_t_4)); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_datetime_formats, ((PyObject*)__pyx_t_7)); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":64 + /* "pyreadstat/_readstat_parser.pyx":65 * - * cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] - * cdef list spss_date_formats = ["DATE",'DATE8','DATE11', 'DATE12', "ADATE","ADATE8", "ADATE10", "EDATE", 'EDATE8','EDATE10', "JDATE", "JDATE5", "JDATE7", "SDATE", "SDATE8", "SDATE10",] # <<<<<<<<<<<<<< - * cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] + * cdef list spss_datetime_formats = ["DATETIME", "YMDHMS"] + * cdef list spss_date_formats = ["DATE", "ADATE", "EDATE", "JDATE", "SDATE"] # <<<<<<<<<<<<<< + * cdef list spss_time_formats = ["TIME", "DTIME"] * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats */ - __pyx_t_4 = __Pyx_PyList_Pack(16, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_DATE8, __pyx_mstate_global->__pyx_n_u_DATE11, __pyx_mstate_global->__pyx_n_u_DATE12, __pyx_mstate_global->__pyx_n_u_ADATE, __pyx_mstate_global->__pyx_n_u_ADATE8, __pyx_mstate_global->__pyx_n_u_ADATE10, __pyx_mstate_global->__pyx_n_u_EDATE, __pyx_mstate_global->__pyx_n_u_EDATE8, __pyx_mstate_global->__pyx_n_u_EDATE10, __pyx_mstate_global->__pyx_n_u_JDATE, __pyx_mstate_global->__pyx_n_u_JDATE5, __pyx_mstate_global->__pyx_n_u_JDATE7, __pyx_mstate_global->__pyx_n_u_SDATE, __pyx_mstate_global->__pyx_n_u_SDATE8, __pyx_mstate_global->__pyx_n_u_SDATE10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_n_u_DATE, __pyx_mstate_global->__pyx_n_u_ADATE, __pyx_mstate_global->__pyx_n_u_EDATE, __pyx_mstate_global->__pyx_n_u_JDATE, __pyx_mstate_global->__pyx_n_u_SDATE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, ((PyObject*)__pyx_t_4)); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_date_formats, ((PyObject*)__pyx_t_7)); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":65 - * cdef list spss_datetime_formats = ["DATETIME", "DATETIME8", 'DATETIME17', 'DATETIME20', 'DATETIME23.2',"YMDHMS16","YMDHMS19","YMDHMS19.2", "YMDHMS20"] - * cdef list spss_date_formats = ["DATE",'DATE8','DATE11', 'DATE12', "ADATE","ADATE8", "ADATE10", "EDATE", 'EDATE8','EDATE10', "JDATE", "JDATE5", "JDATE7", "SDATE", "SDATE8", "SDATE10",] - * cdef list spss_time_formats = ["TIME", "DTIME", 'TIME8', 'TIME5', 'TIME11.2'] # <<<<<<<<<<<<<< + /* "pyreadstat/_readstat_parser.pyx":66 + * cdef list spss_datetime_formats = ["DATETIME", "YMDHMS"] + * cdef list spss_date_formats = ["DATE", "ADATE", "EDATE", "JDATE", "SDATE"] + * cdef list spss_time_formats = ["TIME", "DTIME"] # <<<<<<<<<<<<<< * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats * cdef list spss_all_formats */ - __pyx_t_4 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_DTIME, __pyx_mstate_global->__pyx_n_u_TIME8, __pyx_mstate_global->__pyx_n_u_TIME5, __pyx_mstate_global->__pyx_kp_u_TIME11_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_TIME, __pyx_mstate_global->__pyx_n_u_DTIME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, ((PyObject*)__pyx_t_4)); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_time_formats, ((PyObject*)__pyx_t_7)); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":68 + /* "pyreadstat/_readstat_parser.pyx":69 * #cdef list spss_all_formats = spss_date_formats + spss_datetime_formats + spss_time_formats * cdef list spss_all_formats * cdef object spss_origin = datetime_new(1582, 10, 14, 0, 0, 0, 0, None) # <<<<<<<<<<<<<< * cdef object spss_secs_from_unix = total_seconds(unix_origin - spss_origin) * */ - __pyx_t_4 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x62E, 10, 14, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x62E, 10, 14, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_origin, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":69 + /* "pyreadstat/_readstat_parser.pyx":70 * cdef list spss_all_formats * cdef object spss_origin = datetime_new(1582, 10, 14, 0, 0, 0, 0, None) * cdef object spss_secs_from_unix = total_seconds(unix_origin - spss_origin) # <<<<<<<<<<<<<< * * cdef list stata_datetime_formats = ["%tC", "%tc"] */ - __pyx_t_4 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_spss_origin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 69, __pyx_L1_error) - __pyx_t_2 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_4))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_spss_origin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_7))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_spss_secs_from_unix, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":71 + /* "pyreadstat/_readstat_parser.pyx":72 * cdef object spss_secs_from_unix = total_seconds(unix_origin - spss_origin) * * cdef list stata_datetime_formats = ["%tC", "%tc"] # <<<<<<<<<<<<<< * cdef list stata_date_formats = ["%td", "%d", "%tdD_m_Y", "%tdCCYY-NN-DD"] * cdef list stata_time_formats = ["%tcHH:MM:SS", "%tcHH:MM"] */ - __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_kp_u_tC, __pyx_mstate_global->__pyx_kp_u_tc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_kp_u_tC, __pyx_mstate_global->__pyx_kp_u_tc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_datetime_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":72 + /* "pyreadstat/_readstat_parser.pyx":73 * * cdef list stata_datetime_formats = ["%tC", "%tc"] * cdef list stata_date_formats = ["%td", "%d", "%tdD_m_Y", "%tdCCYY-NN-DD"] # <<<<<<<<<<<<<< * cdef list stata_time_formats = ["%tcHH:MM:SS", "%tcHH:MM"] * #cdef list stata_all_formats = stata_datetime_formats + stata_date_formats + stata_time_formats */ - __pyx_t_2 = __Pyx_PyList_Pack(4, __pyx_mstate_global->__pyx_kp_u_td, __pyx_mstate_global->__pyx_kp_u_d_2, __pyx_mstate_global->__pyx_kp_u_tdD_m_Y, __pyx_mstate_global->__pyx_kp_u_tdCCYY_NN_DD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(4, __pyx_mstate_global->__pyx_kp_u_td, __pyx_mstate_global->__pyx_kp_u_d_2, __pyx_mstate_global->__pyx_kp_u_tdD_m_Y, __pyx_mstate_global->__pyx_kp_u_tdCCYY_NN_DD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_date_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":73 + /* "pyreadstat/_readstat_parser.pyx":74 * cdef list stata_datetime_formats = ["%tC", "%tc"] * cdef list stata_date_formats = ["%td", "%d", "%tdD_m_Y", "%tdCCYY-NN-DD"] * cdef list stata_time_formats = ["%tcHH:MM:SS", "%tcHH:MM"] # <<<<<<<<<<<<<< * #cdef list stata_all_formats = stata_datetime_formats + stata_date_formats + stata_time_formats * cdef list stata_all_formats */ - __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_kp_u_tcHH_MM_SS, __pyx_mstate_global->__pyx_kp_u_tcHH_MM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_kp_u_tcHH_MM_SS, __pyx_mstate_global->__pyx_kp_u_tcHH_MM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_time_formats, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":76 + /* "pyreadstat/_readstat_parser.pyx":77 * #cdef list stata_all_formats = stata_datetime_formats + stata_date_formats + stata_time_formats * cdef list stata_all_formats * cdef object stata_origin = datetime_new(1960, 1, 1, 0, 0, 0, 0, None) # <<<<<<<<<<<<<< * cdef object stata_secs_from_unix = total_seconds(unix_origin - stata_origin) * */ - __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7A8, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7A8, 1, 1, 0, 0, 0, 0, Py_None, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_origin); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_origin, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":77 + /* "pyreadstat/_readstat_parser.pyx":78 * cdef list stata_all_formats * cdef object stata_origin = datetime_new(1960, 1, 1, 0, 0, 0, 0, None) * cdef object stata_secs_from_unix = total_seconds(unix_origin - stata_origin) # <<<<<<<<<<<<<< * * cdef dict readstat_to_numpy_types = {READSTAT_TYPE_STRING: object, READSTAT_TYPE_STRING_REF: object, */ - __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_stata_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_v_10pyreadstat_16_readstat_parser_unix_origin, __pyx_v_10pyreadstat_16_readstat_parser_stata_origin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 77, __pyx_L1_error) - __pyx_t_4 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_f_7cpython_8datetime_total_seconds(((PyDateTime_Delta *)__pyx_t_2))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_stata_secs_from_unix, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":79 + /* "pyreadstat/_readstat_parser.pyx":80 * cdef object stata_secs_from_unix = total_seconds(unix_origin - stata_origin) * * cdef dict readstat_to_numpy_types = {READSTAT_TYPE_STRING: object, READSTAT_TYPE_STRING_REF: object, # <<<<<<<<<<<<<< * READSTAT_TYPE_INT8: np.int64, READSTAT_TYPE_INT16: np.int64, READSTAT_TYPE_INT32:np.int64, * READSTAT_TYPE_FLOAT: np.float64, READSTAT_TYPE_DOUBLE: np.float64} */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_STRING_REF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_t_2, __pyx_builtin_object) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":80 + /* "pyreadstat/_readstat_parser.pyx":81 * * cdef dict readstat_to_numpy_types = {READSTAT_TYPE_STRING: object, READSTAT_TYPE_STRING_REF: object, * READSTAT_TYPE_INT8: np.int64, READSTAT_TYPE_INT16: np.int64, READSTAT_TYPE_INT32:np.int64, # <<<<<<<<<<<<<< * READSTAT_TYPE_FLOAT: np.float64, READSTAT_TYPE_DOUBLE: np.float64} * */ - __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_6) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_t_6, __pyx_t_4) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_t_6, __pyx_t_2) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_2) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pyreadstat/_readstat_parser.pyx":81 + /* "pyreadstat/_readstat_parser.pyx":82 * cdef dict readstat_to_numpy_types = {READSTAT_TYPE_STRING: object, READSTAT_TYPE_STRING_REF: object, * READSTAT_TYPE_INT8: np.int64, READSTAT_TYPE_INT16: np.int64, READSTAT_TYPE_INT32:np.int64, * READSTAT_TYPE_FLOAT: np.float64, READSTAT_TYPE_DOUBLE: np.float64} # <<<<<<<<<<<<<< * * cdef class data_container: */ - __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_6) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyLong_From_readstat_type_t(READSTAT_TYPE_DOUBLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < (0)) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_t_6, __pyx_t_4) < (0)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types); - __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, ((PyObject*)__pyx_t_4)); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser_readstat_to_numpy_types, ((PyObject*)__pyx_t_7)); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 - PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_7) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -20842,75 +21704,75 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_14data_container_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_data_container___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 - PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_7) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pyreadstat/_readstat_parser.pyx":131 + /* "pyreadstat/_readstat_parser.pyx":132 * * * class ReadstatError(Exception): # <<<<<<<<<<<<<< * """ * Just defining a custom exception to raise when readstat gives an error return code. */ - __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_mstate_global->__pyx_n_u_ReadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_mstate_global->__pyx_n_u_ReadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_6 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 131, __pyx_L1_error) + if (__pyx_t_4 != __pyx_t_7) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_6, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 - PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_4) < (0)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ReadstatError, __pyx_t_7) < (0)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pyreadstat/_readstat_parser.pyx":138 + /* "pyreadstat/_readstat_parser.pyx":139 * * * class PyreadstatError(Exception): # <<<<<<<<<<<<<< * """ * Just defining a custom exception to raise when pyreadstat raises an exception. */ - __pyx_t_6 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_mstate_global->__pyx_n_u_PyreadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_7 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_mstate_global->__pyx_n_u_PyreadstatError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_kp_u_Just_defining_a_custom_exceptio_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_6 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 139, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_6, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 - PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); + PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_6) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyreadstatError, __pyx_t_4) < (0)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "pyreadstat/_readstat_parser.pyx":846 + /* "pyreadstat/_readstat_parser.pyx":855 * * * cdef object _file_object_ctx = None # <<<<<<<<<<<<<< @@ -20922,37 +21784,37 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); __Pyx_DECREF_SET(__pyx_v_10pyreadstat_16_readstat_parser__file_object_ctx, Py_None); __Pyx_GIVEREF(Py_None); - /* "pyreadstat/_readstat_parser.pyx":1349 + /* "pyreadstat/_readstat_parser.pyx":1367 * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, * disable_datetime_conversion=False, int row_limit=0, int row_offset=0, str output_format=None, list extra_datetime_formats=None, # <<<<<<<<<<<<<< * list extra_date_formats=None, list extra_time_formats=None): * */ - __pyx_t_7 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1349, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyLong_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pyreadstat/_readstat_parser.pyx":1346 + /* "pyreadstat/_readstat_parser.pyx":1364 * return data_frame, metadata * * def parser_entry_point(filename_path, str parser_format=None, # <<<<<<<<<<<<<< * metadataonly=False, dates_as_pandas_datetime=False, * formats_as_category=True, formats_as_ordered_category=False, str encoding=None, list usecols=None, user_missing=False, */ - __pyx_t_4 = PyTuple_Pack(15, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_True), ((PyObject*)Py_False), Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), __pyx_t_7, __pyx_t_2, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_Pack(15, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), ((PyObject*)Py_True), ((PyObject*)Py_False), Py_None, Py_None, ((PyObject*)Py_False), ((PyObject*)Py_False), __pyx_t_6, __pyx_t_2, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_1parser_entry_point, 0, __pyx_mstate_global->__pyx_n_u_parser_entry_point, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10pyreadstat_16_readstat_parser_1parser_entry_point, 0, __pyx_mstate_global->__pyx_n_u_parser_entry_point, NULL, __pyx_mstate_global->__pyx_n_u_pyreadstat__readstat_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parser_entry_point, __pyx_t_2) < (0)) __PYX_ERR(0, 1346, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parser_entry_point, __pyx_t_2) < (0)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "pyreadstat/_readstat_parser.pyx":1 @@ -21004,10 +21866,11 @@ __Pyx_RefNannySetupContext("PyInit__readstat_parser", 0); static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 79, __pyx_L1_error) - __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1065, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1084, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 1201, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; @@ -21031,25 +21894,25 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "pyreadstat/_readstat_parser.pyx":1087 + /* "pyreadstat/_readstat_parser.pyx":1096 * var_format = dc.col_formats[index] * if dtypes[index] != '__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - /* "pyreadstat/_readstat_parser.pyx":1233 + /* "pyreadstat/_readstat_parser.pyx":1251 * except UnicodeError: * warnings.warn("file path could not be encoded with %s which is set as your system encoding, trying to encode it as utf-8. Please set your system encoding correctly." % sys.getfilesystemencoding()) * filename_bytes = os.fsdecode(filename_path).encode("utf-8", "surrogateescape") # <<<<<<<<<<<<<< * else: * if type(filename_path) == str: */ - __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u_utf_8, __pyx_mstate_global->__pyx_n_u_surrogateescape); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 1233, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u_utf_8, __pyx_mstate_global->__pyx_n_u_surrogateescape); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); #if CYTHON_IMMORTAL_CONSTANTS @@ -21101,34 +21964,34 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { - const struct { const unsigned int length: 11; } index[] = {{0},{12},{32},{34},{24},{93},{88},{7},{4},{179},{24},{8},{8},{19},{16},{10},{62},{62},{1},{1},{1},{8},{44},{2},{7},{6},{149},{2},{9},{50},{75},{32},{34},{31},{22},{19},{29},{16},{13},{17},{17},{20},{14},{19},{8},{14},{3},{3},{8},{11},{3},{13},{8},{5},{28},{19},{5},{7},{6},{7},{7},{7},{7},{4},{6},{6},{5},{5},{8},{8},{10},{10},{10},{10},{10},{10},{9},{6},{7},{9},{7},{9},{7},{9},{8},{8},{7},{9},{7},{9},{6},{5},{7},{7},{7},{5},{7},{6},{4},{8},{8},{8},{5},{6},{6},{7},{6},{7},{9},{7},{9},{7},{9},{8},{8},{7},{9},{7},{9},{6},{11},{15},{20},{13},{5},{7},{6},{4},{6},{5},{5},{8},{3},{8},{8},{8},{8},{8},{6},{8},{7},{7},{7},{7},{7},{3},{15},{6},{6},{18},{7},{6},{17},{18},{3},{11},{13},{12},{22},{7},{4},{13},{13},{1},{14},{32},{34},{10},{4},{15},{24},{8},{4},{27},{7},{6},{3},{5},{6},{11},{5},{6},{8},{9},{10},{6},{18},{22},{18},{13},{14},{11},{10},{13},{4},{5},{7},{6},{19},{27},{9},{10},{13},{8},{8},{8},{3},{20},{21},{12},{2},{5},{5},{5},{4},{13},{12},{6},{5},{4},{5},{4},{2},{3},{8},{13},{8},{18},{12},{8},{14},{19},{17},{10},{7},{15},{4},{8},{3},{18},{22},{7},{5},{2},{2},{14},{11},{5},{2},{6},{7},{23},{2},{13},{6},{18},{13},{4},{6},{3},{3},{11},{9},{27},{12},{11},{12},{4},{23},{10},{17},{13},{5},{9},{10},{1},{8},{8},{5},{6},{4},{4},{12},{10},{12},{19},{6},{6},{15},{3},{10},{4},{8},{4},{9},{11},{9},{6},{4},{12},{7},{7},{12},{7},{2},{12},{6},{18},{22},{13},{16},{22},{17},{21},{4},{8},{12},{5},{3},{0},{1446},{310},{9},{283}}; - #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2566 bytes) */ -const char* const cstring = "BZh91AY&SY\317\002\362\226\000\001\264\377\377\346\377y\362c\377\377\375\277\373\377\352\377\377\377\377@@@@@@\000@@\000@@@\000@\000`\no\275y\335=v\356\0077{I\013\266\273\226\007N\264\242\226\306\212\016\373\303\022\021&\325=O\320\322b0S\323MO\"\0324b\000\000\003\322\032h\r4i\221\240hbh\006(Si\251\345OF\251\342F h\323A\221\223\004\000\310\321\202h\032i\2402i\246L\t\210i\203M\004F\241\225?H\217M@h\320\003M\006\200\000\320\003M\000\000\000\000\000\004\247\251\n`\232T\374\251\372\t\352i<\240h\000\000\365\006\200\000\000\000\001\352\000\000\323AJ\003B`\r\023\000\3214\300\000\000\000\004\304\311\200\230\000\000\0004\022$\010\t\244\315&\247\240\2325O\324\310\010\3656\243\324\006\232\000\001\240\000\000z\200\000\362\205\244-I]\334\014^]\261\253\345\327oj\331Q\221\346\001E\262\004o`\031\000\241\024Cw{\365\036\224\177\321l\324\"@\034\032>\001OV\247\374\377\323\252\351\247\247\021f\346\005:\321R\221\035M\301\034\201\366\357\234\007\345\340s\216f\024\2165\230&%\210Q\005J\363\325\324\016\375\002\020\374\347Y\3562B\363\262\230A\n\363\033\263\360\223\214\354a\346\364`3\036\351\237\210\241\006\262ly2-H\"\227\235\300X?J[Y4\250\025F\235\262\223\275\347E+@\034\326+\256*c\370\222@tz\332\246\241]*\302\324\375\2541J\354i\247\021G\030E=\316\205\0109\326\037b\3307\247Y\305O\353\353\367\313\253\202\275\261\211T\344\320\006m\026\345\224a\016\036\t\005\272\240\007j=N\225\371]\031\340t\022\206O\035\t\025F\314\031\301\302\233\007\004\\\275\326\206\276\334\351\352\225M4\211X\231\255\221m\014\004\273\026\204\304\014\300\335\\\303\002\215\3513(\316\366\364\230`D\324\251\222f\250!\035l\310\244\001hX\004UA\201\rK\305\256F\221\021m\0160Z\373\264(\001;B&\373\214\314\3768\277\027\243\335\312\277;\220\370\007h\031.\275\353\351\240\034\3544\003aTmS\336\360\230\373\327\214~\0168#\003\207r\257\260`\275\234r\246Y\364\357\311OC\304Eqj\267B=\236\217Z\225y\205\302R\210\234\213\351{\000\334\016\014\230@\250X$\224\257\244\030\260\325\261\206\367$\246]r\325\356-j*ZB\355L\220:\247^7[\367\333\027\246\031\244\266\234\313\314L\3556\262\202S\301\025 \232\302\033\310\200#Z\025B=J\261,W]y\233.\341\031vT\357r\337\333|L\272\252\351A\341\255\365\221k\020\226$\026\004\337T\204_\026\362\245Bd\234\231\322U\274\2468\343\024\230H\213H;\344\367q\t\3402\303\244\033\013\246\2210&[q\343\2213\030\326C\224\241 /W\336\3300M\322\010T\272)5\035\225\030\211\352Z\005n\3712\212\200\014\323qHG\013U\210D&P\235\033\033\003\023B&\320\332/\262d\022s\034+\315\256cE\373;\244]\262\2502I\222pF&&lA,(\203\005\022,\230\214\364\326\307\026\211cw&\254aY\232jl\337\351\307~E\024I\355@B\r\263\3458Y\361\302Y\307\016|\261\016\034\367\233\232Y8d\330n1W\353-9%\271\241\317\231Z\377\022VE\260e\355\004\0262gOE\024\2530\250c\333N\213\303aH\302\010\307I7\334\245\\\254\265wR\020YUt\0348h-\214\323_t\336\260$]\241\263i/4\315\247ND\276\336\266\270\274\327\233\273\246e\032+X\002F\023\224\366#\203G\027\312\"\275E\330_\201\317\235\261\304\317.\256\354,\211b\235\264E\022\207\204\344el\035\335\233d\211|\244\212\340.\327\021\227\251\313K\216^`\333@\333\003\261:\271\236\001\232LH\251\001\266d\244\023\261v\230\314\241g\346\261}\326{\320/~I%\347\230v\366\365\366dX\342\335\215\315iL\3006\226\320!4 \231GE\273\r\313\307\001b\342\370\276\377\244<\001\014#X\320\031\227X\245F\314@\224\277Q4\204\232\361V\274\256\216\322\275\022\244\340\\\310\252\271\010f\014\032\205\311*\314\300\224*\301\330\340@\271\320\344Th\026\356g""yug\001\206\363\027.\303[k\356x\242g2\271\362%V}\237\036\262\t\354\301#\034\340\006\206V\262\225e\266\3127\347'\017k\347\273\231}\333\210VE\003R\030\024\037\222\223\261\220P\006\254\270l\317+\257cYf\335\361Jt\361_@\336m7#\332\3174\267u\233#:\017\327h\321\275\261\3067H\2238[\212\300\032\344I\036\307\276\320\322\331\326g\"\026#S\232\247\313\216\315\030\223\025\"\020l<\250\016\tb\365k|\227*\227\3235PP%s$B\241\034\261\224\353\200&a%\3710\256\022\265\207\202&\317\266\377\340\263d\r=]\255\275\315\357\337\027\037\010\013\355\001\007i\275\302\023\241\007\203k\377S\363\364\247\207\223\340\030|F\004\030\226a\341Z\020\\508\004\0205h\310qN\201 \343A\301\010\301\320n\267\354\377S\315\224\332j\313\377\027rE8P\220\317\002\362\226"; - PyObject *data = __Pyx_DecompressString(cstring, 2566, 2); + const struct { const unsigned int length: 11; } index[] = {{0},{47},{32},{34},{24},{93},{88},{7},{4},{179},{24},{19},{16},{62},{62},{1},{1},{1},{8},{44},{2},{7},{6},{149},{2},{9},{50},{75},{32},{34},{31},{22},{19},{29},{16},{13},{17},{17},{20},{13},{14},{19},{8},{14},{3},{3},{8},{11},{3},{13},{8},{5},{28},{19},{5},{7},{7},{7},{7},{4},{8},{8},{6},{7},{7},{7},{7},{7},{7},{6},{5},{7},{7},{7},{5},{4},{8},{8},{8},{5},{5},{7},{6},{7},{7},{7},{7},{7},{7},{6},{11},{15},{20},{13},{5},{4},{8},{3},{8},{8},{6},{6},{7},{7},{7},{7},{7},{3},{15},{6},{6},{18},{7},{4},{6},{17},{18},{3},{11},{13},{12},{22},{7},{7},{4},{13},{13},{1},{14},{32},{34},{10},{4},{15},{24},{8},{4},{27},{7},{6},{3},{5},{6},{11},{5},{6},{8},{9},{10},{6},{18},{22},{18},{13},{14},{11},{10},{13},{4},{5},{7},{5},{6},{19},{27},{9},{10},{13},{8},{8},{8},{3},{20},{21},{12},{5},{2},{5},{5},{5},{4},{13},{12},{6},{5},{4},{5},{4},{3},{3},{2},{3},{8},{5},{13},{8},{18},{12},{8},{14},{19},{17},{10},{7},{15},{4},{8},{3},{18},{22},{7},{5},{2},{2},{14},{11},{5},{2},{6},{7},{23},{2},{13},{6},{18},{13},{4},{6},{3},{3},{11},{9},{27},{12},{11},{12},{2},{4},{23},{10},{17},{13},{5},{5},{9},{10},{8},{8},{5},{6},{4},{4},{12},{10},{12},{19},{6},{6},{15},{3},{10},{4},{8},{4},{9},{11},{9},{6},{4},{12},{7},{2},{7},{12},{7},{2},{12},{6},{18},{22},{13},{16},{22},{17},{21},{4},{8},{12},{5},{3},{0},{1446},{310},{9},{283}}; + #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2528 bytes) */ +const char* const cstring = "BZh91AY&SY\341\006 6\000\0023\177\377\346\377y\362g\377\375\375\277\373\377\377\377\377\377\377@@@@@@\000@@\000@@@\000@\000`\n/\275w\275\336\307\243\324\367=\222\031\335\334UKgwq\204r\310\355\203\337|4 \223#I\264i\242\236\321\242\217S\324= oB\215\032=@\323@\017Pi\350\200\332\21520!\246\010\014D\002\0235&F\206\250hh\036\240\00044\000\000\r\000\000\0004\000\000\323A\004\2022\020\320\r\351@hh\001\240\000\320\000\000\000\000\000\000\002S\324\224\321\222\236\324\232i\350\215\r\032\r\000\000\000\000\000\000\000\000\001\240\000\005*0\002i\200\004\311\200\000\000\000L\000\000\000\000\000\000\023\032\t\022\0104\021=M5=MS\364\325=\252z\237\225\017D=F\215\007\250\001\241\3524\032\000\000\006\215\000\r\224HbI\265U\304\204\262V\256\226\216D\324=cp\20626\353\000\342\320\0040\r\215h\376o\357'\235\036\201i\316\021 \016\r\037\004\247\274\251\377\177\364\352\272i\347\260\263s\002\235H\251(\217\356HF\230=\230\346A\233\272\320\236\266\024\215*\314\023\022\304(\202\245\314\212\272\201\340\240B\037\262u\037-\222\027\262\312c\004,\013_\237\204\234gq\217\253\355\342u\260\274\327LY\005T\265BNZ\204F\330B\0004W\351l\352\225\250\023\027\236r\223\275\307E+`\016j+X\243\037\304\222\003\243\325\250\326\025\351\324-\037\257\206,\255\366\310\230B\203\241\257)L}\212Tk\216@V\370\261=&(w=\371 \366\335\255hb8\245|\025<\330\005\345\372\207\265(\222L:{\360\r\343\353\373^c\351\336\000y\007\300\247\243\350\356\333%\303C\304\311\030\256\256\204\212\243ST\320\241\234\222\203\024|\331\207S\313\356\357\305\374\016\203+2\346n)\210Jy\206\tG0\033A\215\376\316\336\230!sH\210q\210\372\340\210;\020 \267e<~\347\311\312zs\311\001\005\023\340\024\001\203\016\246K\310\021\021\022\374\310\\\317\267\365\r\274\254\020s\353\347_\250g\237\272]h\014R\272t\224\010YU\334\275\227\003o\273\230\261\330[,\223\317UyZ\352\261\367\023$\\\343;/\273-;\251\222\350\211\261:\221X)\257\266Q \\v\322\275\304\220A.\230h\005\214\020\241\021V\257R\345+c\266'$\023@\332~\202\236W\373\235\225pu'\006\354\033\260\241\002\215\233L2Zl\006\002\263e\031F""\233\320\232\210\251\022\224\302*\rk\223\216\322\257\366\253P\220\0009RB\365l\24415SlpV%\201t\030\006\363ie\340\331\203\013\220DY\324D\235(a\236\375\205\021\220\021\0043\315I]\213o\327\341J\340\276\305\023\350P%\267\\\222\010\304s-\\hRI\325\352\264\326\245\272\026sc\215Xm<\225e\341|\207\001W\"p\300.5\350\230\024m\240\034*\320;\254j\312\363\017\300\212\335k\256\010\"\355\024\324\016\036vS \203=\023c\355\026\307\273\332g\230\354;\260\024;\374\224\306\307\242\001e\202d\010I\016c\211\014\231>\350@\200X\230\211\007W\234]\177\331G\301\020Lhr\322I\264\331\233M\316\326,\311\365\263<\340~x\361T\207\203&\305\020\323\020\016\363|\032\346\250`q\243\n\022i\252\030\022\211\3408$\033!\357g4G@\342P\240m\2106\210$\210\321v\026\231B\347\352\334a|\336\302\027\3000I\177)\207ggW^\005\307\026\3569\270\3017\272\272\352\001\274\254\202\023B\t\224t[[e\335\001\177n\006\371ZV\267\256<\201\r1\315H\014q8\014\340\301D\0045\230\002\262\020\257\247w\3172\274\372\320\341o.(\245d!\2300k\013\222U\231\201(U\203\245\344\017\266\207\"\206\300\264\302j\036\343v\316\231\210\243\001\251X8-\352\254\3235\\\213\226\0206\370t\352\247\321\034\334\361""\275Z\270\220\364\224\243\n\270\334R\025`*nB\226\341=\037q \034\210\270\202\n\261\0225\020\340>\274w\271\304Q\202\312\234Bi\365\3078\314,\2078\210\357S!\2114`\333\332r\013g\207\036\014\251\251\004\242P;\307B\221\2060\334D4D!Bl},\261\342\212$\322%l\257\343L\302\261a\244\256\224 U\t\245\306Y ss\204$\264y\2478S\272\204\304:\021V*9\027\255\241z\355\334\213\305s\211H#\000\324\227\246\312(\230\300\315\342\033J\253`RA\004\022\034l\332XhfV\002)\307&\017\253\"\005\266#D\2564S\265\036H\231\275^\371\022\253<\335\332H'\246)\026\316\023h`\312\326R\254\267\\\243l\344\341\356}\027\357_J\362\025\310\240s\220\300\240\374\224\235\306A@\032\271p\322\354\362\302C\032\3136\3319\364\361^\261\261\236\343\231\036\236y\245\315\324]\031\320~\371\243V\367G\030\346\221&p\273\212\304\032\344I\036?u\251\255\331\326g\"\025\206\2475O\235\035z\261&*D \320\365\020\034\022\263\347ki.U0\246j\240\241%0\310\203\254!Py\227\310\001\250DNh;@\031\374\242\301(s\325?\351*m\201\253\257\271\273\371\375\357c\023\260\002\353HA\336O\370BT \360Q]\024=}~\362\362\\\tD\304DrAY\304}Hq\254404\003\3201_\233\376\312<\222A\313A\236\021\203\240\316\3363\375N\204\246\323V_\370\273\222)\302\204\207\0101\001\260"; + PyObject *data = __Pyx_DecompressString(cstring, 2528, 2); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2345 bytes) */ -const char* const cstring = "x\332\255XQo\033\271\021V\000\027M\357\232\242i\201^[\240\000\363\220\352.\347(\222\222s\344kpEb9MR\310q\"\367Z\243\010x\364.%m\275Z\256\227\\\313{\271\024y\314\243\037\375\230\307\374\204{\354O\320\243\036\375\023\372\023\372\r\271\273Z\311>\244\311\305\2609\344p8\344\314|\234\341\272{wgs\347ao\263}\263\321\276/\202P\372\314S\321\241L\014\333`F\26183#\025\261C\021\2462\237\0077\221\302gQ:\336\223\tS\003\314&\201\330\013\245\276\017\001\366\274\371\202\371Jj\026)\303\344Q\240\315\225\217\030~\036\245\3320_\016\202(\210\206L0\017c5\206\204'c\023`\023R,\002-\331d$#\273\2076\302\260ap\010e\"b2IT\002\276I\223\010\247\364e\303\352}\037\345qV\252\267\\\247\277\020vz\357\364:\377\214\364\263-\025\311-e$3#Ho8\177\004\032\233\205\001\354\027F\206\031\323&\t<\003o@(b\333\233\333\327ounA\247\217\343\376KzF3\235\356y\241\320\264\025<\266\227\006\241\tp\252,\226\272\301\036\016X\246R\026I\347\336\030r\325\005\206\216\254\245\241\016\253\213\010\216\025tN\216\3450\267\316\374 \301&\360\023\255\276/B-\033\375\235\247\017\267\376b7`\223\300\214\\\010Y\235\202\335j5\3326\350\315\306\315\277E\373\221\232Dl@\241\033\250d,\014X\304\361\205\021v\375n\257\373\240\327o\2557\332\2738d\"\017R\251\rN\032\303>\001\317\301\242\324\304\251\341n9\2143\314\263\247d\3018V\200\222\223\\Z\255B\221\374\177\253\255d\275\361g\341\373\034|\351\2510\035G\254\016\244\325m(\3228\0147jA\002\004\227\\\245\330\321\347\266\004z\360\266+\236\3103>\0259\216\027\217\021\330\n\202\310\264\326\320\334l\243Y\273\205\246\303\003\234\265\2007\3728\317H\341\335\231\005\326A\204k\275/3m]\200\307\207\tUH!\034\003?\034?ci\204\273\005\266K\340)\350\034f\005GEaF}K\003\255\351\200\211@tu1\242\300:\220\3531\014\030\020 \n\244c\007\345\247!\321\304\302\226:\n!D=\003~\254'\346mt\266\352F\352\365F\"!%\225$F\027\001\036(f\016U\340\323y\255\270\365\315\017\317\234\223\nI\360\235\027\234=\315\302\322r\272\254\213\246\252\336\322\322\262\037\035\252\037uC\253\267n\361$\261\341\"\031\352\267*M\322h\231\307\256\225:\260\tJ%)*\354.e\355\177\3068\002M\032\346\305\271F\357#\356r\270\260\217\322\032\336q\221&X\224@\253-:\201\333\267\2367w\370\362<\251\203\332\212\2462\240\016n\265\021\n\366b\236-X\364L\230O\273U\013\342\305\240\334\374\034\227\324P\027\275}\23430\266J\247z~EjK?\345R\252^\364\002q\005\273\206B\213\232\023\026\257Y"";\256>\203KF\365\315k\231\356\315b\273\213s\261^RI\214E\235\005\347\354\302B+\365\027g\ry\177A\257\345,*.Y\347\254-T\333Au\376\345\205\331\312G\257>?~2\255\375\361\265\230}\362\371\233\326\354R}Z\1774}\364l\372,\236\306\007\263K\315i\363\356\364n\177\332\337\237\356\207\263K\020\371\357\317k?\271\370\362\337\307\375\223\013\263\213\2779\026\263\213\277;\271<\373\331'\307\372\344\312\207e\234^\374\305+u\362\344D\234\256\320\364\312O_\036\314.\376\372\270u\272\302^_\310\207\277?\271r\272\362\333\223b\370\253c\014\353\257\017\362\341\225\327\227OW~y\374\361\311Wo.\277\271\361\375\037\246\367\277\236~\375\315\364\0331\273\366\247\357\327\377\363p\332\223S\t\313\016\247\207\337M\277{1\273\266>]\1772}\002\346\340t\345\343Ww\216\017\376\007<\213\241\374"; - PyObject *data = __Pyx_DecompressString(cstring, 2345, 1); + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2288 bytes) */ +const char* const cstring = "x\332\255XQo\033\271\021V\000\027M\357\232\242i\201^[\240\000\003\\*;\261\025;\r\322$\r.p,\247q\n9N\344^\353\336\245\237{ T$C\026\350xO\246\226\2550\253Y\222\333\201\216\331\236\2102Y\314\203\233J\021\2628\033n\313\224\351\036fS%\266#i\036`\001{\276\370\222\205Z\032\026k\313\344\2012\366\322'\014\177\2172cY({*Vq\237\t\026`\254\207X\021\310\304*\034B\202\2052\222\355\017d\354\3160VX\326W{\020&b&\323T\247\340\333,\215\241e([N\356\207\010O\362J\274\343z\371\345b/\367n\347\326W\261y\266\256c\271\256\255dv\200\325+\336\036\312\340\260H\341\376\302\312(g\306\246*\260\260\006\026\305lcuc\341\306\255\033\220\031B\335\177\311\300\032f\262\355 \022\206\216\202\305\2663\025Y\005\255\362D\232\026[\353\261\\g,\226\336\274\t\326\3257XR\331HK\035\326\0241\014+HO\216\355\270n\223\205*\305!\260\023\355~ \"#[\335\315\247k\353\177v\007\260}e\007\336\205\254\371\327x'\326\3731\353\221\253z:\035\n\013\026qBa\205[\277\005UR\271\233Ic\241O\202[\010\330\007zg6\311,\367\233p\005\313\002\247\013S\303D\0030~\345\324n\035\211\364\377\333\355V6[\367D\030r\360e\240\243l\030\263&\360\324t\006\317\222H\005\260w8\217\003b1\364\306j>_z\331\274\034\206\312\020\004\301G\353.\227\010\334:\320Y\024:$nK&cBM\350\355q\331\000\n*\030\220h\262-T\204\017Rfr(>\364ka\334yf\323\2340\205\243\374~\246\334\342\314\366\026n\265\330F$\005PE\022\316\332\016\005R\362M\224\267\372\001\200\346\324\013cMX\025Yd\031\347\251\014\263@r\216\013:\377\305:^\000\234\366\224\2100\033\000\321\226so\275\302alHh\307\205\000MB\323s\021Ez_\206\205q\315\313yXe\302\336\260\340>t\246P\212\235]J\t\022\246\000l\201_\206\330\332\316\2554\023\363\230\230\367l\232\317bE\026\030G\3175^\366x\002\357\311\264\225\344\007\343\351\026|\030\0212ulj\\ MZ5\254\311i\305\"\335\037\000\270-""\214`\241\326\336\365\372d6L\362\332X\327\205y\324\325\031\016HuF^\004R\215\227\326\017\207\317j\243}\221R\0221F\354]\373\026\315]\nn\214\341\335@~q\331\256\\\266\001>\017\037\336\351tJz\247\333\275lC|VV\266\266\026\326\327\027\332m\014\332|\310\267\034N\232\036stq\037\222\2122\230\307\367~\252\201\023o\276\302\301\313\355\345\315\325\373\267n..\265\227=Y\367d\323\221\315\016\315\323w\271\263\341\372\233k\235\325v\273\323\331\332\362\355}OVJ\236#\353\236lx\322mo:)\264u\325\037\345\311\346\252?\303\035\360\360a\247\263\326\365\323\005\335\364t\263\263\026\333\2337\036\321\252N{\2134\351t\332\355\255-\337\336\367d\305\223\266'\353\236lx\322}\274M\271\361q\032J\304@\033\tt\243\362\302*\345z\3167\362\003|i\212\257\313\003\373T\366\236\326\027t\313\273\323\2274\330|\334\376\333\352\352_\210]\320\277ou\332\017;\335R-j\357{R\214\326=\331\360\244\213P\232\212&\221$\222 F~\023&\217\003\245\201\353\024\361\245bi\266E\260\203\351\000\363\201\214Q\002\020\262\2046\336\007\304\221\th\210u\\![\247\"\220\264\036\236\257\005\206\307\001\217\304\266\214\312\001e\267\211>\267zb\005\3100A\226\0134\320\2553\034\034r\227\341\003X\320\327\006\004XH9\235\243\240[\001\035\322\311Q\253J=\201+j\234\237\232GV#[O\255\350\245\224{)\021\343k\2700\334\307\340\324\220\227a^Q\270\261H\323\325\034\367\257\r\243\234t\035P\223Q\212\264\"$\203\273\006\242\252\334/\207\211\315}\".s\254D~p\205X\036\320\311\031\342\010X\201S\320\246\302\035U\372r\314q\207Op\353\034* \274\224\357\007$\221\324t#\277\314u\235W\250G~\342\224<1\210z\221\306<57o\200\350\264\330\341\305\223\221\3506}\235\3465\226\366\2210\236J\365\220\223\325\\G&:\030P\217\024\205[\206I\317\204\222\014\3213\336 \234\367\262\030&\004\364\360\001p\350I\340\361\223\000z\340\221\236\276B\225\227s\253\275\223y\037\240N\006J\305v\351&\232?\\W\024\341hnq\005\205K\314\243\017\245\006\032\017\254\\9S\021\320\315\216\314\2153\006\352\257\2059\"e#\035\221K\207\300\023\2656\030\200H+|\204\270.!\252\244c\354\225\034\035G9\365\035U\306\220\302\251\200\313M9""\"o{\344\233!.\324#\224\224\360\307\t:\314\"\242\251\3032u4\374\212\204\016P9\313\214\333\370t\r\212\365Y@\215\365P\305\"\2427\212\211\223\330\372\2070/\002\263\030\245z\337\270\272\025\357k\227\346\340\\\332\245S\325'\312\313G3w\010\327f\242^\027E\315\325\004\247o\316\023\rG\024\234r\221\035\024\305N'\t\245\313\004eM\244\270\315Y%o\272T\323\252\003`-Q\234\373~\001\203\335\014\227sFI%\355\251\366M\252<~\271\234J$\025C\036\240\253\372\003\013\350\304!l\302#5T\226:\272\327#\227\010\363\307\355@x\n[\233@\000\241\301@\016\361\252\222;\006\241\345\322P\341%\364\212\207S-9\3613\022\225waQ\2713\324\212>\345\007HO\034\376\335-H$^\357\021\347p$\004\222\233\235\253\361\314\261v\354zt}(Y\035\341\327\014]\036\227\301\326\0248\300=\375\213:3\200\"0`\034\"\013xR\037\310\332\273\356\020Zdp\217\326\312\230\"R\375\030\361h+\016\222d\022\211\234\357\253\320\016*.\235]\r\206(EY*\2531~\355\244\242/\247\266\224E\243b\324\325\240wN\371\326\241\327I\t\340\003z\216\177\253\222\215\334\327gvev\334\235g\036*\226/-\216\261\305\227n\236BW\222\363Z\252|\377}U\302\235g\365\343\021\004Es67\322\364f\367m}\305\273\373s\215\357\2711P\224\005\266\270\000\202\371\235W\230\314eS\222\337\303\016Suj\236\371\332\370\341>8e\262:\303\013\237\320\365#\334\274\361\341\367e\037\001ws\r\334\223\315\006\003\221\222\220Z*\243@\200\005\312\231=\255B\322\327-w\266\371\376\2313\022\"-|\357\r\247\265\231\330ZMW\365\321\326\305;Z\335\354\007\273\352\007Eh=\352&5I,\027i\337\274Sh\232\305\323;4G\227>.\343\344\374\317^\353\243'G\342d\206\246g~\374j\367\370\374/\017\227Nf\330\233s\305\360\267G\227Nf~}T\016\177q\210a\363\315n1\274\364\346\342\311\314\317\017?=\372\342\355\305\267\327\276\373\335\350\301\227\243/\277\031}#\216\257\374\351\273\333\377Y\033u\344H\342f{\243\275\027\243\027/\217\257\334\036\335~2z\002f\357d\346\323\327w\017w\377\007N\360l\256"; + PyObject *data = __Pyx_DecompressString(cstring, 2288, 1); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #else /* compression: none (5919 bytes) */ -const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to read number of variablesFile {0} does not exist!\n Just defining a custom exception to raise when readstat gives an error return code.\n \n Just defining a custom exception to raise when pyreadstat raises an exception.\n %tC%tc%tcHH:MM%tcHH:MM:SS%td%tdCCYY-NN-DD%tdD_m_Yutf-8' with date type in column 'wrong parser formatADATEADATE10ADATE8B8601DAB8601DNB8601DTB8601TMDATEDATE11DATE12DATE8DATE9DATEAMPMDATETIMEDATETIME17DATETIME18DATETIME19DATETIME20DATETIME21DATETIME22DATETIME8DDMMYYDDMMYYBDDMMYYB10DDMMYYCDDMMYYC10DDMMYYDDDMMYYD10DDMMYYN6DDMMYYN8DDMMYYPDDMMYYP10DDMMYYSDDMMYYS10DTDATEDTIMEE8601DAE8601DTE8601TMEDATEEDATE10EDATE8HHMMIS8601DAIS8601DTIS8601TMJDATEJDATE5JDATE7MDYAMPMMMDDYYMMDDYYBMMDDYYB10MMDDYYCMMDDYYC10MMDDYYDMMDDYYD10MMDDYYN6MMDDYYN8MMDDYYPMMDDYYP10MMDDYYSMMDDYYS10ObjectOrderedDictPyreadstatError__Pyx_PyDict_NextRefReadstatErrorSDATESDATE10SDATE8TIMETIM""E20TIME5TIME8TIMEAMPMTODWEEKDATEWEEKDATXYMDHMS16YMDHMS19YMDHMS20YYMMDDYYMMDD10YYMMDDBYYMMDDDYYMMDDNYYMMDDPYYMMDDSallallowed_formatsappendastypeasyncio.coroutinesbackendcenter__class_getitem__cline_in_tracebackcolcollectionscolumn_labelscolumn_namescolumn_names_to_labelscolumnscopycounted_valuecreation_timeddata_containerdata_container.__reduce_cython__data_container.__setstate_cython__data_framedatedates_as_pandasdates_as_pandas_datetimedatetimedictdisable_datetime_conversion__doc__doubledtadtypedtypes_duplicatedemptyencodeencodingenumerateexpanduserextendextra_date_formatsextra_datetime_formatsextra_time_formatsfile_encodingfile_extensionfile_formatfile_labelfilename_pathfillfloatfloat64formatformats_as_categoryformats_as_ordered_categoryfrom_dictfrom_epochfromtimestampfsdecodefsencode__func__getget_native_namespacegetfilesystemencoding__getstate__hiint16int32int64int8_is_coroutineis_dichotomyisfileitemskeyslabelleftloloc__main____metaclass__metadatametadata_containermetadataonlymetaonlymissing_rangesmissing_user_valuesmodification_time__module__mr_sets__mro_entries__name__name__nannarwhals.stable.v2no_datetime_conversionnominalnotesnpntnumber_columnsnumber_rowsnumpynwobjectordinaloriginal_variable_typesosoutput_formatpandasparser_entry_pointparser_formatpathpolarspoppor__prepare__pyclassespyreadstat._readstat_parser__pyx_capi____pyx_state__qualname__readreadstat_variable_types__reduce____reduce_cython____reduce_ex__rightrow_limitrow_offsetssas7bcatsas7bdatscaleschemaseekself__set_name__setdefault__setstate____setstate_cython__stablestringsurrogateescapesystable_nametell__test__timetime_unitto_datetimeto_nativetolisttypeundeterminedunknownusecolsuser_missingusernanv2value_labelsvaluesvariable_alignmentvariable_display_widthvariable_listvariable_measurevariable_storage_widthvariable_to_labelvariable_value_labelswarnwarningswith_columnsxportzipPyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, __pyx_t_10pyreadstat_16_readstat_parser_py_fil""e_extension, PyObject *, int, int, PyObject *, int, int, long, long, PyObject *, PyObject *, PyObject *, PyObject *)\000PyObject *(PyObject *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000PyObject *(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, double, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, PyObject *, int, PyObject *, double)\000PyObject *(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000\000__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format (PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format)\000int (char *, readstat_value_t, char *, void *)\000int (int, char *, void *)\000int (int, readstat_variable_t *, char *, void *)\000int (int, readstat_variable_t *, readstat_value_t, void *)\000int (readstat_metadata_t *, void *)\000void (char *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, long, long, struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser *__pyx_optional_args)\000void (readstat_error_t)\000run_conversion\000dict_to_dataframe\000transform_datetime\000data_container_extract_metadata\000data_container_to_dict\000transform_variable_format\000handle_value_label\000handle_note\000handle_variable\000handle_value\000handle_metadata\000run_readstat_parser\000check_exit_statusPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000readstat_to_numpy_types\000sas_all_formats\000sas_date_formats\000sas_datetime_formats\000sas_origin\000sas_time_formats\000spss_all_formats\000spss_date_formats\000spss_datetime_formats\000spss_origin\000spss_time_formats\000stata_all_formats\000stata_date_formats\000stata_datetime_formats\000stata_origin\000stata_time_formats\200\001\330\004\n\210+\220Q\320\000&\240a\330\027+\2501\330\r'\320'J\320J]\320]p\320pq\330\r0\3200A\320AS\320Sk\320kl\330\r+\2501\360\014\000\005\010\200~\220S\230\001\330\010\026\220a\330\010\031""\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\340\010\016\210o\230Q\230a\340\004\031\230\021\330\004\007\200q\330\010\023\2201\340\004 \240\001\330\004\007\200q\330\010\032\230!\340\004\030\230\001\330\004\007\200q\330\010\022\220!\340\004'\240q\330\004\007\200q\330\010!\240\021\340\004\020\220\013\230>\250\021\250/\270\035\320FV\320V`\320`a\330*;\2709\300I\320Me\320ek\320kv\320v|\320|}\330*9\3209Q\320Qe\320ef\340\004\013\210<\220q"; + #else /* compression: none (5694 bytes) */ +const char* const bytes = "^([A-Z][A-Z0-9]+[A-Z])(\\d+)?(?(2)(?:\\.\\d+)?$|$)Failed convert C to python valueFailed to read number of variablesFile {0} does not exist!\n Just defining a custom exception to raise when readstat gives an error return code.\n \n Just defining a custom exception to raise when pyreadstat raises an exception.\n %tC%tc%tcHH:MM%tcHH:MM:SS%td%tdCCYY-NN-DD%tdD_m_Yutf-8' with date type in column 'wrong parser formatADATEB8601DAB8601DNB8601DTB8601TMDATEDATEAMPMDATETIMEDDMMYYDDMMYYBDDMMYYCDDMMYYDDDMMYYNDDMMYYPDDMMYYSDTDATEDTIMEE8601DAE8601DTE8601TMEDATEHHMMIS8601DAIS8601DTIS8601TMInt64JDATEMDYAMPMMMDDYYMMDDYYBMMDDYYCMMDDYYDMMDDYYNMMDDYYPMMDDYYSObjectOrderedDictPyreadstatError__Pyx_PyDict_NextRefReadstatErrorSDATETIMETIMEAMPMTODWEEKDATEWEEKDATXYMDHMSYYMMDDYYMMDDBYYMMDDDYYMMDDNYYMMDDPYYMMDDSallallowed_formatsappendastypeasyncio.coroutinesbackendcastcenter__class_getitem__cline_in_tracebackcolcollectionscolumn_labelscolumn_namescolumn_nam""es_to_labelscolumnscompilecopycounted_valuecreation_timeddata_containerdata_container.__reduce_cython__data_container.__setstate_cython__data_framedatedates_as_pandasdates_as_pandas_datetimedatetimedictdisable_datetime_conversion__doc__doubledtadtypedtypes_duplicatedemptyencodeencodingenumerateexpanduserextendextra_date_formatsextra_datetime_formatsextra_time_formatsfile_encodingfile_extensionfile_formatfile_labelfilename_pathfillfloatfloat64floorformatformats_as_categoryformats_as_ordered_categoryfrom_dictfrom_epochfromtimestampfsdecodefsencode__func__getget_native_namespacegetfilesystemencoding__getstate__grouphiint16int32int64int8_is_coroutineis_dichotomyisfileitemskeyslabelleftlenlitloloc__main__match__metaclass__metadatametadata_containermetadataonlymetaonlymissing_rangesmissing_user_valuesmodification_time__module__mr_sets__mro_entries__name__name__nannarwhals.stable.v2no_datetime_conversionnominalnotesnpntnumber_columnsnumber_rowsnumpynwobjectordinaloriginal_variable_typesosoutput_formatpandasparser_entry_pointparser_formatpathpolarspoppor__prepare__pyclassespyreadstat._readstat_parser__pyx_capi____pyx_state__qualname__rereadreadstat_variable_types__reduce____reduce_cython____reduce_ex__rightroundrow_limitrow_offsetsas7bcatsas7bdatscaleschemaseekself__set_name__setdefault__setstate____setstate_cython__stablestringsurrogateescapesystable_nametell__test__timetime_unitto_datetimeto_nativetolisttypeundeterminedunknownususecolsuser_missingusernanv2value_labelsvaluesvariable_alignmentvariable_display_widthvariable_listvariable_measurevariable_storage_widthvariable_to_labelvariable_value_labelswarnwarningswith_columnsxportzipPyObject *(PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, PyObject *, int, int, PyObject *, int, int, long, long, PyObject *, PyObject *, PyObject *, PyObject *)\000PyObject *(PyObject *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000PyObject ""*(__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format, double, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format, PyObject *, int, PyObject *, double)\000PyObject *(struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *)\000\000__pyx_t_10pyreadstat_16_readstat_parser_py_datetime_format (PyObject *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_format)\000int (char *, readstat_value_t, char *, void *)\000int (int, char *, void *)\000int (int, readstat_variable_t *, char *, void *)\000int (int, readstat_variable_t *, readstat_value_t, void *)\000int (readstat_metadata_t *, void *)\000void (char *, struct __pyx_obj_10pyreadstat_16_readstat_parser_data_container *, __pyx_t_10pyreadstat_16_readstat_parser_py_file_extension, long, long, struct __pyx_opt_args_10pyreadstat_16_readstat_parser_run_readstat_parser *__pyx_optional_args)\000void (readstat_error_t)\000run_conversion\000dict_to_dataframe\000transform_datetime\000data_container_extract_metadata\000data_container_to_dict\000transform_variable_format\000handle_value_label\000handle_note\000handle_variable\000handle_value\000handle_metadata\000run_readstat_parser\000check_exit_statusPyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000readstat_to_numpy_types\000sas_all_formats\000sas_date_formats\000sas_datetime_formats\000sas_origin\000sas_time_formats\000spss_all_formats\000spss_date_formats\000spss_datetime_formats\000spss_origin\000spss_time_formats\000stata_all_formats\000stata_date_formats\000stata_datetime_formats\000stata_origin\000stata_time_formats\200\001\330\004\n\210+\220Q\320\000&\240a\330\027+\2501\330\r'\320'J\320J]\320]p\320pq\330\r0\3200A\320AS\320Sk\320kl\330\r+\2501\360\014\000\005\010\200~\220S\230\001\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010""\031\230\021\330\t\027\220s\230!\330\010\026\220a\330\010\031\230\021\340\010\016\210o\230Q\230a\340\004\031\230\021\330\004\007\200q\330\010\023\2201\340\004 \240\001\330\004\007\200q\330\010\032\230!\340\004\030\230\001\330\004\007\200q\330\010\022\220!\340\004'\240q\330\004\007\200q\330\010!\240\021\340\004\020\220\013\230>\250\021\250/\270\035\320FV\320V`\320`a\330*;\2709\300I\320Me\320ek\320kv\320v|\320|}\330*9\3209Q\320Qe\320ef\340\004\013\210<\220q"; PyObject *data = NULL; CYTHON_UNUSED_VAR(__Pyx_DecompressString); #endif PyObject **stringtab = __pyx_mstate->__pyx_string_tab; Py_ssize_t pos = 0; - for (int i = 0; i < 319; i++) { + for (int i = 0; i < 290; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); - if (likely(string) && i >= 56) PyUnicode_InternInPlace(&string); + if (likely(string) && i >= 54) PyUnicode_InternInPlace(&string); if (unlikely(!string)) { Py_XDECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) @@ -21136,7 +21999,7 @@ const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to stringtab[i] = string; pos += bytes_length; } - for (int i = 319; i < 324; i++) { + for (int i = 290; i < 295; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; @@ -21147,14 +22010,14 @@ const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to } } Py_XDECREF(data); - for (Py_ssize_t i = 0; i < 324; i++) { + for (Py_ssize_t i = 0; i < 295; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { - PyObject **table = stringtab + 319; + PyObject **table = stringtab + 290; for (Py_ssize_t i=0; i<5; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #if PY_VERSION_HEX < 0x030E0000 @@ -21173,7 +22036,15 @@ const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to #endif } { - PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; + PyObject **numbertab = __pyx_mstate->__pyx_number_tab; + double const c_constants[] = {1e6}; + for (int i = 0; i < 1; i++) { + numbertab[i] = PyFloat_FromDouble(c_constants[i]); + if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + { + PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 1; int8_t const cint_constants_1[] = {0,1}; int32_t const cint_constants_4[] = {100000L}; for (int i = 0; i < 3; i++) { @@ -21184,7 +22055,7 @@ const char* const bytes = "DATETIME23.2Failed convert C to python valueFailed to #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_number_tab; - for (Py_ssize_t i=0; i<3; ++i) { + for (Py_ssize_t i=0; i<4; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) @@ -21238,7 +22109,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {16, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1346}; + const __Pyx_PyCode_New_function_description descr = {16, 0, 0, 24, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1364}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_filename_path, __pyx_mstate->__pyx_n_u_parser_format, __pyx_mstate->__pyx_n_u_metadataonly, __pyx_mstate->__pyx_n_u_dates_as_pandas_datetime, __pyx_mstate->__pyx_n_u_formats_as_category, __pyx_mstate->__pyx_n_u_formats_as_ordered_category, __pyx_mstate->__pyx_n_u_encoding, __pyx_mstate->__pyx_n_u_usecols, __pyx_mstate->__pyx_n_u_user_missing, __pyx_mstate->__pyx_n_u_disable_datetime_conversion, __pyx_mstate->__pyx_n_u_row_limit, __pyx_mstate->__pyx_n_u_row_offset, __pyx_mstate->__pyx_n_u_output_format, __pyx_mstate->__pyx_n_u_extra_datetime_formats, __pyx_mstate->__pyx_n_u_extra_date_formats, __pyx_mstate->__pyx_n_u_extra_time_formats, __pyx_mstate->__pyx_n_u_file_format, __pyx_mstate->__pyx_n_u_file_extension, __pyx_mstate->__pyx_n_u_metaonly, __pyx_mstate->__pyx_n_u_dates_as_pandas, __pyx_mstate->__pyx_n_u_usernan, __pyx_mstate->__pyx_n_u_no_datetime_conversion, __pyx_mstate->__pyx_n_u_data_frame, __pyx_mstate->__pyx_n_u_metadata}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_pyreadstat__readstat_parser_pyx, __pyx_mstate->__pyx_n_u_parser_entry_point, __pyx_mstate->__pyx_kp_b_iso88591_a_1_JJ_ppq_00AASSkkl_1_S_a_s_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } @@ -22652,14 +23523,6 @@ static int __Pyx_ParseKeywords( return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); } -/* ModFloat[double] */ -static CYTHON_INLINE double __Pyx_mod_double(double a, double b, int b_is_constant) { - CYTHON_UNUSED_VAR(b_is_constant); - double r = fmod(a, b); - r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; - return r; -} - /* PyObjectFastCallMethod */ #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { @@ -22673,6 +23536,14 @@ static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const * } #endif +/* ModFloat[double] */ +static CYTHON_INLINE double __Pyx_mod_double(double a, double b, int b_is_constant) { + CYTHON_UNUSED_VAR(b_is_constant); + double r = fmod(a, b); + r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; + return r; +} + /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; @@ -23581,54 +24452,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_keys, d); } -/* PyObjectSetAttrStr */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_setattro)) - return tp->tp_setattro(obj, attr_name, value); - return PyObject_SetAttr(obj, attr_name, value); -} -#endif - -/* RaiseTooManyValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/* RaiseNeedMoreValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/* IterFinish */ -static CYTHON_INLINE int __Pyx_IterFinish(void) { - PyObject* exc_type; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - exc_type = __Pyx_PyErr_CurrentExceptionType(); - if (unlikely(exc_type)) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) - return -1; - __Pyx_PyErr_Clear(); - return 0; - } - return 0; -} - -/* UnpackItemEndCheck */ -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } - return __Pyx_IterFinish(); -} - /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { @@ -23679,6 +24502,141 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { } #endif +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla; + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op1); + } + const int is_positive = __Pyx_PyLong_IsPos(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + if (likely(size == 1)) { + a = (long) digits[0]; + if (!is_positive) a *= -1; + } else { + switch (size) { + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if (!is_positive) a *= -1; + goto calculate_long; + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + if (!is_positive) lla *= -1; + goto calculate_long_long; + } + break; + } + return PyLong_Type.tp_as_number->nb_remainder(op1, op2); + } + calculate_long: + { + long x = a % b; + x += ((x != 0) & ((x ^ b) < 0)) * b; + return PyLong_FromLong(x); + } + calculate_long_long: + { + PY_LONG_LONG llx = lla % llb; + llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb; + return PyLong_FromLongLong(llx); + } + +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyLong_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_RemainderObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + return __Pyx_Fallback___Pyx_PyLong_RemainderObjC(op1, op2, inplace); +} +#endif + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + /* HasAttr */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { From 469dbe286e6c62ad3159c4ed4018e2e05fb50ca5 Mon Sep 17 00:00:00 2001 From: Otto Fajardo Date: Tue, 19 May 2026 13:45:35 +0200 Subject: [PATCH 7/7] adapting tests for python 3.10 --- tests/test_narwhalified.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_narwhalified.py b/tests/test_narwhalified.py index 01cfb0c..3d9ec46 100644 --- a/tests/test_narwhalified.py +++ b/tests/test_narwhalified.py @@ -180,9 +180,14 @@ def _prepare_data(self): df_fractional_seconds1 = df_fractional_seconds_raw.clone() df_fractional_seconds1 = df_fractional_seconds1.to_native() if backend == "pandas": - df_fractional_seconds1["date"] = pd.to_datetime(df_fractional_seconds1["date"]) + if is_pandas_version_newer_than_2: + df_fractional_seconds1["date"] = pd.to_datetime(df_fractional_seconds1["date"]) + df_fractional_seconds1["dtime"] = pd.to_datetime(df_fractional_seconds1["dtime"]) + else: + df_fractional_seconds1["date"] = pd.Series(np.array(df_fractional_seconds1["date"], dtype="datetime64[D]")) + df_fractional_seconds1["dtime"] = pd.Series(np.array(df_fractional_seconds1["dtime"], dtype="datetime64[us]")) + df_fractional_seconds1["dtime"] = df_fractional_seconds1["dtime"].dt.to_pydatetime() df_fractional_seconds1["date"] = df_fractional_seconds1["date"].apply(lambda x: x.date()) - df_fractional_seconds1["dtime"] = pd.to_datetime(df_fractional_seconds1["dtime"]) df_fractional_seconds1["time"] = pd.to_datetime(df_fractional_seconds1["time"], format='%H:%M:%S.%f') df_fractional_seconds1["time"] = df_fractional_seconds1["time"].apply(lambda x: x.time()) self.df_sas_fractional_seconds = df_fractional_seconds1