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
510492e9
Kaydet (Commit)
510492e9
authored
Nis 12, 2002
tarafından
Neil Schemenauer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove PyMalloc_New, _PyMalloc_MALLOC, and PyMalloc_Del.
üst
9acae5a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
stringobject.c
Objects/stringobject.c
+7
-7
No files found.
Objects/stringobject.c
Dosyayı görüntüle @
510492e9
...
@@ -64,7 +64,7 @@ PyString_FromStringAndSize(const char *str, int size)
...
@@ -64,7 +64,7 @@ PyString_FromStringAndSize(const char *str, int size)
/* PyObject_NewVar is inlined */
/* PyObject_NewVar is inlined */
op
=
(
PyStringObject
*
)
op
=
(
PyStringObject
*
)
_PyMalloc
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
PyObject
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
if
(
op
==
NULL
)
if
(
op
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
...
@@ -120,7 +120,7 @@ PyString_FromString(const char *str)
...
@@ -120,7 +120,7 @@ PyString_FromString(const char *str)
/* PyObject_NewVar is inlined */
/* PyObject_NewVar is inlined */
op
=
(
PyStringObject
*
)
op
=
(
PyStringObject
*
)
_PyMalloc
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
PyObject
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
if
(
op
==
NULL
)
if
(
op
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
...
@@ -717,7 +717,7 @@ string_concat(register PyStringObject *a, register PyObject *bb)
...
@@ -717,7 +717,7 @@ string_concat(register PyStringObject *a, register PyObject *bb)
size
=
a
->
ob_size
+
b
->
ob_size
;
size
=
a
->
ob_size
+
b
->
ob_size
;
/* PyObject_NewVar is inlined */
/* PyObject_NewVar is inlined */
op
=
(
PyStringObject
*
)
op
=
(
PyStringObject
*
)
_PyMalloc
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
PyObject
_MALLOC
(
sizeof
(
PyStringObject
)
+
size
*
sizeof
(
char
));
if
(
op
==
NULL
)
if
(
op
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
...
@@ -760,7 +760,7 @@ string_repeat(register PyStringObject *a, register int n)
...
@@ -760,7 +760,7 @@ string_repeat(register PyStringObject *a, register int n)
return
NULL
;
return
NULL
;
}
}
op
=
(
PyStringObject
*
)
op
=
(
PyStringObject
*
)
_PyMalloc
_MALLOC
(
sizeof
(
PyStringObject
)
+
nbytes
);
PyObject
_MALLOC
(
sizeof
(
PyStringObject
)
+
nbytes
);
if
(
op
==
NULL
)
if
(
op
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
PyObject_INIT_VAR
(
op
,
&
PyString_Type
,
size
);
...
@@ -2755,7 +2755,7 @@ PyTypeObject PyString_Type = {
...
@@ -2755,7 +2755,7 @@ PyTypeObject PyString_Type = {
0
,
/* tp_init */
0
,
/* tp_init */
0
,
/* tp_alloc */
0
,
/* tp_alloc */
string_new
,
/* tp_new */
string_new
,
/* tp_new */
_PyMalloc_Del
,
/* tp_free */
PyObject_Del
,
/* tp_free */
};
};
void
void
...
@@ -2807,10 +2807,10 @@ _PyString_Resize(PyObject **pv, int newsize)
...
@@ -2807,10 +2807,10 @@ _PyString_Resize(PyObject **pv, int newsize)
#endif
#endif
_Py_ForgetReference
(
v
);
_Py_ForgetReference
(
v
);
*
pv
=
(
PyObject
*
)
*
pv
=
(
PyObject
*
)
_PyMalloc
_REALLOC
((
char
*
)
v
,
PyObject
_REALLOC
((
char
*
)
v
,
sizeof
(
PyStringObject
)
+
newsize
*
sizeof
(
char
));
sizeof
(
PyStringObject
)
+
newsize
*
sizeof
(
char
));
if
(
*
pv
==
NULL
)
{
if
(
*
pv
==
NULL
)
{
Py
Malloc
_Del
(
v
);
Py
Object
_Del
(
v
);
PyErr_NoMemory
();
PyErr_NoMemory
();
return
-
1
;
return
-
1
;
}
}
...
...
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