This macro is used as a general solution to remove duplicated hardcode
strings when both the ASCII and UNICODE format of a string is needed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
---
 MdePkg/Include/Base.h | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index def5aa6..8c46bb9 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -6,7 +6,7 @@
   environment. There are a set of base libraries in the Mde Package that can
   be used to implement base modules.
 
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
@@ -725,6 +725,20 @@ typedef UINTN  *BASE_LIST;
 #define ABS(a)                          \
   (((a) < 0) ? (-(a)) : (a))
 
+/**
+  Return the UNICODE format of an ASCII string.
+
+  This macro returns the UNICODE format of an ASCII string specified by a.
+
+  @param   a        The ASCII string operand.
+
+  @return  The UNICODE format of the ASCII string operand.
+
+**/
+#define UNICODE_TEXT_TEMP(a)  (L##a)
+#define UNICODE_TEXT(a)  UNICODE_TEXT_TEMP(a)
+
+
 //
 // Status codes common to all execution phases
 //
-- 
1.9.5.msysgit.0



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to