[Libreoffice-commits] core.git: 2 commits - offapi/com sal/osl

Lionel Elie Mamane lionel at mamane.lu
Sat Sep 7 00:42:11 PDT 2013


 offapi/com/sun/star/awt/UnoControlDateFieldModel.idl |    2 -
 sal/osl/unx/mutex.c                                  |   20 +++++--------------
 2 files changed, 6 insertions(+), 16 deletions(-)

New commits:
commit 98f08e463d2ddb80441493a6d7529b015025eebb
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Sep 7 09:39:47 2013 +0200

    Remove confusing casts between synonyms
    
    oslMutex and oslMutexImpl* are synonyms (via two typedefs).
    Casting between them makes the reader believe some more nefarious trick is at hand.
    
    Change-Id: Ib0e609fd1facca4d47242392ed2f8ff08451346b

diff --git a/sal/osl/unx/mutex.c b/sal/osl/unx/mutex.c
index 610dc7a..b894758 100644
--- a/sal/osl/unx/mutex.c
+++ b/sal/osl/unx/mutex.c
@@ -42,7 +42,7 @@ typedef struct _oslMutexImpl
 /*****************************************************************************/
 oslMutex SAL_CALL osl_createMutex()
 {
-    oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));
+    oslMutexImpl* pMutex = malloc(sizeof(oslMutexImpl));
     pthread_mutexattr_t aMutexAttr;
     int nRet=0;
 
@@ -69,16 +69,14 @@ oslMutex SAL_CALL osl_createMutex()
 
     pthread_mutexattr_destroy(&aMutexAttr);
 
-    return (oslMutex) pMutex;
+    return pMutex;
 }
 
 /*****************************************************************************/
 /* osl_destroyMutex */
 /*****************************************************************************/
-void SAL_CALL osl_destroyMutex(oslMutex Mutex)
+void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex)
 {
-    oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;
-
     OSL_ASSERT(pMutex);
 
     if ( pMutex != 0 )
@@ -101,10 +99,8 @@ void SAL_CALL osl_destroyMutex(oslMutex Mutex)
 /*****************************************************************************/
 /* osl_acquireMutex */
 /*****************************************************************************/
-sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex)
+sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex)
 {
-    oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;
-
     OSL_ASSERT(pMutex);
 
     if ( pMutex != 0 )
@@ -128,10 +124,8 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex)
 /*****************************************************************************/
 /* osl_tryToAcquireMutex */
 /*****************************************************************************/
-sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex)
+sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex)
 {
-    oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;
-
     OSL_ASSERT(pMutex);
 
     if ( pMutex )
@@ -151,10 +145,8 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex)
 /*****************************************************************************/
 /* osl_releaseMutex */
 /*****************************************************************************/
-sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex)
+sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex)
 {
-    oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;
-
     OSL_ASSERT(pMutex);
 
     if ( pMutex )
commit 8318ecfa88ba52a44e1b9a437678302bfd0d0eab
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Sep 7 09:25:58 2013 +0200

    clean up documentation
    
    Since LibreOffice 4.1.1, this changed
    from encoded integer to self-explaining structure.
    
    Change-Id: I633e85d1c2d5dca53313661bb3ec218480142dc8

diff --git a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
index 478bbd8..55073a2 100644
--- a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
@@ -65,8 +65,6 @@ published service UnoControlDateFieldModel
 
 
     /** specifies the date displayed in the control.
-
-        <p>The date must be specified in the format YYYYMMDD.</p>
      */
     [property] ::com::sun::star::util::Date Date;
 


More information about the Libreoffice-commits mailing list