8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 08:03:03 +01:00

Make INTL_TEXT_TYPE works with blobs

This commit is contained in:
asfernandes 2006-05-13 01:19:31 +00:00
parent 69975f0b19
commit 6203905163

View File

@ -24,6 +24,8 @@
#ifndef JRD_INTL_H
#define JRD_INTL_H
#include "../jrd/dsc.h"
#include "../jrd/ibase.h"
#include "../intl/charsets.h"
#define ASCII_SPACE 32 /* ASCII code for space */
@ -92,7 +94,20 @@
#define IS_INTL_DATA(d) ((d)->dsc_dtype <= dtype_any_text && \
(((USHORT)((d)->dsc_ttype())) > ttype_last_internal))
#define INTL_TEXT_TYPE(desc) ((DTYPE_IS_TEXT((desc).dsc_dtype)) ? INTL_TTYPE (&(desc)) : ttype_ascii)
inline USHORT INTL_TEXT_TYPE(const dsc& desc)
{
if (DTYPE_IS_TEXT(desc.dsc_dtype))
return INTL_TTYPE(&desc);
else if (desc.dsc_dtype == dtype_blob || desc.dsc_dtype == dtype_quad)
{
if (desc.dsc_sub_type == isc_blob_text)
return desc.dsc_blob_ttype();
else
return ttype_binary;
}
else
return ttype_ascii;
}
#define INTL_DYNAMIC_CHARSET(desc) (INTL_GET_CHARSET(desc) == CS_dynamic)