#NEWLINE# def set_unicode( self , enabled_flag ) : #NEWLINE# #INDENT# "Windows: if 'enabled_flag' is True, enable the UNICODE and\n        _UNICODE defines in C, and declare the types like TCHAR and LPTCSTR\n        to be (pointers to) wchar_t.  If 'enabled_flag' is False,\n        declare these types to be (pointers to) plain 8-bit characters.\n        This is mostly for backward compatibility; you usually want True.\n        " #NEWLINE# if ( enabled_flag . _windows_unicode is not None ) : #NEWLINE# #INDENT# raise ValueError ( 'set_unicode() can only be called once' ) #NEWLINE# #UNINDENT# enabled_flag = bool ( enabled_flag ) #NEWLINE# if enabled_flag : #NEWLINE# #INDENT# self . cdef ( 'typedef wchar_t TBYTE;typedef wchar_t TCHAR;typedef const wchar_t *LPCTSTR;typedef const wchar_t *PCTSTR;typedef wchar_t *LPTSTR;typedef wchar_t *PTSTR;typedef TBYTE *PTBYTE;typedef TCHAR *PTCHAR;' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . cdef ( 'typedef char TBYTE;typedef char TCHAR;typedef const char *LPCTSTR;typedef const char *PCTSTR;typedef char *LPTSTR;typedef char *PTSTR;typedef TBYTE *PTBYTE;typedef TCHAR *PTCHAR;' ) #NEWLINE# #UNINDENT# self . _windows_unicode = enabled_flag