]> pd.if.org Git - pdclib/commitdiff
Pointer typedef resulted in non-const structure where const was intended.
authorMartin Baute <solar@rootdirectory.de>
Tue, 8 Mar 2016 07:15:24 +0000 (08:15 +0100)
committerMartin Baute <solar@rootdirectory.de>
Tue, 8 Mar 2016 07:15:24 +0000 (08:15 +0100)
internals/_PDCLIB_encoding.h
internals/_PDCLIB_int.h
internals/_PDCLIB_locale.h
opt/basecodecs/_PDCLIB_ascii.c
opt/basecodecs/_PDCLIB_latin1.c
opt/basecodecs/_PDCLIB_utf8.c
platform/example/functions/_PDCLIB/stdinit.c
platform/gandr/functions/_PDCLIB/_PDCLIB_stdinit.c
platform/posix/functions/_PDCLIB/_PDCLIB_stdinit.c
platform/win32/functions/_PDCLIB/_PDCLIB_stdinit.c

index fdaee7ee42061044cdb792212b3ef5b4a24287c1..10f1140c3e73527670d08ab20c246a4ce9572d27 100644 (file)
@@ -86,7 +86,7 @@ static inline _PDCLIB_size_t _PDCLIB_c32rtoc16(
     }
 }
 
     }
 }
 
-struct _PDCLIB_charcodec {
+struct _PDCLIB_charcodec_t {
     /* Reads at most *_P_insz code units from *_P_inbuf and writes the result 
      * into *_P_outbuf, writing at most *_P_outsz code units. Updates 
      * *_P_outbuf, *_P_outsz, *_P_inbuf, *_P_outsz with the resulting state
     /* Reads at most *_P_insz code units from *_P_inbuf and writes the result 
      * into *_P_outbuf, writing at most *_P_outsz code units. Updates 
      * *_P_outbuf, *_P_outsz, *_P_inbuf, *_P_outsz with the resulting state
index 43ef73900a15caa0dad6e1bd6f0649bca4fbc1dd..ab1bc90b777879c03c2a53c25b8aaf323ca93bd9 100644 (file)
@@ -367,7 +367,6 @@ typedef struct _PDCLIB_mbstate {
              char _PendChar;
 } _PDCLIB_mbstate_t;
 
              char _PendChar;
 } _PDCLIB_mbstate_t;
 
-typedef struct _PDCLIB_charcodec *_PDCLIB_charcodec_t;
 typedef struct _PDCLIB_locale    *_PDCLIB_locale_t;
 typedef struct lconv              _PDCLIB_lconv_t;
 
 typedef struct _PDCLIB_locale    *_PDCLIB_locale_t;
 typedef struct lconv              _PDCLIB_lconv_t;
 
index 9644eb4b19c3b836b43505d2358f999093eb3799..82e17b04a580465a0189901da17fb79ef8cfbad4 100644 (file)
@@ -82,8 +82,8 @@ typedef struct _PDCLIB_wcinfo
 } _PDCLIB_wcinfo_t;
 
 struct _PDCLIB_locale {
 } _PDCLIB_wcinfo_t;
 
 struct _PDCLIB_locale {
-    const _PDCLIB_charcodec_t    _Codec;
-    struct lconv                 _Conv;
+    const struct _PDCLIB_charcodec_t * _Codec;
+    struct lconv                       _Conv;
 
     /* ctype / wctype */
     /* XXX: Maybe re-evaluate constness of these later on? */
 
     /* ctype / wctype */
     /* XXX: Maybe re-evaluate constness of these later on? */
index 7c73d1baf613dc9d8a15511831ff613e014a2c6c..1432153f7f2ce26de8a36228fde4ed5a1669faad 100644 (file)
@@ -62,7 +62,7 @@ static bool c32toascii(
     return true;
 }
 
     return true;
 }
 
-const struct _PDCLIB_charcodec _PDCLIB_ascii_codec = {
+const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec = {
     .__mbsinit   = ascii_mbsinit,
     .__mbstoc32s = asciitoc32,
     .__c32stombs = c32toascii,
     .__mbsinit   = ascii_mbsinit,
     .__mbstoc32s = asciitoc32,
     .__c32stombs = c32toascii,
index b9de8cafc83bd2d59df317fceb052d569a8196d7..5961a443d7e46319bf812980d7cad4eecb5e4246 100644 (file)
@@ -60,7 +60,7 @@ static bool c32tolatin1(
     return true;
 }
 
     return true;
 }
 
-const struct _PDCLIB_charcodec _PDCLIB_latin1_codec = {
+const struct _PDCLIB_charcodec_t _PDCLIB_latin1_codec = {
     .__mbsinit   = latin1_mbsinit,
     .__mbstoc32s = latin1toc32,
     .__c32stombs = c32tolatin1,
     .__mbsinit   = latin1_mbsinit,
     .__mbstoc32s = latin1toc32,
     .__c32stombs = c32tolatin1,
index 1dfc83a12ee8599c937e400052cc915b4b9f6c78..6348c79ed852a251cd714ebb05ea1db6077207ce 100644 (file)
@@ -232,7 +232,7 @@ static bool c32toutf8(
     END_CONVERSION;
 }
 
     END_CONVERSION;
 }
 
-const struct _PDCLIB_charcodec _PDCLIB_utf8_codec = {
+const struct _PDCLIB_charcodec_t _PDCLIB_utf8_codec = {
     .__mbsinit   = utf8_mbsinit,
     .__mbstoc32s = utf8toc32,
     .__c32stombs = c32toutf8,
     .__mbsinit   = utf8_mbsinit,
     .__mbstoc32s = utf8toc32,
     .__c32stombs = c32toutf8,
index 6481c38cc622749d653351f46085ff004015f9d7..986073e2d87fc46a3ba28e2d11f03a99e13b02bc 100644 (file)
@@ -340,7 +340,7 @@ static const _PDCLIB_ctype_t global_ctype[] = {
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
-extern const struct _PDCLIB_charcodec _PDCLIB_ascii_codec;
+extern const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec;
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = { 
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = { 
index 9504186659eb8c7333bf15b3c2a156cb723bf642..c622ff043c2bf36ea2b264970c5ab701f83c31e4 100644 (file)
@@ -279,7 +279,7 @@ static const _PDCLIB_ctype_t global_ctype[] = {
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
-extern const struct _PDCLIB_charcodec _PDCLIB_ascii_codec;
+extern const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec;
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = {
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = {
index 18fcc22efd0dbf7d2f457932eaa23dbc17ad430e..defb303e8f7bf1e0eafdb34a4ff079ac01ce2949 100644 (file)
@@ -346,7 +346,7 @@ static const _PDCLIB_ctype_t global_ctype[] = {
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
-extern const struct _PDCLIB_charcodec _PDCLIB_ascii_codec;
+extern const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec;
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = { 
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = { 
index d8f17742c8ca7ae336d54ada196411f65d9ae341..15ce30b5b9eca12456d5ee85721c1905a3d87bfc 100644 (file)
@@ -343,7 +343,7 @@ static const _PDCLIB_ctype_t global_ctype[] = {
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
-extern const struct _PDCLIB_charcodec _PDCLIB_ascii_codec;
+extern const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec;
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = { 
 struct _PDCLIB_locale _PDCLIB_global_locale = {
     ._Codec = &_PDCLIB_ascii_codec,
     ._Conv  = {