[Libreoffice-commits] core.git: 2 commits - connectivity/source idlc/source include/typelib l10ntools/source
Caolán McNamara
caolanm at redhat.com
Thu May 23 05:57:43 PDT 2013
connectivity/source/parse/sqlflex.l | 2
idlc/source/scanner.l | 2
include/typelib/typedescription.h | 96 ++++++++++++++++++------------------
l10ntools/source/cfglex.l | 2
l10ntools/source/srclex.l | 2
l10ntools/source/xrmlex.l | 2
6 files changed, 55 insertions(+), 51 deletions(-)
New commits:
commit 2ae6f9d1d27f699a6dcf369ba018c93ea7d5def5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 23 12:20:26 2013 +0100
RHEL-5 baseline ver of flex doesn't have nounistd
lets try this hack, if it fails revert and I'll just
manually update the baseline with a newer flex than
flex-2.5.4a-41.fc6
Change-Id: If644489e80fc4e4cdba97808af0fe4d544d08646
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 166bbf6..0f7c3b5 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -60,6 +60,7 @@
#endif
/**/
#endif
+#define YY_NO_UNISTD_H
using namespace connectivity;
@@ -110,7 +111,6 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL;
%option noyywrap
%option never-interactive
-%option nounistd
%%
ABS {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); }
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index ca5119f..51204b8 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -257,11 +257,11 @@ static void parseLineAndFile(sal_Char* pBuf)
#endif
/**/
#endif
+#define YY_NO_UNISTD_H
%}
%option noyywrap
%option never-interactive
-%option nounistd
%x DOCU
%x COMMENT
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index a5c6988..501debd 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -53,6 +53,7 @@
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
+#define YY_NO_UNISTD_H
int yycolumn = 1;
#define YY_USER_ACTION yycolumn += yyleng;
@@ -66,7 +67,6 @@ int bText=0;
%option yylineno
%option never-interactive
-%option nounistd
%p 24000
%e 1200
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 0f21955..91742a1 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -54,6 +54,7 @@
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
+#define YY_NO_UNISTD_H
/* external functions (C++ code, declared as extern "C" */
extern "C" int WorkOnTokenSet( int, char* );
@@ -68,7 +69,6 @@ void YYWarning();
%option yylineno
%option never-interactive
-%option nounistd
%p 24000
%e 1200
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 7f28d3f..73e3bab 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -53,6 +53,7 @@
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
+#define YY_NO_UNISTD_H
/* external functions (C++ code, declared as extern "C" */
extern "C" int WorkOnTokenSet( int, char* );
@@ -74,7 +75,6 @@ int bText=0;
%option yylineno
%option never-interactive
-%option nounistd
%p 24000
%e 1200
commit fd5a9f20ef7b68439820a385f4527ba94a5a0d03
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Mar 12 12:52:08 2013 +0000
use debuggable and type-safe inline methods to replace macros...
in typedescription.h
(cherry picked from commit a0809605f7612de439f0fc1f007177c6c463d0df)
Conflicts:
cppu/inc/typelib/typedescription.h
Change-Id: I4ef735b896dc0833733e0141ce4c3fefcb820ded
reshuffle declarations in typedescription.h to make forward-decls redundant
(cherry picked from commit 0a6ba29e675385ce0aa49bb6ecd8d45b7aa0997b)
Conflicts:
cppu/inc/typelib/typedescription.h
Change-Id: I91486656606464c7e76fa349a02d45a96c0cfb4d
diff --git a/include/typelib/typedescription.h b/include/typelib/typedescription.h
index 89d718f..3195870 100644
--- a/include/typelib/typedescription.h
+++ b/include/typelib/typedescription.h
@@ -856,52 +856,6 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_revokeCallback(
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
-/// @cond INTERNAL
-
-/** Returns true, if the type description reference may lose the type description. Otherwise
- pType is a valid pointer and cannot be discarded through the lifetime of this reference.
- Remark: If the pWeakObj of the type is set too, you can avoid the call of
- ...getDescription(...) and use the description directly. pWeakObj == 0 means, that the
- description is not initialized.
-*/
-#define TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ) \
- ((eTypeClass) == typelib_TypeClass_INTERFACE_METHOD || \
- (eTypeClass) == typelib_TypeClass_INTERFACE_ATTRIBUTE)
-
-/** Gets a description from the reference. The description may not be locked by this call.
- You must use the TYPELIB_DANGER_RELEASE macro to release the description fetched with
- this macro.
-*/
-#define TYPELIB_DANGER_GET( ppDescription, pTypeRef ) \
-{ \
- typelib_TypeDescriptionReference * pMacroTypeRef = (pTypeRef); \
- typelib_TypeDescription ** ppMacroTypeDescr = (ppDescription); \
- if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( pMacroTypeRef->eTypeClass )) \
- { \
- typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef ); \
- } \
- else if (!pMacroTypeRef->pType || !pMacroTypeRef->pType->pWeakRef) \
- { \
- typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef ); \
- if (*ppMacroTypeDescr) \
- typelib_typedescription_release( *ppMacroTypeDescr ); \
- } \
- else \
- { \
- *ppMacroTypeDescr = pMacroTypeRef->pType; \
- } \
-}
-
-/** Releases the description previouse fetched by TYPELIB_DANGER_GET.
-*/
-#define TYPELIB_DANGER_RELEASE( pDescription ) \
-{ \
- if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( (pDescription)->eTypeClass )) \
- typelib_typedescription_release( pDescription ); \
-}
-
-/// @endcond
-
/** Creates a type description reference. This is a weak reference not holding the description.
If the description is already registered, the previous one is returned.
@@ -1139,6 +1093,56 @@ CPPU_DLLPUBLIC sal_Bool SAL_CALL typelib_typedescription_complete(
typelib_TypeDescription ** ppTypeDescr )
SAL_THROW_EXTERN_C();
+/// @cond INTERNAL
+
+/** Returns true, if the type description reference may lose the type description. Otherwise
+ pType is a valid pointer and cannot be discarded through the lifetime of this reference.
+ Remark: If the pWeakObj of the type is set too, you can avoid the call of
+ ...getDescription(...) and use the description directly. pWeakObj == 0 means, that the
+ description is not initialized.
+ @internal
+*/
+inline bool TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( _typelib_TypeClass eTypeClass )
+{
+ return (eTypeClass == typelib_TypeClass_INTERFACE_METHOD) ||
+ (eTypeClass == typelib_TypeClass_INTERFACE_ATTRIBUTE);
+}
+
+/** Gets a description from the reference. The description may not be locked by this call.
+ You must use the TYPELIB_DANGER_RELEASE macro to release the description fetched with
+ this macro.
+ @internal
+*/
+inline void TYPELIB_DANGER_GET( typelib_TypeDescription** ppMacroTypeDescr,
+ typelib_TypeDescriptionReference* pMacroTypeRef )
+{
+ if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( pMacroTypeRef->eTypeClass ))
+ {
+ typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef );
+ }
+ else if (!pMacroTypeRef->pType || !pMacroTypeRef->pType->pWeakRef)
+ {
+ typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef );
+ if (*ppMacroTypeDescr)
+ typelib_typedescription_release( *ppMacroTypeDescr );
+ }
+ else
+ {
+ *ppMacroTypeDescr = pMacroTypeRef->pType;
+ }
+}
+
+/** Releases the description previouse fetched by TYPELIB_DANGER_GET.
+ @internal
+*/
+inline void TYPELIB_DANGER_RELEASE( typelib_TypeDescription* pDescription )
+{
+ if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( pDescription->eTypeClass ))
+ typelib_typedescription_release( pDescription );
+}
+
+/// @endcond
+
#ifdef __cplusplus
}
#endif
More information about the Libreoffice-commits
mailing list