Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
416d4135
Kaydet (Commit)
416d4135
authored
Tem 10, 2000
tarafından
Peter Schneider-Kamp
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ANSI-fication
üst
e89b1569
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
75 deletions
+25
-75
resource.c
Modules/resource.c
+4
-12
termios.c
Modules/termios.c
+6
-18
timemodule.c
Modules/timemodule.c
+15
-45
No files found.
Modules/resource.c
Dosyayı görüntüle @
416d4135
...
...
@@ -32,9 +32,7 @@ int getpagesize();
static
PyObject
*
ResourceError
;
static
PyObject
*
resource_getrusage
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
resource_getrusage
(
PyObject
*
self
,
PyObject
*
args
)
{
int
who
;
struct
rusage
ru
;
...
...
@@ -79,9 +77,7 @@ resource_getrusage(self, args)
static
PyObject
*
resource_getrlimit
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
resource_getrlimit
(
PyObject
*
self
,
PyObject
*
args
)
{
struct
rlimit
rl
;
int
resource
;
...
...
@@ -111,9 +107,7 @@ resource_getrlimit(self, args)
}
static
PyObject
*
resource_setrlimit
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
resource_setrlimit
(
PyObject
*
self
,
PyObject
*
args
)
{
struct
rlimit
rl
;
int
resource
;
...
...
@@ -157,9 +151,7 @@ resource_setrlimit(self, args)
}
static
PyObject
*
resource_getpagesize
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
resource_getpagesize
(
PyObject
*
self
,
PyObject
*
args
)
{
if
(
!
PyArg_ParseTuple
(
args
,
":getpagesize"
))
return
NULL
;
...
...
Modules/termios.c
Dosyayı görüntüle @
416d4135
...
...
@@ -46,9 +46,7 @@ indexing in the cc array must be done using the symbolic constants defined\n\
in the TERMIOS module."
;
static
PyObject
*
termios_tcgetattr
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcgetattr
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
;
struct
termios
mode
;
...
...
@@ -126,9 +124,7 @@ queued output, or TERMIOS.TCSAFLUSH to change after transmitting all\n\
queued output and discarding all queued input. "
;
static
PyObject
*
termios_tcsetattr
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcsetattr
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
,
when
;
struct
termios
mode
;
...
...
@@ -195,9 +191,7 @@ A zero duration sends a break for 0.25-0.5 seconds; a nonzero duration \n\
has a system dependent meaning. "
;
static
PyObject
*
termios_tcsendbreak
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcsendbreak
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
,
duration
;
...
...
@@ -219,9 +213,7 @@ tcdrain(fd) -> None\n\
Wait until all output written to file descriptor fd has been transmitted. "
;
static
PyObject
*
termios_tcdrain
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcdrain
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
;
...
...
@@ -246,9 +238,7 @@ queue, TERMIOS.TCOFLUSH for the output queue, or TERMIOS.TCIOFLUSH for\n\
both queues. "
;
static
PyObject
*
termios_tcflush
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcflush
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
,
queue
;
...
...
@@ -273,9 +263,7 @@ TERMIOS.TCOON to restart output, TERMIOS.TCIOFF to suspend input,\n\
or TERMIOS.TCION to restart input. "
;
static
PyObject
*
termios_tcflow
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
termios_tcflow
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
,
action
;
...
...
Modules/timemodule.c
Dosyayı görüntüle @
416d4135
...
...
@@ -128,9 +128,7 @@ initmactimezone()
static
PyObject
*
time_time
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_time
(
PyObject
*
self
,
PyObject
*
args
)
{
double
secs
;
if
(
!
PyArg_NoArgs
(
args
))
...
...
@@ -160,9 +158,7 @@ Fractions of a second may be present if the system clock provides them.";
#endif
static
PyObject
*
time_clock
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_clock
(
PyObject
*
self
,
PyObject
*
args
)
{
if
(
!
PyArg_NoArgs
(
args
))
return
NULL
;
...
...
@@ -173,9 +169,7 @@ time_clock(self, args)
#if defined(MS_WIN32) && !defined(MS_WIN64)
/* Due to Mark Hammond */
static
PyObject
*
time_clock
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_clock
(
PyObject
*
self
,
PyObject
*
args
)
{
static
LARGE_INTEGER
ctrStart
;
static
LARGE_INTEGER
divisor
=
{
0
,
0
};
...
...
@@ -217,9 +211,7 @@ the first call to clock(). This has as much precision as the system records.";
#endif
static
PyObject
*
time_sleep
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_sleep
(
PyObject
*
self
,
PyObject
*
args
)
{
double
secs
;
if
(
!
PyArg_Parse
(
args
,
"d"
,
&
secs
))
...
...
@@ -237,8 +229,7 @@ Delay execution for a given number of seconds. The argument may be\n\
a floating point number for subsecond precision."
;
static
PyObject
*
tmtotuple
(
p
)
struct
tm
*
p
;
tmtotuple
(
struct
tm
*
p
)
{
return
Py_BuildValue
(
"(iiiiiiiii)"
,
p
->
tm_year
+
1900
,
...
...
@@ -253,9 +244,7 @@ tmtotuple(p)
}
static
PyObject
*
time_convert
(
when
,
function
)
time_t
when
;
struct
tm
*
(
*
function
)(
const
time_t
*
);
time_convert
(
time_t
when
,
struct
tm
*
(
*
function
)(
const
time_t
*
))
{
struct
tm
*
p
;
errno
=
0
;
...
...
@@ -274,9 +263,7 @@ time_convert(when, function)
}
static
PyObject
*
time_gmtime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_gmtime
(
PyObject
*
self
,
PyObject
*
args
)
{
double
when
;
if
(
!
PyArg_Parse
(
args
,
"d"
,
&
when
))
...
...
@@ -290,9 +277,7 @@ static char gmtime_doc[] =
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a. GMT)."
;
static
PyObject
*
time_localtime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_localtime
(
PyObject
*
self
,
PyObject
*
args
)
{
double
when
;
if
(
!
PyArg_Parse
(
args
,
"d"
,
&
when
))
...
...
@@ -305,9 +290,7 @@ static char localtime_doc[] =
Convert seconds since the Epoch to a time tuple expressing local time."
;
static
int
gettmarg
(
args
,
p
)
PyObject
*
args
;
struct
tm
*
p
;
gettmarg
(
PyObject
*
args
,
struct
tm
*
p
)
{
int
y
;
memset
((
ANY
*
)
p
,
'\0'
,
sizeof
(
struct
tm
));
...
...
@@ -351,9 +334,7 @@ gettmarg(args, p)
#ifdef HAVE_STRFTIME
static
PyObject
*
time_strftime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_strftime
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
tup
;
struct
tm
buf
;
...
...
@@ -407,9 +388,7 @@ extern char *strptime(); /* Enable this if it's not declared in <time.h> */
#endif
static
PyObject
*
time_strptime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_strptime
(
PyObject
*
self
,
PyObject
*
args
)
{
struct
tm
tm
;
char
*
fmt
=
"%a %b %d %H:%M:%S %Y"
;
...
...
@@ -441,9 +420,7 @@ See the library reference manual for formatting codes (same as strftime()).";
#endif
/* HAVE_STRPTIME */
static
PyObject
*
time_asctime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_asctime
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
tup
;
struct
tm
buf
;
...
...
@@ -464,9 +441,7 @@ static char asctime_doc[] =
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'."
;
static
PyObject
*
time_ctime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_ctime
(
PyObject
*
self
,
PyObject
*
args
)
{
double
dt
;
time_t
tt
;
...
...
@@ -495,9 +470,7 @@ This is equivalent to asctime(localtime(seconds)).";
#ifdef HAVE_MKTIME
static
PyObject
*
time_mktime
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
time_mktime
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
tup
;
struct
tm
buf
;
...
...
@@ -549,10 +522,7 @@ static PyMethodDef time_methods[] = {
};
static
void
ins
(
d
,
name
,
v
)
PyObject
*
d
;
char
*
name
;
PyObject
*
v
;
ins
(
PyObject
*
d
,
char
*
name
,
PyObject
*
v
)
{
if
(
v
==
NULL
)
Py_FatalError
(
"Can't initialize time module -- NULL value"
);
...
...
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