Add specialised alloc/copy functions for wchar_t and qchar.