mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Added include for limits.h
This commit is contained in:
parent
6c091c8ff2
commit
e979160f5e
2 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIMITS_H
|
||||||
|
#include <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DONT_HAVE_SYS_TYPES_H
|
#ifndef DONT_HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif /* DONT_HAVE_SYS_TYPES_H */
|
#endif /* DONT_HAVE_SYS_TYPES_H */
|
||||||
|
|
|
@ -17,6 +17,9 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h> /* For size_t */
|
#include <sys/types.h> /* For size_t */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_LIMITS_H
|
||||||
|
#include <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ROUNDUP(n, PyTryBlock) \
|
#define ROUNDUP(n, PyTryBlock) \
|
||||||
((((n)+(PyTryBlock)-1)/(PyTryBlock))*(PyTryBlock))
|
((((n)+(PyTryBlock)-1)/(PyTryBlock))*(PyTryBlock))
|
||||||
|
@ -258,6 +261,7 @@ static int
|
||||||
list_compare(PyListObject *v, PyListObject *w)
|
list_compare(PyListObject *v, PyListObject *w)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < v->ob_size && i < w->ob_size; i++) {
|
for (i = 0; i < v->ob_size && i < w->ob_size; i++) {
|
||||||
int cmp = PyObject_Compare(v->ob_item[i], w->ob_item[i]);
|
int cmp = PyObject_Compare(v->ob_item[i], w->ob_item[i]);
|
||||||
if (cmp != 0)
|
if (cmp != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue