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
06dd8cf5
Kaydet (Commit)
06dd8cf5
authored
Şub 02, 2003
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix memory leak: free memory storing the content model passed to the
ElementDeclHandler by Expat. Fixes SF bug #676990.
üst
ee1a53cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
24 deletions
+48
-24
pyexpat.c
Modules/pyexpat.c
+48
-24
No files found.
Modules/pyexpat.c
Dosyayı görüntüle @
06dd8cf5
...
@@ -683,35 +683,59 @@ conv_content_model(XML_Content * const model,
...
@@ -683,35 +683,59 @@ conv_content_model(XML_Content * const model,
return
result
;
return
result
;
}
}
static
PyObject
*
static
void
conv_content_model_utf8
(
XML_Content
*
const
model
)
my_ElementDeclHandler
(
void
*
userData
,
const
XML_Char
*
name
,
XML_Content
*
model
)
{
{
return
conv_content_model
(
model
,
conv_string_to_utf8
)
;
xmlparseobject
*
self
=
(
xmlparseobject
*
)
userData
;
}
PyObject
*
args
=
NULL
;
#ifdef Py_USING_UNICODE
if
(
have_handler
(
self
,
ElementDecl
))
{
static
PyObject
*
PyObject
*
rv
=
NULL
;
conv_content_model_unicode
(
XML_Content
*
const
model
)
PyObject
*
modelobj
,
*
nameobj
;
{
return
conv_content_model
(
model
,
conv_string_to_unicode
);
}
VOID_HANDLER
(
ElementDecl
,
if
(
flush_character_buffer
(
self
)
<
0
)
(
void
*
userData
,
goto
finally
;
const
XML_Char
*
name
,
#ifdef Py_USING_UNICODE
XML_Content
*
model
),
modelobj
=
conv_content_model
(
model
,
(
"NO&"
,
(
self
->
returns_unicode
string_intern
(
self
,
name
),
?
conv_string_to_unicode
(
self
->
returns_unicode
?
conv_content_model_unicode
:
conv_string_to_utf8
));
:
conv_content_model_utf8
),
model
))
#else
#else
VOID_HANDLER
(
ElementDecl
,
modelobj
=
conv_content_model
(
model
,
conv_string_to_utf8
);
(
void
*
userData
,
const
XML_Char
*
name
,
XML_Content
*
model
),
(
"NO&"
,
string_intern
(
self
,
name
),
conv_content_model_utf8
,
model
))
#endif
#endif
if
(
modelobj
==
NULL
)
{
flag_error
(
self
);
goto
finally
;
}
nameobj
=
string_intern
(
self
,
name
);
if
(
nameobj
==
NULL
)
{
Py_DECREF
(
modelobj
);
flag_error
(
self
);
goto
finally
;
}
args
=
Py_BuildValue
(
"NN"
,
string_intern
(
self
,
name
),
modelobj
);
if
(
args
==
NULL
)
{
Py_DECREF
(
modelobj
);
flag_error
(
self
);
goto
finally
;
}
self
->
in_callback
=
1
;
rv
=
call_with_frame
(
getcode
(
ElementDecl
,
"ElementDecl"
,
__LINE__
),
self
->
handlers
[
ElementDecl
],
args
);
self
->
in_callback
=
0
;
if
(
rv
==
NULL
)
{
flag_error
(
self
);
goto
finally
;
}
Py_DECREF
(
rv
);
}
finally
:
Py_XDECREF
(
args
);
XML_FreeContentModel
(
self
->
itself
,
model
);
return
;
}
VOID_HANDLER
(
AttlistDecl
,
VOID_HANDLER
(
AttlistDecl
,
(
void
*
userData
,
(
void
*
userData
,
...
...
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