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
5ca88d2b
Commit
5ca88d2b
authored
Jan 01, 2013
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get the core to compile --disable-unicode
parent
14224420
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Modules/sre.h
Modules/sre.h
+4
-0
Objects/fileobject.c
Objects/fileobject.c
+3
-1
No files found.
Modules/sre.h
View file @
5ca88d2b
...
@@ -15,7 +15,11 @@
...
@@ -15,7 +15,11 @@
/* size of a code word (must be unsigned short or larger, and
/* size of a code word (must be unsigned short or larger, and
large enough to hold a UCS4 character) */
large enough to hold a UCS4 character) */
#ifdef Py_USING_UNICODE
#define SRE_CODE Py_UCS4
#define SRE_CODE Py_UCS4
#else
#define SRE_CODE unsigned long
#endif
typedef
struct
{
typedef
struct
{
PyObject_VAR_HEAD
PyObject_VAR_HEAD
...
...
Objects/fileobject.c
View file @
5ca88d2b
...
@@ -1816,7 +1816,6 @@ file_write(PyFileObject *f, PyObject *args)
...
@@ -1816,7 +1816,6 @@ file_write(PyFileObject *f, PyObject *args)
n
=
pbuf
.
len
;
n
=
pbuf
.
len
;
}
}
else
{
else
{
const
char
*
encoding
,
*
errors
;
PyObject
*
text
;
PyObject
*
text
;
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
text
))
if
(
!
PyArg_ParseTuple
(
args
,
"O"
,
&
text
))
return
NULL
;
return
NULL
;
...
@@ -1824,7 +1823,9 @@ file_write(PyFileObject *f, PyObject *args)
...
@@ -1824,7 +1823,9 @@ file_write(PyFileObject *f, PyObject *args)
if
(
PyString_Check
(
text
))
{
if
(
PyString_Check
(
text
))
{
s
=
PyString_AS_STRING
(
text
);
s
=
PyString_AS_STRING
(
text
);
n
=
PyString_GET_SIZE
(
text
);
n
=
PyString_GET_SIZE
(
text
);
#ifdef Py_USING_UNICODE
}
else
if
(
PyUnicode_Check
(
text
))
{
}
else
if
(
PyUnicode_Check
(
text
))
{
const
char
*
encoding
,
*
errors
;
if
(
f
->
f_encoding
!=
Py_None
)
if
(
f
->
f_encoding
!=
Py_None
)
encoding
=
PyString_AS_STRING
(
f
->
f_encoding
);
encoding
=
PyString_AS_STRING
(
f
->
f_encoding
);
else
else
...
@@ -1838,6 +1839,7 @@ file_write(PyFileObject *f, PyObject *args)
...
@@ -1838,6 +1839,7 @@ file_write(PyFileObject *f, PyObject *args)
return
NULL
;
return
NULL
;
s
=
PyString_AS_STRING
(
encoded
);
s
=
PyString_AS_STRING
(
encoded
);
n
=
PyString_GET_SIZE
(
encoded
);
n
=
PyString_GET_SIZE
(
encoded
);
#endif
}
else
{
}
else
{
if
(
PyObject_AsCharBuffer
(
text
,
&
s
,
&
n
))
if
(
PyObject_AsCharBuffer
(
text
,
&
s
,
&
n
))
return
NULL
;
return
NULL
;
...
...
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