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
ce30bc9f
Kaydet (Commit)
ce30bc9f
authored
Kas 18, 2002
tarafından
Neil Schemenauer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add nb_remainder (i.e. __mod__) slot to unicode type. Fixes SF bug #615506.
üst
a6cd4e65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
unicodeobject.c
Objects/unicodeobject.c
+21
-2
No files found.
Objects/unicodeobject.c
Dosyayı görüntüle @
ce30bc9f
...
@@ -5799,6 +5799,24 @@ static PyMethodDef unicode_methods[] = {
...
@@ -5799,6 +5799,24 @@ static PyMethodDef unicode_methods[] = {
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
static
PyObject
*
unicode_mod
(
PyObject
*
v
,
PyObject
*
w
)
{
if
(
!
PyUnicode_Check
(
v
))
{
Py_INCREF
(
Py_NotImplemented
);
return
Py_NotImplemented
;
}
return
PyUnicode_Format
(
v
,
w
);
}
static
PyNumberMethods
unicode_as_number
=
{
0
,
/*nb_add*/
0
,
/*nb_subtract*/
0
,
/*nb_multiply*/
0
,
/*nb_divide*/
unicode_mod
,
/*nb_remainder*/
};
static
PySequenceMethods
unicode_as_sequence
=
{
static
PySequenceMethods
unicode_as_sequence
=
{
(
inquiry
)
unicode_length
,
/* sq_length */
(
inquiry
)
unicode_length
,
/* sq_length */
(
binaryfunc
)
PyUnicode_Concat
,
/* sq_concat */
(
binaryfunc
)
PyUnicode_Concat
,
/* sq_concat */
...
@@ -6647,7 +6665,7 @@ PyTypeObject PyUnicode_Type = {
...
@@ -6647,7 +6665,7 @@ PyTypeObject PyUnicode_Type = {
0
,
/* tp_setattr */
0
,
/* tp_setattr */
(
cmpfunc
)
unicode_compare
,
/* tp_compare */
(
cmpfunc
)
unicode_compare
,
/* tp_compare */
(
reprfunc
)
unicode_repr
,
/* tp_repr */
(
reprfunc
)
unicode_repr
,
/* tp_repr */
0
,
/* tp_as_number */
&
unicode_as_number
,
/* tp_as_number */
&
unicode_as_sequence
,
/* tp_as_sequence */
&
unicode_as_sequence
,
/* tp_as_sequence */
&
unicode_as_mapping
,
/* tp_as_mapping */
&
unicode_as_mapping
,
/* tp_as_mapping */
(
hashfunc
)
unicode_hash
,
/* tp_hash*/
(
hashfunc
)
unicode_hash
,
/* tp_hash*/
...
@@ -6656,7 +6674,8 @@ PyTypeObject PyUnicode_Type = {
...
@@ -6656,7 +6674,8 @@ PyTypeObject PyUnicode_Type = {
PyObject_GenericGetAttr
,
/* tp_getattro */
PyObject_GenericGetAttr
,
/* tp_getattro */
0
,
/* tp_setattro */
0
,
/* tp_setattro */
&
unicode_as_buffer
,
/* tp_as_buffer */
&
unicode_as_buffer
,
/* tp_as_buffer */
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_BASETYPE
,
/* tp_flags */
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_CHECKTYPES
|
Py_TPFLAGS_BASETYPE
,
/* tp_flags */
unicode_doc
,
/* tp_doc */
unicode_doc
,
/* tp_doc */
0
,
/* tp_traverse */
0
,
/* tp_traverse */
0
,
/* tp_clear */
0
,
/* tp_clear */
...
...
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