[CDRIVER-4617] Explore alternatives to X macros in mongoc-rpc.c Created: 18/Apr/23 Updated: 28/Oct/23 Resolved: 26/Jun/23 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.24.0, 1.25.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Ezra Chung | Assignee: | Ezra Chung |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The X macro pattern used by mongoc-rpc-private.h and mongoc-rpc.c to define structs and their corresponding gather/printf/swab_(to/from)_le/scatter functions has been a continued source of frustration when attempting to debug RPC function behavior. As we continue to improve OP_MSG support and move away from legacy opcodes, it may be worth refactoring this component to improve readability and the debugging experience. |
| Comments |
| Comment by Ezra Chung [ 26/Jun/23 ] |
|
New mcd-rpc utilities introduced in 1.24.0 with corresponding libmongoc refactor. Old mongoc-rpc utilities removed in 1.25.0. |
| Comment by Githook User [ 26/Jun/23 ] |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message: |
| Comment by Githook User [ 16/Jun/23 ] |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message:
|