- Notifications
You must be signed in to change notification settings - Fork28
Commit5afaa2e
committed
Rationalize code placement between wchar.c, encnames.c, and mbutils.c.
Move all the backend-only code that'd crept into wchar.c and encnames.cinto mbutils.c.To remove the last few #ifdef dependencies from wchar.c and encnames.c,also make the following changes:* Adjust get_encoding_name_for_icu to return NULL, not throw an error,for unsupported encodings. Its sole caller can perfectly well throw anerror instead. (While at it, I also made this function and its siblingis_encoding_supported_by_icu proof against out-of-range encoding IDs.)* Remove the overlength-name error condition from pg_char_to_encoding.It's completely silly not to treat that just like any otherthe-name-is-not-in-the-table case.Also, get rid of pg_mic_mblen --- there's no obvious reason whyconv.c shouldn't call pg_mule_mblen instead.Other than that, this is just code movement and comment-polishing withno functional changes. Notably, I reordered declarations in pg_wchar.hto show which functions are frontend-accessible and which are not.Discussion:https://postgr.es/m/CA+TgmoYO8oq-iy8E02rD8eX25T-9SmyxKWqqks5OMHxKvGXpXQ@mail.gmail.com1 parent3d4cb5d commit5afaa2e
File tree
6 files changed
+505
-536
lines changed- src
- backend/utils
- adt
- mb
- common
- include/mb
6 files changed
+505
-536
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1555 | 1555 |
| |
1556 | 1556 |
| |
1557 | 1557 |
| |
1558 |
| - | |
| 1558 | + | |
1559 | 1559 |
| |
1560 | 1560 |
| |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1561 | 1566 |
| |
1562 | 1567 |
| |
1563 | 1568 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 |
| - | |
| 118 | + | |
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
220 |
| - | |
| 220 | + | |
221 | 221 |
| |
222 | 222 |
| |
223 | 223 |
| |
|
0 commit comments
Comments
(0)