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
3023f788
Commit
3023f788
authored
Jun 11, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify some convolution by simply not recognizing 'q' and 'Q' at all
in native mode on platforms that don't HAVE_LONG_LONG.
parent
be800855
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
Modules/structmodule.c
Modules/structmodule.c
+0
-33
No files found.
Modules/structmodule.c
View file @
3023f788
...
...
@@ -72,11 +72,6 @@ typedef struct { char c; void *x; } s_void_p;
#ifdef HAVE_LONG_LONG
typedef
struct
{
char
c
;
LONG_LONG
x
;
}
s_long_long
;
#define LONG_LONG_ALIGN (sizeof(s_long_long) - sizeof(LONG_LONG))
#else
static
char
qQ_error_msg
[]
=
"q and Q unavailable in native mode on this platform; use a standard mode.
\0
"
;
#endif
#define STRINGIFY(x) #x
...
...
@@ -578,16 +573,6 @@ nu_ulonglong(const char *p, const formatdef *f)
{
return
PyLong_FromUnsignedLongLong
(
*
(
unsigned
LONG_LONG
*
)
p
);
}
#else
static
PyObject
*
nu_qQerror
(
const
char
*
p
,
const
formatdef
*
f
)
{
PyErr_SetString
(
StructError
,
qQ_error_msg
);
return
NULL
;
}
#endif
static
PyObject
*
...
...
@@ -746,16 +731,6 @@ np_ulonglong(char *p, PyObject *v, const formatdef *f)
*
(
unsigned
LONG_LONG
*
)
p
=
x
;
return
0
;
}
#else
static
int
np_qQerror
(
char
*
p
,
PyObject
*
v
,
const
formatdef
*
f
)
{
PyErr_SetString
(
StructError
,
qQ_error_msg
);
return
-
1
;
}
#endif
static
int
...
...
@@ -818,14 +793,6 @@ static formatdef native_table[] = {
#ifdef HAVE_LONG_LONG
{
'q'
,
sizeof
(
LONG_LONG
),
LONG_LONG_ALIGN
,
nu_longlong
,
np_longlong
},
{
'Q'
,
sizeof
(
LONG_LONG
),
LONG_LONG_ALIGN
,
nu_ulonglong
,
np_ulonglong
},
#else
/* n[pu]_qQerror just raise errors, but give them "the expected" size
and alignment anyway so that calcsize returns something reasonable,
and so unpack code that works on a 'long long' platform ends up in
the error routine instead of with a mysterious "unpack str size
does not match format" msg when run on a non-'long long' box. */
{
'q'
,
8
,
8
,
nu_qQerror
,
np_qQerror
},
{
'Q'
,
8
,
8
,
nu_qQerror
,
np_qQerror
},
#endif
{
0
}
};
...
...
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