summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-11-03 00:37:29 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-11-02 22:16:06 +0100
commitad686b26cec93653b67642f79bace16df0fd1348 (patch)
treeaf60fa5985659deb5a5c15bae45099b84f466e98 /cppu/source/uno
parenta9d1324b1dbf4a74ee0b02859eb3197005df1bb2 (diff)
No need to use SAL_THROW_EXTERN_C macro in CXX
Change-Id: I6eb9f0431a9402479a2d90d5b6f68b611d52a9f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/EnvStack.cxx15
-rw-r--r--cppu/source/uno/any.cxx24
-rw-r--r--cppu/source/uno/cascade_mapping.cxx3
-rw-r--r--cppu/source/uno/data.cxx39
-rw-r--r--cppu/source/uno/lbenv.cxx15
-rw-r--r--cppu/source/uno/lbmap.cxx18
-rw-r--r--cppu/source/uno/sequence.cxx27
7 files changed, 47 insertions, 94 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 7b7df2cefc5a..c44fa283f1a5 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -105,8 +105,7 @@ static uno_Environment * s_getCurrent()
}
-extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl_uString * pTypeName)
- SAL_THROW_EXTERN_C()
+extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl_uString * pTypeName) noexcept
{
if (*ppEnv)
{
@@ -306,14 +305,12 @@ static void s_environment_invoke_v(uno_Environment * pCurrEnv, uno_Environment *
pNextEnv->release(pNextEnv);
}
-extern "C" void SAL_CALL uno_Environment_invoke_v(uno_Environment * pTargetEnv, uno_EnvCallee * pCallee, va_list * pParam)
- SAL_THROW_EXTERN_C()
+extern "C" void SAL_CALL uno_Environment_invoke_v(uno_Environment * pTargetEnv, uno_EnvCallee * pCallee, va_list * pParam) noexcept
{
s_environment_invoke_v(s_getCurrent(), pTargetEnv, pCallee, pParam);
}
-extern "C" void SAL_CALL uno_Environment_invoke(uno_Environment * pEnv, uno_EnvCallee * pCallee, ...)
- SAL_THROW_EXTERN_C()
+extern "C" void SAL_CALL uno_Environment_invoke(uno_Environment * pEnv, uno_EnvCallee * pCallee, ...) noexcept
{
va_list param;
@@ -322,8 +319,7 @@ extern "C" void SAL_CALL uno_Environment_invoke(uno_Environment * pEnv, uno_EnvC
va_end(param);
}
-extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
- SAL_THROW_EXTERN_C()
+extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv) noexcept
{
uno_Environment * pNextEnv = nullptr;
uno_Environment * pCurrEnv = s_getCurrent();
@@ -355,8 +351,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
}
}
-int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pReason)
- SAL_THROW_EXTERN_C()
+int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pReason) noexcept
{
int result = 1;
diff --git a/cppu/source/uno/any.cxx b/cppu/source/uno/any.cxx
index e26b97286d01..342e760d0832 100644
--- a/cppu/source/uno/any.cxx
+++ b/cppu/source/uno/any.cxx
@@ -30,8 +30,7 @@ extern "C"
void SAL_CALL uno_type_any_assign(
uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType,
- uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
_destructAny( pDest, release );
if (pType)
@@ -47,8 +46,7 @@ void SAL_CALL uno_type_any_assign(
void SAL_CALL uno_any_assign(
uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
_destructAny( pDest, release );
if (pTypeDescr)
@@ -64,8 +62,7 @@ void SAL_CALL uno_any_assign(
void SAL_CALL uno_type_any_construct(
uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
if (pType)
{
@@ -80,8 +77,7 @@ void SAL_CALL uno_type_any_construct(
void SAL_CALL uno_any_construct(
uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
if (pTypeDescr)
{
@@ -96,8 +92,7 @@ void SAL_CALL uno_any_construct(
void SAL_CALL uno_type_any_constructAndConvert(
uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType,
- uno_Mapping * mapping )
- SAL_THROW_EXTERN_C()
+ uno_Mapping * mapping ) noexcept
{
if (pType)
{
@@ -112,8 +107,7 @@ void SAL_CALL uno_type_any_constructAndConvert(
void SAL_CALL uno_any_constructAndConvert(
uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_Mapping * mapping )
- SAL_THROW_EXTERN_C()
+ uno_Mapping * mapping ) noexcept
{
if (pTypeDescr)
{
@@ -125,14 +119,12 @@ void SAL_CALL uno_any_constructAndConvert(
}
}
-void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release ) noexcept
{
_destructAny( pValue, release );
}
-void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release ) noexcept
{
_destructAny( pValue, release );
CONSTRUCT_EMPTY_ANY( pValue );
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index 97aaa16ca09a..393d00c27f2d 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -149,8 +149,7 @@ void MediatorMapping::mapInterface(
*ppOut = ret;
}
-extern "C" { static void s_MediatorMapping_free(uno_Mapping * pMapping)
- SAL_THROW_EXTERN_C()
+extern "C" { static void s_MediatorMapping_free(uno_Mapping * pMapping) noexcept
{
delete static_cast<MediatorMapping *>(pMapping);
}}
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index 339e650fe411..e6279c8bfdbb 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -169,23 +169,20 @@ extern "C"
{
void SAL_CALL uno_type_constructData(
- void * pMem, typelib_TypeDescriptionReference * pType )
- SAL_THROW_EXTERN_C()
+ void * pMem, typelib_TypeDescriptionReference * pType ) noexcept
{
_defaultConstructData( pMem, pType, nullptr );
}
void SAL_CALL uno_constructData(
- void * pMem, typelib_TypeDescription * pTypeDescr )
- SAL_THROW_EXTERN_C()
+ void * pMem, typelib_TypeDescription * pTypeDescr ) noexcept
{
_defaultConstructData( pMem, pTypeDescr->pWeakRef, pTypeDescr );
}
void SAL_CALL uno_type_destructData(
void * pValue, typelib_TypeDescriptionReference * pType,
- uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_ReleaseFunc release ) noexcept
{
_destructData( pValue, pType, nullptr, release );
}
@@ -193,8 +190,7 @@ void SAL_CALL uno_type_destructData(
void SAL_CALL uno_destructData(
void * pValue,
typelib_TypeDescription * pTypeDescr,
- uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_ReleaseFunc release ) noexcept
{
_destructData( pValue, pTypeDescr->pWeakRef, pTypeDescr, release );
}
@@ -202,8 +198,7 @@ void SAL_CALL uno_destructData(
void SAL_CALL uno_type_copyData(
void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
_copyConstructData( pDest, pSource, pType, nullptr, acquire, nullptr );
}
@@ -211,8 +206,7 @@ void SAL_CALL uno_type_copyData(
void SAL_CALL uno_copyData(
void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
_copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, nullptr );
}
@@ -220,8 +214,7 @@ void SAL_CALL uno_copyData(
void SAL_CALL uno_type_copyAndConvertData(
void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType,
- uno_Mapping * mapping )
- SAL_THROW_EXTERN_C()
+ uno_Mapping * mapping ) noexcept
{
_copyConstructData( pDest, pSource, pType, nullptr, nullptr, mapping );
}
@@ -229,8 +222,7 @@ void SAL_CALL uno_type_copyAndConvertData(
void SAL_CALL uno_copyAndConvertData(
void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_Mapping * mapping )
- SAL_THROW_EXTERN_C()
+ uno_Mapping * mapping ) noexcept
{
_copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, nullptr, mapping );
}
@@ -238,8 +230,7 @@ void SAL_CALL uno_copyAndConvertData(
sal_Bool SAL_CALL uno_type_equalData(
void * pVal1, typelib_TypeDescriptionReference * pVal1Type,
void * pVal2, typelib_TypeDescriptionReference * pVal2Type,
- uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) noexcept
{
return _equalData(
pVal1, pVal1Type, nullptr,
@@ -250,8 +241,7 @@ sal_Bool SAL_CALL uno_type_equalData(
sal_Bool SAL_CALL uno_equalData(
void * pVal1, typelib_TypeDescription * pVal1TD,
void * pVal2, typelib_TypeDescription * pVal2TD,
- uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) noexcept
{
return _equalData(
pVal1, pVal1TD->pWeakRef, pVal1TD,
@@ -262,8 +252,7 @@ sal_Bool SAL_CALL uno_equalData(
sal_Bool SAL_CALL uno_type_assignData(
void * pDest, typelib_TypeDescriptionReference * pDestType,
void * pSource, typelib_TypeDescriptionReference * pSourceType,
- uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
return _assignData(
pDest, pDestType, nullptr,
@@ -274,8 +263,7 @@ sal_Bool SAL_CALL uno_type_assignData(
sal_Bool SAL_CALL uno_assignData(
void * pDest, typelib_TypeDescription * pDestTD,
void * pSource, typelib_TypeDescription * pSourceTD,
- uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
return _assignData(
pDest, pDestTD->pWeakRef, pDestTD,
@@ -286,8 +274,7 @@ sal_Bool SAL_CALL uno_assignData(
sal_Bool SAL_CALL uno_type_isAssignableFromData(
typelib_TypeDescriptionReference * pAssignable,
void * pFrom, typelib_TypeDescriptionReference * pFromType,
- uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) noexcept
{
if (::typelib_typedescriptionreference_isAssignableFrom( pAssignable, pFromType ))
return true;
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index ef1509f37d04..32a145e3de35 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -682,8 +682,7 @@ void writeLine(
}
extern "C" void SAL_CALL uno_dumpEnvironment(
- void * stream, uno_Environment * pEnv, const char * pFilter )
- SAL_THROW_EXTERN_C()
+ void * stream, uno_Environment * pEnv, const char * pFilter ) noexcept
{
assert(pEnv && "### null ptr!");
OUStringBuffer buf;
@@ -764,8 +763,7 @@ extern "C" void SAL_CALL uno_dumpEnvironment(
extern "C" void SAL_CALL uno_dumpEnvironmentByName(
- void * stream, rtl_uString * pEnvDcp, const char * pFilter )
- SAL_THROW_EXTERN_C()
+ void * stream, rtl_uString * pEnvDcp, const char * pFilter ) noexcept
{
uno_Environment * pEnv = nullptr;
uno_getEnvironment( &pEnv, pEnvDcp, nullptr );
@@ -1089,8 +1087,7 @@ static uno_Environment * initDefaultEnvironment(
void SAL_CALL uno_createEnvironment(
- uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext )
- SAL_THROW_EXTERN_C()
+ uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext ) noexcept
{
assert(ppEnv && "### null ptr!");
if (*ppEnv)
@@ -1101,8 +1098,7 @@ void SAL_CALL uno_createEnvironment(
}
void SAL_CALL uno_getEnvironment(
- uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext )
- SAL_THROW_EXTERN_C()
+ uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext ) noexcept
{
assert(ppEnv && "### null ptr!");
OUString const & rEnvDcp = OUString::unacquired( &pEnvDcp );
@@ -1124,8 +1120,7 @@ void SAL_CALL uno_getEnvironment(
void SAL_CALL uno_getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
- rtl_uString * pEnvDcp )
- SAL_THROW_EXTERN_C()
+ rtl_uString * pEnvDcp ) noexcept
{
EnvironmentsData & rData = theEnvironmentsData();
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index a2a554b84cf6..dc135a2be484 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -578,8 +578,7 @@ extern "C"
void SAL_CALL uno_getMapping(
uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo,
- rtl_uString * pAddPurpose )
- SAL_THROW_EXTERN_C()
+ rtl_uString * pAddPurpose ) noexcept
{
assert(ppMapping != nullptr);
assert(pFrom != nullptr);
@@ -644,8 +643,7 @@ void SAL_CALL uno_getMapping(
void SAL_CALL uno_getMappingByName(
uno_Mapping ** ppMapping, rtl_uString * pFrom, rtl_uString * pTo,
- rtl_uString * pAddPurpose )
- SAL_THROW_EXTERN_C()
+ rtl_uString * pAddPurpose ) noexcept
{
assert(ppMapping && pFrom && pTo && "### null ptr!");
if (*ppMapping)
@@ -674,8 +672,7 @@ void SAL_CALL uno_getMappingByName(
void SAL_CALL uno_registerMapping(
uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping,
- uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose )
- SAL_THROW_EXTERN_C()
+ uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ) noexcept
{
MappingsData & rData = getMappingsData();
ClearableMutexGuard aGuard( rData.aMappingsMutex );
@@ -708,8 +705,7 @@ void SAL_CALL uno_registerMapping(
}
void SAL_CALL uno_revokeMapping(
- uno_Mapping * pMapping )
- SAL_THROW_EXTERN_C()
+ uno_Mapping * pMapping ) noexcept
{
MappingsData & rData = getMappingsData();
ClearableMutexGuard aGuard( rData.aMappingsMutex );
@@ -730,8 +726,7 @@ void SAL_CALL uno_revokeMapping(
void SAL_CALL uno_registerMappingCallback(
- uno_getMappingFunc pCallback )
- SAL_THROW_EXTERN_C()
+ uno_getMappingFunc pCallback ) noexcept
{
OSL_ENSURE( pCallback, "### null ptr!" );
MappingsData & rData = getMappingsData();
@@ -740,8 +735,7 @@ void SAL_CALL uno_registerMappingCallback(
}
void SAL_CALL uno_revokeMappingCallback(
- uno_getMappingFunc pCallback )
- SAL_THROW_EXTERN_C()
+ uno_getMappingFunc pCallback ) noexcept
{
OSL_ENSURE( pCallback, "### null ptr!" );
MappingsData & rData = getMappingsData();
diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 1a8da6d53c96..e249f7549780 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -668,8 +668,7 @@ extern "C"
sal_Bool SAL_CALL uno_type_sequence_construct(
uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType,
void * pElements, sal_Int32 len,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
assert( len >= 0 );
bool ret;
@@ -716,8 +715,7 @@ sal_Bool SAL_CALL uno_type_sequence_construct(
sal_Bool SAL_CALL uno_sequence_construct(
uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr,
void * pElements, sal_Int32 len,
- uno_AcquireFunc acquire )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire ) noexcept
{
bool ret;
if (len > 0)
@@ -754,8 +752,7 @@ sal_Bool SAL_CALL uno_sequence_construct(
sal_Bool SAL_CALL uno_type_sequence_realloc(
uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType,
- sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
assert(ppSequence && "### null ptr!");
assert(nSize >= 0 && "### new size must be at least 0!");
@@ -776,8 +773,7 @@ sal_Bool SAL_CALL uno_type_sequence_realloc(
sal_Bool SAL_CALL uno_sequence_realloc(
uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr,
- sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ sal_Int32 nSize, uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
assert(ppSequence && "### null ptr!");
OSL_ENSURE( nSize >= 0, "### new size must be at least 0!" );
@@ -796,8 +792,7 @@ sal_Bool SAL_CALL uno_sequence_realloc(
sal_Bool SAL_CALL uno_type_sequence_reference2One(
uno_Sequence ** ppSequence,
typelib_TypeDescriptionReference * pType,
- uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
assert(ppSequence && "### null ptr!");
bool ret = true;
@@ -843,8 +838,7 @@ sal_Bool SAL_CALL uno_type_sequence_reference2One(
sal_Bool SAL_CALL uno_sequence_reference2One(
uno_Sequence ** ppSequence,
typelib_TypeDescription * pTypeDescr,
- uno_AcquireFunc acquire, uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_AcquireFunc acquire, uno_ReleaseFunc release ) noexcept
{
assert(ppSequence && "### null ptr!");
bool ret = true;
@@ -888,8 +882,7 @@ void SAL_CALL uno_sequence_assign(
uno_Sequence ** ppDest,
uno_Sequence * pSource,
typelib_TypeDescription * pTypeDescr,
- uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_ReleaseFunc release ) noexcept
{
if (*ppDest != pSource)
{
@@ -904,8 +897,7 @@ void SAL_CALL uno_type_sequence_assign(
uno_Sequence ** ppDest,
uno_Sequence * pSource,
typelib_TypeDescriptionReference * pType,
- uno_ReleaseFunc release )
- SAL_THROW_EXTERN_C()
+ uno_ReleaseFunc release ) noexcept
{
if (*ppDest != pSource)
{
@@ -917,8 +909,7 @@ void SAL_CALL uno_type_sequence_assign(
void uno_type_sequence_destroy(
uno_Sequence * sequence, typelib_TypeDescriptionReference * type,
- uno_ReleaseFunc release)
- SAL_THROW_EXTERN_C()
+ uno_ReleaseFunc release) noexcept
{
idestroySequence(sequence, type, nullptr, release);
}