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
bd77c037
Kaydet (Commit)
bd77c037
authored
Nis 26, 2007
tarafından
Kristján Valur Jónsson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Accomodate 64 bit time_t in the _bsddb module.
üst
6e6eaa7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
_bsddb.c
Modules/_bsddb.c
+21
-1
No files found.
Modules/_bsddb.c
Dosyayı görüntüle @
bd77c037
...
@@ -749,6 +749,24 @@ static void _addIntToDict(PyObject* dict, char *name, int value)
...
@@ -749,6 +749,24 @@ static void _addIntToDict(PyObject* dict, char *name, int value)
Py_XDECREF
(
v
);
Py_XDECREF
(
v
);
}
}
/* The same, when the value is a time_t */
static
void
_addTimeTToDict
(
PyObject
*
dict
,
char
*
name
,
time_t
value
)
{
PyObject
*
v
;
/* if the value fits in regular int, use that. */
#ifdef HAVE_LONG_LONG
if
(
sizeof
(
time_t
)
>
sizeof
(
long
))
v
=
PyLong_FromLongLong
((
PY_LONG_LONG
)
value
);
else
#endif
v
=
PyInt_FromLong
((
long
)
value
);
if
(
!
v
||
PyDict_SetItemString
(
dict
,
name
,
v
))
PyErr_Clear
();
Py_XDECREF
(
v
);
}
#if (DBVER >= 43)
#if (DBVER >= 43)
/* add an db_seq_t to a dictionary using the given name as a key */
/* add an db_seq_t to a dictionary using the given name as a key */
static
void
_addDb_seq_tToDict
(
PyObject
*
dict
,
char
*
name
,
db_seq_t
value
)
static
void
_addDb_seq_tToDict
(
PyObject
*
dict
,
char
*
name
,
db_seq_t
value
)
...
@@ -4633,8 +4651,9 @@ DBEnv_txn_stat(DBEnvObject* self, PyObject* args)
...
@@ -4633,8 +4651,9 @@ DBEnv_txn_stat(DBEnvObject* self, PyObject* args)
}
}
#define MAKE_ENTRY(name) _addIntToDict(d, #name, sp->st_##name)
#define MAKE_ENTRY(name) _addIntToDict(d, #name, sp->st_##name)
#define MAKE_TIME_T_ENTRY(name)_addTimeTToDict(d, #name, sp->st_##name)
MAKE_ENTRY
(
time_ckp
);
MAKE_
TIME_T_
ENTRY
(
time_ckp
);
MAKE_ENTRY
(
last_txnid
);
MAKE_ENTRY
(
last_txnid
);
MAKE_ENTRY
(
maxtxns
);
MAKE_ENTRY
(
maxtxns
);
MAKE_ENTRY
(
nactive
);
MAKE_ENTRY
(
nactive
);
...
@@ -4647,6 +4666,7 @@ DBEnv_txn_stat(DBEnvObject* self, PyObject* args)
...
@@ -4647,6 +4666,7 @@ DBEnv_txn_stat(DBEnvObject* self, PyObject* args)
MAKE_ENTRY
(
region_nowait
);
MAKE_ENTRY
(
region_nowait
);
#undef MAKE_ENTRY
#undef MAKE_ENTRY
#undef MAKE_TIME_T_ENTRY
free
(
sp
);
free
(
sp
);
return
d
;
return
d
;
}
}
...
...
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