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
4324aa35
Kaydet (Commit)
4324aa35
authored
May 28, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cruft cleanup: Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize().
üst
6a922372
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
10 deletions
+15
-10
tupleobject.h
Include/tupleobject.h
+1
-1
NEWS
Misc/NEWS
+6
-0
_tkinter.c
Modules/_tkinter.c
+2
-2
abstract.c
Objects/abstract.c
+2
-2
tupleobject.c
Objects/tupleobject.c
+3
-4
bltinmodule.c
Python/bltinmodule.c
+1
-1
No files found.
Include/tupleobject.h
Dosyayı görüntüle @
4324aa35
...
@@ -33,7 +33,7 @@ extern DL_IMPORT(int) PyTuple_Size(PyObject *);
...
@@ -33,7 +33,7 @@ extern DL_IMPORT(int) PyTuple_Size(PyObject *);
extern
DL_IMPORT
(
PyObject
*
)
PyTuple_GetItem
(
PyObject
*
,
int
);
extern
DL_IMPORT
(
PyObject
*
)
PyTuple_GetItem
(
PyObject
*
,
int
);
extern
DL_IMPORT
(
int
)
PyTuple_SetItem
(
PyObject
*
,
int
,
PyObject
*
);
extern
DL_IMPORT
(
int
)
PyTuple_SetItem
(
PyObject
*
,
int
,
PyObject
*
);
extern
DL_IMPORT
(
PyObject
*
)
PyTuple_GetSlice
(
PyObject
*
,
int
,
int
);
extern
DL_IMPORT
(
PyObject
*
)
PyTuple_GetSlice
(
PyObject
*
,
int
,
int
);
extern
DL_IMPORT
(
int
)
_PyTuple_Resize
(
PyObject
**
,
int
,
int
);
extern
DL_IMPORT
(
int
)
_PyTuple_Resize
(
PyObject
**
,
int
);
/* Macro, trading safety for speed */
/* Macro, trading safety for speed */
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
...
...
Misc/NEWS
Dosyayı görüntüle @
4324aa35
...
@@ -155,6 +155,12 @@ New platforms
...
@@ -155,6 +155,12 @@ New platforms
- Python should compile and run out of the box using the Borland C
- Python should compile and run out of the box using the Borland C
compiler (under Windows), thanks to Stephen Hansen.
compiler (under Windows), thanks to Stephen Hansen.
C API
- Removed the unused last_is_sticky argument from the internal
_PyTuple_Resize(). If this affects you, you were cheating.
What's New in Python 2.1 (final)?
What's New in Python 2.1 (final)?
=================================
=================================
...
...
Modules/_tkinter.c
Dosyayı görüntüle @
4324aa35
...
@@ -1851,7 +1851,7 @@ _bump(FlattenContext* context, int size)
...
@@ -1851,7 +1851,7 @@ _bump(FlattenContext* context, int size)
context
->
maxsize
=
maxsize
;
context
->
maxsize
=
maxsize
;
return
_PyTuple_Resize
(
&
context
->
tuple
,
maxsize
,
0
)
>=
0
;
return
_PyTuple_Resize
(
&
context
->
tuple
,
maxsize
)
>=
0
;
}
}
static
int
static
int
...
@@ -1935,7 +1935,7 @@ Tkinter_Flatten(PyObject* self, PyObject* args)
...
@@ -1935,7 +1935,7 @@ Tkinter_Flatten(PyObject* self, PyObject* args)
if
(
!
_flatten1
(
&
context
,
item
,
0
))
if
(
!
_flatten1
(
&
context
,
item
,
0
))
return
NULL
;
return
NULL
;
if
(
_PyTuple_Resize
(
&
context
.
tuple
,
context
.
size
,
0
))
if
(
_PyTuple_Resize
(
&
context
.
tuple
,
context
.
size
))
return
NULL
;
return
NULL
;
return
context
.
tuple
;
return
context
.
tuple
;
...
...
Objects/abstract.c
Dosyayı görüntüle @
4324aa35
...
@@ -1220,7 +1220,7 @@ PySequence_Tuple(PyObject *v)
...
@@ -1220,7 +1220,7 @@ PySequence_Tuple(PyObject *v)
n
+=
10
;
n
+=
10
;
else
else
n
+=
100
;
n
+=
100
;
if
(
_PyTuple_Resize
(
&
result
,
n
,
0
)
!=
0
)
{
if
(
_PyTuple_Resize
(
&
result
,
n
)
!=
0
)
{
Py_DECREF
(
item
);
Py_DECREF
(
item
);
goto
Fail
;
goto
Fail
;
}
}
...
@@ -1230,7 +1230,7 @@ PySequence_Tuple(PyObject *v)
...
@@ -1230,7 +1230,7 @@ PySequence_Tuple(PyObject *v)
/* Cut tuple back if guess was too large. */
/* Cut tuple back if guess was too large. */
if
(
j
<
n
&&
if
(
j
<
n
&&
_PyTuple_Resize
(
&
result
,
j
,
0
)
!=
0
)
_PyTuple_Resize
(
&
result
,
j
)
!=
0
)
goto
Fail
;
goto
Fail
;
Py_DECREF
(
it
);
Py_DECREF
(
it
);
...
...
Objects/tupleobject.c
Dosyayı görüntüle @
4324aa35
...
@@ -488,11 +488,10 @@ PyTypeObject PyTuple_Type = {
...
@@ -488,11 +488,10 @@ PyTypeObject PyTuple_Type = {
is only one module referencing the object. You can also think of it
is only one module referencing the object. You can also think of it
as creating a new tuple object and destroying the old one, only more
as creating a new tuple object and destroying the old one, only more
efficiently. In any case, don't use this if the tuple may already be
efficiently. In any case, don't use this if the tuple may already be
known to some other part of the code. The last_is_sticky is not used
known to some other part of the code. */
and must always be false. */
int
int
_PyTuple_Resize
(
PyObject
**
pv
,
int
newsize
,
int
last_is_sticky
)
_PyTuple_Resize
(
PyObject
**
pv
,
int
newsize
)
{
{
register
PyTupleObject
*
v
;
register
PyTupleObject
*
v
;
register
PyTupleObject
*
sv
;
register
PyTupleObject
*
sv
;
...
@@ -500,7 +499,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky)
...
@@ -500,7 +499,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky)
int
sizediff
;
int
sizediff
;
v
=
(
PyTupleObject
*
)
*
pv
;
v
=
(
PyTupleObject
*
)
*
pv
;
if
(
v
==
NULL
||
!
PyTuple_Check
(
v
)
||
last_is_sticky
||
if
(
v
==
NULL
||
!
PyTuple_Check
(
v
)
||
(
v
->
ob_size
!=
0
&&
v
->
ob_refcnt
!=
1
))
{
(
v
->
ob_size
!=
0
&&
v
->
ob_refcnt
!=
1
))
{
*
pv
=
0
;
*
pv
=
0
;
Py_XDECREF
(
v
);
Py_XDECREF
(
v
);
...
...
Python/bltinmodule.c
Dosyayı görüntüle @
4324aa35
...
@@ -2329,7 +2329,7 @@ filtertuple(PyObject *func, PyObject *tuple)
...
@@ -2329,7 +2329,7 @@ filtertuple(PyObject *func, PyObject *tuple)
}
}
}
}
if
(
_PyTuple_Resize
(
&
result
,
j
,
0
)
<
0
)
if
(
_PyTuple_Resize
(
&
result
,
j
)
<
0
)
return
NULL
;
return
NULL
;
return
result
;
return
result
;
...
...
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