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
a48b8bad
Kaydet (Commit)
a48b8bad
authored
May 26, 2014
tarafından
Caolán McNamara
Kaydeden (comit)
Fridrich Štrba
May 28, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#982760 Dereference null return value
Change-Id: I779fa5fa418370dd6c53308943374e981f65ae29
üst
915ad3ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
pyuno.hxx
pyuno/inc/pyuno/pyuno.hxx
+13
-0
pyuno_type.cxx
pyuno/source/module/pyuno_type.cxx
+1
-1
No files found.
pyuno/inc/pyuno/pyuno.hxx
Dosyayı görüntüle @
a48b8bad
...
...
@@ -68,6 +68,13 @@ extern "C" LO_DLLPUBLIC_PYUNO
namespace
pyuno
{
enum
__NotNull
{
/** definition of a no acquire enum for ctors
*/
NOT_NULL
};
/** Helper class for keeping references to python objects.
BEWARE: Look up every python function you use to check
whether you get an acquired or not acquired object pointer
...
...
@@ -88,6 +95,12 @@ public:
PyRef
(
PyObject
*
p
,
__sal_NoAcquire
)
:
m
(
p
)
{}
PyRef
(
PyObject
*
p
,
__sal_NoAcquire
,
__NotNull
)
:
m
(
p
)
{
if
(
!
m
)
throw
std
::
bad_alloc
();
}
PyRef
(
const
PyRef
&
r
)
:
m
(
r
.
get
()
)
{
Py_XINCREF
(
m
);
}
~
PyRef
()
{
Py_XDECREF
(
m
);
}
...
...
pyuno/source/module/pyuno_type.cxx
Dosyayı görüntüle @
a48b8bad
...
...
@@ -265,7 +265,7 @@ PyObject *PyUNO_Enum_new( const char *enumBase, const char *enumValue, const Run
PyObject
*
PyUNO_Type_new
(
const
char
*
typeName
,
TypeClass
t
,
const
Runtime
&
r
)
{
// retrieve type object
PyRef
args
(
PyTuple_New
(
2
),
SAL_NO_ACQUIRE
);
PyRef
args
(
PyTuple_New
(
2
),
SAL_NO_ACQUIRE
,
NOT_NULL
);
PyTuple_SetItem
(
args
.
get
()
,
0
,
PyStr_FromString
(
typeName
)
);
PyObject
*
typeClass
=
PyUNO_Enum_new
(
"com.sun.star.uno.TypeClass"
,
typeClassToString
(
t
),
r
);
...
...
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