From 7fc346a3d1cf489c35ca040115facc03cc291bf7 Mon Sep 17 00:00:00 2001 From: Brett Dutro Date: Fri, 9 Aug 2024 09:42:23 -0500 Subject: [PATCH] Fix stfpy compilation errors when using Cython 0.29.x - Cython 3.x still compiles correctly with these changes --- stfpy/stfpy/stf_inst_reader.pxd | 4 ++-- stfpy/stfpy/stf_lib/stf_inst_reader.pxd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stfpy/stfpy/stf_inst_reader.pxd b/stfpy/stfpy/stf_inst_reader.pxd index 9790186..3531d71 100644 --- a/stfpy/stfpy/stf_inst_reader.pxd +++ b/stfpy/stfpy/stf_inst_reader.pxd @@ -13,8 +13,8 @@ cdef class HeaderCommentsTypeIterator: @staticmethod cdef inline HeaderCommentsTypeIterator _construct(const _HeaderCommentsType* vec): it = HeaderCommentsTypeIterator() - it.c_it = dereference(vec).begin() - it.c_end_it = dereference(vec).end() + it.c_it = dereference(vec).const_begin() + it.c_end_it = dereference(vec).const_end() return it cdef class HeaderCommentsType: diff --git a/stfpy/stfpy/stf_lib/stf_inst_reader.pxd b/stfpy/stfpy/stf_lib/stf_inst_reader.pxd index dcd7176..3ea56bc 100644 --- a/stfpy/stfpy/stf_lib/stf_inst_reader.pxd +++ b/stfpy/stfpy/stf_lib/stf_inst_reader.pxd @@ -2,7 +2,7 @@ from libc.stdint cimport * from libcpp.vector cimport vector -from cython.cimports.libcpp.string import string +from libcpp.string cimport string from stfpy.stf_lib.stf_inst cimport STFInst ctypedef vector[string] HeaderCommentsType