summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2022-08-30 18:20:27 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-19 06:32:07 +0000
commit0f6eccdbf75885631221388d362417eb7b873ce0 (patch)
tree63fd08fcf330441a1fd16d3504893cd6e73d1efa /BaseTools/Source/Python
parent1d0ff11526fc6da71a6575c6720494dd5961ab83 (diff)
downloadedk2-0f6eccdbf75885631221388d362417eb7b873ce0.tar.gz
edk2-0f6eccdbf75885631221388d362417eb7b873ce0.tar.bz2
edk2-0f6eccdbf75885631221388d362417eb7b873ce0.zip
BaseTools: Add missing spaces for PCD expression values in AutoGenC
Currently the PCD values calculated from the expressions have different formating from the simple byte arrays in AutoGenC. Example: The following definition in DEC: gTokenSpaceGuid.PcdArray|{0x44, 0x33, 0x22, 0x11}|VOID*|0x55555555 gTokenSpaceGuid.PcdArrayByExpression|{UINT32(0x11223344)}|VOID*|0x66666666 Produces these strings in AutoGenC: <...> _gPcd_<...>_PcdArray[4] = {0x44, 0x33, 0x22, 0x11}; <...> _gPcd_<...>_PcdArrayByExpression[4] = {0x44,0x33,0x22,0x11}; Add missing space character between the array elements to unify PCD value formatting. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 31bf0e4b6c..b62efe6f9b 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -1026,7 +1026,7 @@ class ValueExpressionEx(ValueExpression):
Size += ItemSize
if Size > 0:
- PcdValue = '{' + ','.join(AllPcdValueList) + '}'
+ PcdValue = '{' + ', '.join(AllPcdValueList) + '}'
else:
raise BadExpression("Type: %s, Value: %s, %s"%(self.PcdType, PcdValue, Value))