diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-05-24 16:05:19 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-05-24 16:05:19 (GMT) |
| commit | b7eeffcdef4802086b4f43db1619b2784d74aa79 (patch) | |
| tree | 0e5d90abdf8a9e69a0fc4383d8ceac9d115a02c4 /generic/tclEncoding.c | |
| parent | 14145609e7b52c939ce5bc328b87b8ab02c7a431 (diff) | |
| parent | b230de2a4d3e8748a542c21d0dfde9e357ac0b0a (diff) | |
| download | tcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.zip tcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.tar.gz tcl-b7eeffcdef4802086b4f43db1619b2784d74aa79.tar.bz2 | |
Merge trunk
Diffstat (limited to 'generic/tclEncoding.c')
| -rw-r--r-- | generic/tclEncoding.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 4b1ef16..0844303 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -258,7 +258,6 @@ static Tcl_EncodingConvertProc UtfToUtfProc; static Tcl_EncodingConvertProc Iso88591FromUtfProc; static Tcl_EncodingConvertProc Iso88591ToUtfProc; - /* * A Tcl_ObjType for holding a cached Tcl_Encoding in the twoPtrValue.ptr1 field * of the internalrep. This should help the lifetime of encodings be more useful. @@ -274,21 +273,20 @@ static const Tcl_ObjType encodingType = { TCL_OBJTYPE_V0 }; -#define EncodingSetInternalRep(objPtr, encoding) \ +#define EncodingSetInternalRep(objPtr, encoding) \ do { \ Tcl_ObjInternalRep ir; \ ir.twoPtrValue.ptr1 = (encoding); \ ir.twoPtrValue.ptr2 = NULL; \ - Tcl_StoreInternalRep((objPtr), &encodingType, &ir); \ + Tcl_StoreInternalRep((objPtr), &encodingType, &ir); \ } while (0) -#define EncodingGetInternalRep(objPtr, encoding) \ +#define EncodingGetInternalRep(objPtr, encoding) \ do { \ - const Tcl_ObjInternalRep *irPtr; \ + const Tcl_ObjInternalRep *irPtr; \ irPtr = TclFetchInternalRep ((objPtr), &encodingType); \ - (encoding) = irPtr ? (Tcl_Encoding)irPtr->twoPtrValue.ptr1 : NULL; \ + (encoding) = irPtr ? (Tcl_Encoding)irPtr->twoPtrValue.ptr1 : NULL; \ } while (0) - /* *---------------------------------------------------------------------- @@ -1112,7 +1110,6 @@ Tcl_ExternalToUtfDString( NULL, encoding, src, srcLen, TCL_ENCODING_PROFILE_TCL8, dstPtr, NULL); return Tcl_DStringValue(dstPtr); } - /* *------------------------------------------------------------------------- @@ -1158,14 +1155,14 @@ Tcl_ExternalToUtfDStringEx( Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ const char *src, /* Source string in specified encoding. */ - Tcl_Size srcLen, /* Source string length in bytes, or < 0 for + Tcl_Size srcLen, /* Source string length in bytes, or < 0 for * encoding-specific string length. */ int flags, /* Conversion control flags. */ Tcl_DString *dstPtr, /* Uninitialized or free DString in which the * converted string is stored. */ Tcl_Size *errorLocPtr) /* Where to store the error location - (or TCL_INDEX_NONE if no error). May - be NULL. */ + * (or TCL_INDEX_NONE if no error). May + * be NULL. */ { char *dst; Tcl_EncodingState state; @@ -1430,7 +1427,6 @@ Tcl_UtfToExternalDString( NULL, encoding, src, srcLen, TCL_ENCODING_PROFILE_TCL8, dstPtr, NULL); return Tcl_DStringValue(dstPtr); } - /* *------------------------------------------------------------------------- @@ -1481,8 +1477,8 @@ Tcl_UtfToExternalDStringEx( Tcl_DString *dstPtr, /* Uninitialized or free DString in which the * converted string is stored. */ Tcl_Size *errorLocPtr) /* Where to store the error location - (or TCL_INDEX_NONE if no error). May - be NULL. */ + * (or TCL_INDEX_NONE if no error). May + * be NULL. */ { char *dst; Tcl_EncodingState state; |
