mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 11:14:22 +00:00
ICU-2969 Don't #include "cmemory.h" unless LE_USE_CMEMORY, U_LAYOUT_IMPLEMENTATION or U_LAYOUTEX_IMPLEMENTATION is defined.
X-SVN-Rev: 12272
This commit is contained in:
parent
2074a38f25
commit
a126e9e9c5
2 changed files with 14 additions and 5 deletions
|
@ -9,9 +9,16 @@
|
|||
#ifndef __LETYPES_H
|
||||
#define __LETYPES_H
|
||||
|
||||
#if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
|
||||
#define LE_USE_CMEMORY
|
||||
#endif
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#ifdef LE_USE_CMEMORY
|
||||
#include "cmemory.h"
|
||||
#endif
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
|
@ -274,10 +281,11 @@ struct LEPoint
|
|||
typedef struct LEPoint LEPoint;
|
||||
#endif
|
||||
|
||||
#ifdef LE_USE_CMEMORY
|
||||
/**
|
||||
* A convenience macro for copying an array.
|
||||
*
|
||||
* @stable ICU 2.4
|
||||
* @internal
|
||||
*/
|
||||
#define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
|
||||
|
||||
|
@ -285,7 +293,7 @@ typedef struct LEPoint LEPoint;
|
|||
* Allocate an array of basic types. This is used to isolate the rest of
|
||||
* the LayoutEngine code from cmemory.h.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @internal
|
||||
*/
|
||||
#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type))
|
||||
|
||||
|
@ -293,7 +301,7 @@ typedef struct LEPoint LEPoint;
|
|||
* Re-allocate an array of basic types. This is used to isolate the rest of
|
||||
* the LayoutEngine code from cmemory.h.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @internal
|
||||
*/
|
||||
#define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
|
||||
|
||||
|
@ -301,9 +309,10 @@ typedef struct LEPoint LEPoint;
|
|||
* Free an array of basic types. This is used to isolate the rest of
|
||||
* the LayoutEngine code from cmemory.h.
|
||||
*
|
||||
* @draft ICU 2.6
|
||||
* @internal
|
||||
*/
|
||||
#define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A macro to construct the four-letter tags used to
|
||||
|
|
|
@ -25,7 +25,7 @@ TARGET = gnomelayout
|
|||
CPPFLAGS += `gnome-config --cflags gnomeui` -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/layoutex -I$(top_srcdir)/layout -I$(top_srcdir) -g
|
||||
|
||||
# Change the following as needed to locate freetype.
|
||||
CPPFLAGS += -I/usr/include/freetype1
|
||||
CPPFLAGS += -DLE_USE_CMEMORY -I/usr/include/freetype1
|
||||
|
||||
LIBS = $(LIBICULX) $(LIBICULE) $(LIBICUUC) $(LIBICUI18N) @LIBS@ @LIB_M@ `gnome-config --libs gnomeui` -lttf
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue