head 1.6; access; symbols pkgsrc-2025Q4:1.5.0.112 pkgsrc-2025Q4-base:1.5 pkgsrc-2025Q3:1.5.0.110 pkgsrc-2025Q3-base:1.5 pkgsrc-2025Q2:1.5.0.108 pkgsrc-2025Q2-base:1.5 pkgsrc-2025Q1:1.5.0.106 pkgsrc-2025Q1-base:1.5 pkgsrc-2024Q4:1.5.0.104 pkgsrc-2024Q4-base:1.5 pkgsrc-2024Q3:1.5.0.102 pkgsrc-2024Q3-base:1.5 pkgsrc-2024Q2:1.5.0.100 pkgsrc-2024Q2-base:1.5 pkgsrc-2024Q1:1.5.0.98 pkgsrc-2024Q1-base:1.5 pkgsrc-2023Q4:1.5.0.96 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.94 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.92 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.90 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.88 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.86 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.84 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.82 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.80 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.78 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.76 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.74 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.72 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.70 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.66 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.46 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.68 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.64 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.62 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.60 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.58 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.56 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.54 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.52 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.50 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.48 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.44 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.42 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.40 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.38 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.36 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.34 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.32 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.30 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.28 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.26 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.24 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.22 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.20 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.18 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.16 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.14 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.12 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.10 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.8 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.6 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.4 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.2 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.3.0.18 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.16 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.14 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.12 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.10 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.8 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.6 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.4 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.2 pkgsrc-2009Q4-base:1.3; locks; strict; comment @# @; 1.6 date 2026.01.15.11.29.53; author adam; state dead; branches; next 1.5; commitid Ri0AdlqzHxLZTtqG; 1.5 date 2012.02.07.09.04.56; author obache; state Exp; branches; next 1.4; 1.4 date 2012.02.05.22.27.09; author sbd; state Exp; branches; next 1.3; 1.3 date 2010.01.06.11.20.30; author drochner; state Exp; branches; next 1.2; 1.2 date 2009.12.16.16.53.09; author drochner; state Exp; branches; next 1.1; 1.1 date 2009.11.29.23.04.15; author dholland; state Exp; branches; next ; desc @@ 1.6 log @py-id3lib: removed; last update 2003-02-16 @ text @$NetBSD: patch-aa,v 1.5 2012/02/07 09:04:56 obache Exp $ * Fix for LP64 on python > 2.4. * `strchr' for `const char*' may return `const char*'. --- pyid3lib.cc.orig 2003-02-16 23:50:20.000000000 +0000 +++ pyid3lib.cc @@@@ -10,6 +10,17 @@@@ #include #include +#if defined(PY_MAJOR_VERSION) && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 +typedef int Py_ssize_t; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +#define LENFUNC inquiry +#else +#define LENFUNC lenfunc +#endif + typedef struct { PyObject_HEAD @@@@ -61,11 +72,11 @@@@ static PyObject* dict_from_frame( ID3_Fr static ID3_Frame* frame_from_dict( PyObject* dict ); static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict ); -static int id3_length( ID3Object* self ); -static PyObject* id3_item( ID3Object* self, int index ); -static PyObject* id3_slice( ID3Object* self, int start, int end ); -static int id3_ass_item( ID3Object* self, int index, PyObject* dict ); -static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dict ); +static Py_ssize_t id3_length( ID3Object* self ); +static PyObject* id3_item( ID3Object* self, Py_ssize_t index ); +static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end ); +static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict ); +static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dict ); static int id3_contains( ID3Object* self, PyObject* other ); static PyObject* id3_append( ID3Object* self, PyObject* args ); @@@@ -80,13 +91,13 @@@@ static PyObject* frameid_lookup = NULL; static PySequenceMethods tag_as_sequence = { - (inquiry)id3_length, + (LENFUNC)id3_length, NULL, NULL, - (intargfunc)id3_item, - (intintargfunc)id3_slice, - (intobjargproc)id3_ass_item, - (intintobjargproc)id3_ass_slice, + (ssizeargfunc)id3_item, + (ssizessizeargfunc)id3_slice, + (ssizeobjargproc)id3_ass_item, + (ssizessizeobjargproc)id3_ass_slice, (objobjproc)id3_contains, NULL, NULL, @@@@ -236,12 +247,12 @@@@ static PyObject* id3iter_iternext( ID3It // ///////////////// -static int id3_length( ID3Object* self ) +static Py_ssize_t id3_length( ID3Object* self ) { return self->size; } -static PyObject* id3_item( ID3Object* self, int index ) +static PyObject* id3_item( ID3Object* self, Py_ssize_t index ) { if ( index < 0 ) index += self->size; @@@@ -255,7 +266,7 @@@@ static PyObject* id3_item( ID3Object* se return dict_from_frame( self->frames[index] ); } -static PyObject* id3_slice( ID3Object* self, int start, int end ) +static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end ) { PyObject* result; int i; @@@@ -284,7 +295,7 @@@@ static PyObject* id3_slice( ID3Object* s } -static int id3_ass_item( ID3Object* self, int index, PyObject* dict ) +static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict ) { ID3_Frame* newframe; @@@@ -382,7 +393,7 @@@@ static ID3_Frame** frames_from_dictseq( return NULL; } -static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dictseq ) +static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dictseq ) { int i, n; int newsize; @@@@ -824,7 +835,7 @@@@ static ID3_Frame* frame_from_dict( PyObj static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict ) { char* data; - int size; + Py_ssize_t size; ID3_Field* field; ID3_FieldID flid; @@@@ -1013,7 +1024,7 @@@@ static PyObject* id3_getattr( ID3Object* { ID3_Frame* frame; const char* str; - char* slash; + const char* slash; ID3_Field* fld; int i; @ 1.5 log @change the last fix to safe way. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.4 2012/02/05 22:27:09 sbd Exp $ @ 1.4 log @Add a cast to a strchr call. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.3 2010/01/06 11:20:30 drochner Exp $ d3 2 a4 1 Fix for LP64 on python > 2.4. d95 1 a95 1 @@@@ -382,7 +393,7 @@@@ static ID3_Frame** frames_from_dictseq( d113 9 a121 9 @@@@ -1054,7 +1065,7 @@@@ static PyObject* id3_getattr( ID3Object* fld = frame->GetField( ID3FN_TEXT ); str = fld->GetRawText(); - if ( (slash = strchr( str, '/' )) != NULL ) + if ( (slash = (char *)strchr( str, '/' )) != NULL ) result = Py_BuildValue( "ii", atoi( str ), atoi( slash+1 ) ); else result = Py_BuildValue( "(i)", atoi( str ) ); @ 1.3 log @restore the patch's comment which got lost in last commit @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.2 2009/12/16 16:53:09 drochner Exp $ d94 1 a94 1 @@@@ -382,7 +393,7 @@@@ static ID3_Frame** frames_from_dictseq( d112 9 @ 1.2 log @fix the LP64 patch so that it doesn't prevent building on Python<2.5 @ text @d1 3 a3 1 $NetBSD$ @ 1.1 log @Fix this to build on LP64 with python 2.5+. I added hacks so it should still build on python 2.4, but I haven't tested them. @ text @d3 3 a5 5 Fix for LP64 on python > 2.4. --- pyid3lib.cc.orig 2003-02-16 18:50:20.000000000 -0500 +++ pyid3lib.cc 2009-11-29 18:02:46.000000000 -0500 @@@@ -10,6 +10,14 @@@@ d15 3 d23 1 a23 1 @@@@ -61,11 +69,11 @@@@ static PyObject* dict_from_frame( ID3_Fr d40 1 a40 1 @@@@ -80,13 +88,13 @@@@ static PyObject* frameid_lookup = NULL; d45 1 a45 1 + (lenfunc)id3_length, d59 1 a59 1 @@@@ -236,12 +244,12 @@@@ static PyObject* id3iter_iternext( ID3It d74 1 a74 1 @@@@ -255,7 +263,7 @@@@ static PyObject* id3_item( ID3Object* se d83 1 a83 1 @@@@ -284,7 +292,7 @@@@ static PyObject* id3_slice( ID3Object* s d92 1 a92 1 @@@@ -382,7 +390,7 @@@@ static ID3_Frame** frames_from_dictseq( d101 1 a101 1 @@@@ -824,7 +832,7 @@@@ static ID3_Frame* frame_from_dict( PyObj @