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
6a6991ed
Kaydet (Commit)
6a6991ed
authored
Mar 28, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up C-style casts from pointers to void
Change-Id: I5c0372bce2564e58c78daf544cfcb106387c6894
üst
c3fb36ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
30 deletions
+30
-30
callvirtualmethod.cxx
...es/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+2
-2
cpp2uno.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+3
-3
except.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+1
-1
rtti.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
+1
-1
uno2cpp.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+4
-4
jni_base.h
bridges/source/jni_uno/jni_base.h
+1
-1
jni_bridge.cxx
bridges/source/jni_uno/jni_bridge.cxx
+4
-4
jni_data.cxx
bridges/source/jni_uno/jni_data.cxx
+0
-0
jni_java2uno.cxx
bridges/source/jni_uno/jni_java2uno.cxx
+4
-4
jni_uno2java.cxx
bridges/source/jni_uno/jni_uno2java.cxx
+10
-10
No files found.
bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -66,7 +66,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
data
.
pFPR
=
pFPR
;
// Get pointer to method
sal_uInt64
pMethod
=
*
((
sal_uInt64
*
)
pThis
);
sal_uInt64
pMethod
=
*
static_cast
<
sal_uInt64
*>
(
pThis
);
pMethod
+=
8
*
nVtableIndex
;
data
.
pMethod
=
*
reinterpret_cast
<
sal_uInt64
*>
(
pMethod
);
...
...
@@ -76,7 +76,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
{
// 16-bytes aligned
sal_uInt32
nStackBytes
=
(
(
nStack
+
1
)
>>
1
)
*
16
;
pCallStack
=
(
sal_uInt64
*
)
__builtin_alloca
(
nStackBytes
);
pCallStack
=
static_cast
<
sal_uInt64
*>
(
__builtin_alloca
(
nStackBytes
)
);
std
::
memcpy
(
pCallStack
,
pStack
,
nStackBytes
);
}
...
...
bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -95,12 +95,12 @@ static typelib_TypeClass cpp2uno_call(
// stack space
// parameters
void
**
pUnoArgs
=
(
void
**
)
alloca
(
4
*
sizeof
(
void
*
)
*
nParams
);
void
**
pUnoArgs
=
static_cast
<
void
**>
(
alloca
(
4
*
sizeof
(
void
*
)
*
nParams
)
);
void
**
pCppArgs
=
pUnoArgs
+
nParams
;
// indices of values this have to be converted (interface conversion cpp<=>uno)
sal_Int32
*
pTempIndices
=
(
sal_Int32
*
)
(
pUnoArgs
+
(
2
*
nParams
));
sal_Int32
*
pTempIndices
=
reinterpret_cast
<
sal_Int32
*>
(
pUnoArgs
+
(
2
*
nParams
));
// type descriptions for reconversions
typelib_TypeDescription
**
ppTempParamTypeDescr
=
(
typelib_TypeDescription
**
)
(
pUnoArgs
+
(
3
*
nParams
));
typelib_TypeDescription
**
ppTempParamTypeDescr
=
reinterpret_cast
<
typelib_TypeDescription
**>
(
pUnoArgs
+
(
3
*
nParams
));
sal_Int32
nTempIndices
=
0
;
...
...
bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -81,7 +81,7 @@ static OUString toUNOname( char const * p )
extern
"C"
{
static
void
_GLIBCXX_CDTOR_CALLABI
deleteException
(
void
*
pExc
)
{
__cxa_exception
const
*
header
=
(
(
__cxa_exception
const
*
)
pExc
-
1
);
__cxa_exception
const
*
header
=
(
static_cast
<
__cxa_exception
const
*>
(
pExc
)
-
1
);
typelib_TypeDescription
*
pTD
=
0
;
OUString
unoName
(
toUNOname
(
header
->
exceptionType
->
name
()
)
);
::
typelib_typedescription_getByName
(
&
pTD
,
unoName
.
pData
);
...
...
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -97,7 +97,7 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
#if defined(FREEBSD) && __FreeBSD_version < 702104
/* #i22253# */
rtti
=
(
std
::
type_info
*
)
dlsym
(
RTLD_DEFAULT
,
symName
.
getStr
()
);
#else
rtti
=
(
std
::
type_info
*
)
dlsym
(
m_hApp
,
symName
.
getStr
()
);
rtti
=
static_cast
<
std
::
type_info
*>
(
dlsym
(
m_hApp
,
symName
.
getStr
()
)
);
#endif
if
(
rtti
)
...
...
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -100,7 +100,7 @@ static void cpp_call(
{
// Maxium space for [complex ret ptr], values | ptr ...
// (but will be used less - some of the values will be in pGPR and pFPR)
sal_uInt64
*
pStack
=
(
sal_uInt64
*
)
__builtin_alloca
(
(
nParams
+
3
)
*
sizeof
(
sal_uInt64
)
);
sal_uInt64
*
pStack
=
static_cast
<
sal_uInt64
*>
(
__builtin_alloca
(
(
nParams
+
3
)
*
sizeof
(
sal_uInt64
)
)
);
sal_uInt64
*
pStackStart
=
pStack
;
sal_uInt64
pGPR
[
x86_64
::
MAX_GPR_REGS
];
...
...
@@ -138,11 +138,11 @@ static void cpp_call(
INSERT_INT64
(
&
pAdjustedThisPtr
,
nGPR
,
pGPR
,
pStack
);
// Args
void
**
pCppArgs
=
(
void
**
)
alloca
(
3
*
sizeof
(
void
*
)
*
nParams
);
void
**
pCppArgs
=
static_cast
<
void
**>
(
alloca
(
3
*
sizeof
(
void
*
)
*
nParams
)
);
// Indices of values this have to be converted (interface conversion cpp<=>uno)
sal_Int32
*
pTempIndices
=
(
sal_Int32
*
)
(
pCppArgs
+
nParams
);
sal_Int32
*
pTempIndices
=
reinterpret_cast
<
sal_Int32
*>
(
pCppArgs
+
nParams
);
// Type descriptions for reconversions
typelib_TypeDescription
**
ppTempParamTypeDescr
=
(
typelib_TypeDescription
**
)
(
pCppArgs
+
(
2
*
nParams
));
typelib_TypeDescription
**
ppTempParamTypeDescr
=
reinterpret_cast
<
typelib_TypeDescription
**>
(
pCppArgs
+
(
2
*
nParams
));
sal_Int32
nTempIndices
=
0
;
...
...
bridges/source/jni_uno/jni_base.h
Dosyayı görüntüle @
6a6991ed
...
...
@@ -228,7 +228,7 @@ inline rtl_mem * rtl_mem::allocate( ::std::size_t bytes )
void
*
p
=
rtl_allocateMemory
(
bytes
);
if
(
0
==
p
)
throw
BridgeRuntimeError
(
"out of memory!"
);
return
(
rtl_mem
*
)
p
;
return
static_cast
<
rtl_mem
*>
(
p
)
;
}
...
...
bridges/source/jni_uno/jni_bridge.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -60,8 +60,8 @@ void SAL_CALL Mapping_map_to_uno(
void
*
pIn
,
typelib_InterfaceTypeDescription
*
td
)
SAL_THROW_EXTERN_C
()
{
uno_Interface
**
ppUnoI
=
(
uno_Interface
**
)
ppOut
;
jobject
javaI
=
(
jobject
)
pIn
;
uno_Interface
**
ppUnoI
=
reinterpret_cast
<
uno_Interface
**>
(
ppOut
)
;
jobject
javaI
=
static_cast
<
jobject
>
(
pIn
)
;
static_assert
(
sizeof
(
void
*
)
==
sizeof
(
jobject
),
"must be the same size"
);
assert
(
ppUnoI
!=
0
);
...
...
@@ -119,8 +119,8 @@ void SAL_CALL Mapping_map_to_java(
void
*
pIn
,
typelib_InterfaceTypeDescription
*
td
)
SAL_THROW_EXTERN_C
()
{
jobject
*
ppJavaI
=
(
jobject
*
)
ppOut
;
uno_Interface
*
pUnoI
=
(
uno_Interface
*
)
pIn
;
jobject
*
ppJavaI
=
reinterpret_cast
<
jobject
*>
(
ppOut
)
;
uno_Interface
*
pUnoI
=
static_cast
<
uno_Interface
*>
(
pIn
)
;
static_assert
(
sizeof
(
void
*
)
==
sizeof
(
jobject
),
"must be the same size"
);
assert
(
ppJavaI
!=
0
);
...
...
bridges/source/jni_uno/jni_data.cxx
Dosyayı görüntüle @
6a6991ed
This diff is collapsed.
Click to expand it.
bridges/source/jni_uno/jni_java2uno.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -180,12 +180,12 @@ jobject Bridge::call_uno(
}
#ifdef BROKEN_ALLOCA
char
*
mem
=
(
char
*
)
malloc
(
char
*
mem
=
static_cast
<
char
*>
(
malloc
(
#else
char
*
mem
=
(
char
*
)
alloca
(
char
*
mem
=
static_cast
<
char
*>
(
alloca
(
#endif
(
nParams
*
sizeof
(
void
*
))
+
return_size
+
(
nParams
*
sizeof
(
largest
))
);
return_size
+
(
nParams
*
sizeof
(
largest
))
)
)
;
void
**
uno_args
=
reinterpret_cast
<
void
**>
(
mem
);
void
*
uno_ret
=
return_size
==
0
?
0
:
(
mem
+
(
nParams
*
sizeof
(
void
*
)));
largest
*
uno_args_mem
=
reinterpret_cast
<
largest
*>
...
...
@@ -452,7 +452,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(
if
(
typelib_TypeClass_INTERFACE
==
uno_ret
.
pType
->
eTypeClass
)
{
uno_Interface
*
pUnoRet
=
(
uno_Interface
*
)
uno_ret
.
pReserved
;
static_cast
<
uno_Interface
*>
(
uno_ret
.
pReserved
)
;
if
(
0
!=
pUnoRet
)
{
try
...
...
bridges/source/jni_uno/jni_uno2java.cxx
Dosyayı görüntüle @
6a6991ed
...
...
@@ -153,7 +153,7 @@ void Bridge::call_java(
#ifdef BROKEN_ALLOCA
jvalue
*
java_args
=
(
jvalue
*
)
malloc
(
sizeof
(
jvalue
)
*
nParams
);
#else
jvalue
*
java_args
=
(
jvalue
*
)
alloca
(
sizeof
(
jvalue
)
*
nParams
);
jvalue
*
java_args
=
static_cast
<
jvalue
*>
(
alloca
(
sizeof
(
jvalue
)
*
nParams
)
);
#endif
sal_Int32
nPos
;
...
...
@@ -248,38 +248,38 @@ void Bridge::call_java(
jni
->
CallVoidMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_CHAR
:
*
(
sal_Unicode
*
)
uno_ret
=
*
static_cast
<
sal_Unicode
*>
(
uno_ret
)
=
jni
->
CallCharMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_BOOLEAN
:
*
(
sal_Bool
*
)
uno_ret
=
*
static_cast
<
sal_Bool
*>
(
uno_ret
)
=
jni
->
CallBooleanMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_BYTE
:
*
(
sal_Int8
*
)
uno_ret
=
*
static_cast
<
sal_Int8
*>
(
uno_ret
)
=
jni
->
CallByteMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
*
(
sal_Int16
*
)
uno_ret
=
*
static_cast
<
sal_Int16
*>
(
uno_ret
)
=
jni
->
CallShortMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
*
(
sal_Int32
*
)
uno_ret
=
*
static_cast
<
sal_Int32
*>
(
uno_ret
)
=
jni
->
CallIntMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
*
(
sal_Int64
*
)
uno_ret
=
*
static_cast
<
sal_Int64
*>
(
uno_ret
)
=
jni
->
CallLongMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_FLOAT
:
*
(
float
*
)
uno_ret
=
*
static_cast
<
float
*>
(
uno_ret
)
=
jni
->
CallFloatMethodA
(
javaI
,
method_id
,
java_args
);
break
;
case
typelib_TypeClass_DOUBLE
:
*
(
double
*
)
uno_ret
=
*
static_cast
<
double
*>
(
uno_ret
)
=
jni
->
CallDoubleMethodA
(
javaI
,
method_id
,
java_args
);
break
;
default
:
...
...
@@ -726,7 +726,7 @@ void SAL_CALL UNO_proxy_dispatch(
info
->
m_td
.
get
()
)
);
uno_any_construct
(
(
uno_Any
*
)
uno_ret
,
&
pUnoI2
,
static_cast
<
uno_Any
*>
(
uno_ret
)
,
&
pUnoI2
,
demanded_td
.
get
(),
0
);
(
*
pUnoI2
->
release
)(
pUnoI2
);
}
...
...
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