Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7e501b

Browse files
committed
fix warnings
1 parent 637c746 commit a7e501b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Include/internal/pycore_time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ PyAPI_FUNC(int) _PyTime_AsTimevalTime_t(
245245
#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE)
246246
// Create a timestamp from a timespec structure.
247247
// Raise an exception and return -1 on overflow, return 0 on success.
248-
extern int _PyTime_FromTimespec(_PyTime_t *tp, struct timespec *ts);
248+
extern int _PyTime_FromTimespec(_PyTime_t *tp, const struct timespec *ts);
249249

250250
// Convert a timestamp to a timespec structure (nanosecond resolution).
251251
// tv_nsec is always positive.

Python/pytime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ _PyTime_FromNanosecondsObject(_PyTime_t *tp, PyObject *obj)
470470

471471
#ifdef HAVE_CLOCK_GETTIME
472472
static int
473-
pytime_fromtimespec(_PyTime_t *tp, struct timespec *ts, int raise_exc)
473+
pytime_fromtimespec(_PyTime_t *tp, const struct timespec *ts, int raise_exc)
474474
{
475475
_PyTime_t t, tv_nsec;
476476

@@ -493,7 +493,7 @@ pytime_fromtimespec(_PyTime_t *tp, struct timespec *ts, int raise_exc)
493493
}
494494

495495
int
496-
_PyTime_FromTimespec(_PyTime_t *tp, struct timespec *ts)
496+
_PyTime_FromTimespec(_PyTime_t *tp, const struct timespec *ts)
497497
{
498498
return pytime_fromtimespec(tp, ts, 1);
499499
}

0 commit comments

Comments
 (0)