Skip to content

Commit 59487f7

Browse files
gotohbodograumann
andauthored
Fix to build on windows (#8)
* adapt type of 'inbuf' for iconv() 'inbuf' should not be const to used as 2nd arg (char **) of iconv(). * specify library to link explicitly When building visual studio 2022, linker cause error 'libiconv_open is resolved ...' without this fix. * Run black formatter * Bump version --------- Co-authored-by: Bodo Graumann <mail@bodograumann.de>
1 parent d4f12a5 commit 59487f7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

iconvmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Iconv_iconv(IconvObject *self, PyObject *args, PyObject* kwargs)
5656
{
5757
PyObject *inbuf_obj;
5858
Py_buffer inbuf_view;
59-
const char *inbuf;
59+
char *inbuf;
6060
char *outbuf;
6161
size_t inbuf_size, outbuf_size, iresult;
6262
long int inbuf_size_int, outbuf_size_int = -1;

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="python-iconv",
5-
version="1.1.2",
5+
version="1.1.3",
66
description="iconv-based Unicode converter",
77
author="Bodo Graumann",
88
author_email="mail@bodograumann.de",
@@ -15,5 +15,5 @@
1515
all iconv-provided encodings.
1616
""",
1717
py_modules=["iconvcodec"],
18-
ext_modules=[Extension("iconv", sources=["iconvmodule.c"])],
18+
ext_modules=[Extension("iconv", sources=["iconvmodule.c"], libraries=["iconv"])],
1919
)

0 commit comments

Comments
 (0)