Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
727fe66f
Commit
727fe66f
authored
Jan 26, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add _iconv_codec to Setup.dist. Use PyModule_ functions.
parent
692d292c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
Modules/Setup.dist
Modules/Setup.dist
+3
-0
Modules/_iconv_codec.c
Modules/_iconv_codec.c
+3
-8
No files found.
Modules/Setup.dist
View file @
727fe66f
...
...
@@ -474,6 +474,9 @@ GLHACK=-Dclear=__GLclear
#EXPAT_DIR=/usr/local/src/expat-1.95.2
#pyexpat pyexpat.c -DHAVE_EXPAT_H -I$(EXPAT_DIR)/lib -L$(EXPAT_DIR) -lexpat
# Wrapper for iconv(3). This requires either GNU iconv, or a native
# iconv implementation (only Linux, Solaris, and BSD are known to work)
#_iconv_codec _iconv_codec -I$(prefix)/include -L$(exec_prefix)/lib -liconv
# Example -- included for reference only:
# xx xxmodule.c
...
...
Modules/_iconv_codec.c
View file @
727fe66f
...
...
@@ -603,17 +603,12 @@ static struct PyMethodDef _iconv_codec_methods[] = {
void
init_iconv_codec
(
void
)
{
PyObject
*
m
,
*
d
,
*
t
;
PyObject
*
m
;
m
=
Py_InitModule
(
"_iconv_codec"
,
_iconv_codec_methods
);
d
=
PyModule_GetDict
(
m
);
t
=
PyString_FromString
(
__version__
);
PyDict_SetItemString
(
d
,
"__version__"
,
t
);
Py_DECREF
(
t
);
PyDict_SetItemString
(
d
,
"iconvcodec"
,
(
PyObject
*
)(
&
iconvcodec_Type
));
PyModule_AddStringConstant
(
m
,
"__version__"
,
(
char
*
)
__version__
);
PyModule_AddObject
(
m
,
"iconvcodec"
,
(
PyObject
*
)(
&
iconvcodec_Type
));
PyModule_AddStringConstant
(
m
,
"internal_encoding"
,
UNICODE_ENCODING
);
if
(
PyErr_Occurred
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment