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
742dca73
Kaydet (Commit)
742dca73
authored
Mar 16, 2012
tarafından
David Bolen
Kaydeden (comit)
Michael Stahl
Mar 16, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46926: PyUNO_cmp: return acquired reference
üst
3c4cd1de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
pyuno.cxx
pyuno/source/module/pyuno.cxx
+15
-4
No files found.
pyuno/source/module/pyuno.cxx
Dosyayı görüntüle @
742dca73
...
...
@@ -595,6 +595,8 @@ int PyUNO_setattr (PyObject* self, char* name, PyObject* value)
// ensure object identity and struct equality
static
PyObject
*
PyUNO_cmp
(
PyObject
*
self
,
PyObject
*
that
,
int
op
)
{
PyObject
*
result
;
if
(
op
!=
Py_EQ
&&
op
!=
Py_NE
)
{
PyErr_SetString
(
PyExc_TypeError
,
"only '==' and '!=' comparisions are defined"
);
...
...
@@ -602,7 +604,9 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
}
if
(
self
==
that
)
{
return
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
result
=
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
Py_INCREF
(
result
);
return
result
;
}
try
{
...
...
@@ -624,14 +628,18 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
Reference
<
XMaterialHolder
>
xOther
(
other
->
members
->
xInvocation
,
UNO_QUERY
);
if
(
xMe
->
getMaterial
()
==
xOther
->
getMaterial
()
)
{
return
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
result
=
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
Py_INCREF
(
result
);
return
result
;
}
}
else
if
(
tcMe
==
com
::
sun
::
star
::
uno
::
TypeClass_INTERFACE
)
{
if
(
me
->
members
->
wrappedObject
==
other
->
members
->
wrappedObject
)
{
return
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
result
=
(
op
==
Py_EQ
?
Py_True
:
Py_False
);
Py_INCREF
(
result
);
return
result
;
}
}
}
...
...
@@ -641,7 +649,10 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op )
{
raisePyExceptionWithAny
(
makeAny
(
e
)
);
}
return
(
op
==
Py_EQ
?
Py_False
:
Py_True
);
result
=
(
op
==
Py_EQ
?
Py_False
:
Py_True
);
Py_INCREF
(
result
);
return
result
;
}
/* Python 2 has a tp_flags value for rich comparisons. Python 3 does not (on by default) */
...
...
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