Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
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ç
LibreOffice
core
Commits
b1de7935
Kaydet (Commit)
b1de7935
authored
Ock 30, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#983054, reorder code to avoid memory leak
Change-Id: If14160802f77673e3ebe69850e00d0506125969c
üst
0b20f01a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
25 deletions
+20
-25
pyuno.cxx
pyuno/source/module/pyuno.cxx
+20
-25
No files found.
pyuno/source/module/pyuno.cxx
Dosyayı görüntüle @
b1de7935
...
@@ -741,36 +741,31 @@ PyObject* PyUNO_new_UNCHECKED (
...
@@ -741,36 +741,31 @@ PyObject* PyUNO_new_UNCHECKED (
const
Any
&
targetInterface
,
const
Any
&
targetInterface
,
const
Reference
<
XSingleServiceFactory
>
&
ssf
)
const
Reference
<
XSingleServiceFactory
>
&
ssf
)
{
{
PyUNO
*
self
;
Sequence
<
Any
>
arguments
(
1
);
Reference
<
XInterface
>
tmp_interface
;
Reference
<
XInterface
>
tmp_interface
;
Reference
<
XInvocation2
>
tmp_invocation
;
self
=
PyObject_New
(
PyUNO
,
&
PyUNOType
);
if
(
self
==
NULL
)
return
NULL
;
// == error
self
->
members
=
new
PyUNOInternals
();
arguments
[
0
]
<<=
targetInterface
;
{
{
PyThreadDetach
antiguard
;
PyThreadDetach
antiguard
;
tmp_interface
=
ssf
->
createInstanceWithArguments
(
arguments
);
Sequence
<
Any
>
arguments
(
1
);
arguments
[
0
]
<<=
targetInterface
;
if
(
!
tmp_interface
.
is
())
tmp_interface
=
ssf
->
createInstanceWithArguments
(
arguments
);
{
tmp_invocation
.
set
(
tmp_interface
,
UNO_QUERY
);
Py_INCREF
(
Py_None
);
if
(
!
tmp_invocation
.
is
()
&&
tmp_interface
.
is
())
{
return
Py_None
;
throw
RuntimeException
(
}
"XInvocation2 not implemented, cannot interact with object"
,
Reference
<
XInterface
>
());
Reference
<
XInvocation2
>
tmp_invocation
(
tmp_interface
,
UNO_QUERY
);
if
(
!
tmp_invocation
.
is
())
{
throw
RuntimeException
(
OUString
::
createFromAscii
(
"XInvocation2 not implemented, cannot interact with object"
),
Reference
<
XInterface
>
());
}
}
self
->
members
->
xInvocation
=
tmp_invocation
;
self
->
members
->
wrappedObject
=
targetInterface
;
}
}
if
(
!
tmp_interface
.
is
())
{
Py_INCREF
(
Py_None
);
return
Py_None
;
}
PyUNO
*
self
=
PyObject_New
(
PyUNO
,
&
PyUNOType
);
if
(
self
==
NULL
)
return
NULL
;
// == error
self
->
members
=
new
PyUNOInternals
();
self
->
members
->
xInvocation
=
tmp_invocation
;
self
->
members
->
wrappedObject
=
targetInterface
;
return
(
PyObject
*
)
self
;
return
(
PyObject
*
)
self
;
}
}
...
...
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