浏览代码

Fix build error

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 年之前
父节点
当前提交
8c7a9409a2
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5 0
      common/deftype/deftype.cpp
  2. 1 0
      common/deftype/deftype.hpp

+ 5 - 0
common/deftype/deftype.cpp

@@ -239,6 +239,11 @@ static IValue * castViaString(ITypeInfo * type, bool isSignedValue, __int64 valu
     return temp2->castTo(type);
 }
 
+bool isAscii(ITypeInfo * type)
+{
+    return type->queryCharset()->queryName() == asciiAtom;
+}
+
 //===========================================================================
 
 CTypeInfo::~CTypeInfo()

+ 1 - 0
common/deftype/deftype.hpp

@@ -287,6 +287,7 @@ extern DEFTYPE_API ICharsetInfo * getCharset(_ATOM charset);
 extern DEFTYPE_API ICollationInfo * getCollation(_ATOM collation);
 extern DEFTYPE_API ITranslationInfo * getDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
 extern DEFTYPE_API ITranslationInfo * queryDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
+extern DEFTYPE_API bool isAscii(ITypeInfo * type);
 
 //---------------------------------------------------------------------------