Commits
David B. Evans authored 97c07a29479
1 - | --- pyid3lib.cc~ 2003-02-16 15:50:20.000000000 -0800 |
2 - | +++ pyid3lib.cc 2008-03-21 14:27:32.000000000 -0700 |
1 + | --- pyid3lib.cc.orig 2003-02-16 15:50:20.000000000 -0800 |
2 + | +++ pyid3lib.cc 2018-02-02 23:52:19.000000000 -0800 |
3 3 | |
4 4 | |
5 5 | |
6 6 | static PySequenceMethods tag_as_sequence = { |
7 7 | - (inquiry)id3_length, |
8 8 | + (lenfunc)id3_length, |
9 9 | NULL, |
10 10 | NULL, |
11 11 | - (intargfunc)id3_item, |
12 12 | - (intintargfunc)id3_slice, |
21 21 | NULL, |
22 22 | |
23 23 | static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict ) |
24 24 | { |
25 25 | char* data; |
26 26 | - int size; |
27 27 | + Py_ssize_t size; |
28 28 | |
29 29 | ID3_Field* field; |
30 30 | ID3_FieldID flid; |
31 + | |
32 + | fld = frame->GetField( ID3FN_TEXT ); |
33 + | str = fld->GetRawText(); |
34 + | |
35 + | - if ( (slash = strchr( str, '/' )) != NULL ) |
36 + | + if ( (slash = (char *) strchr( str, '/' )) != NULL ) |
37 + | result = Py_BuildValue( "ii", atoi( str ), atoi( slash+1 ) ); |
38 + | else |
39 + | result = Py_BuildValue( "(i)", atoi( str ) ); |