[CDRIVER-445] int32 and int64 warnings Created: 17/Oct/14 Updated: 18/Sep/23 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 1.0.2 |
| Fix Version/s: | 2.0.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Jerome Lebel | Assignee: | Ezra Chung |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CDRIVER-4576 |
| Quarter: | FY24Q4 |
| Description |
|
I wish to have no more warnings (without simple casting) related to int32 and int64 So just to make sure don't forget : https://github.com/jeromelebel/libbson/commit/90ea713ff46cf7281c4706d4eb01954aefed766e |
| Comments |
| Comment by Jerome Lebel [ 17/Dec/14 ] |
|
Oh ok. So the issue should not be closed, but set to 2.0 |
| Comment by Mira Carey [ 17/Dec/14 ] |
|
I understand the frustration, and again, apologies. I'm in a position where I can't break ABI at this point, so we'll have to wait on 2.0 to adjust all the public headers. Honestly, being able to kill the 128 byte alignment attribute for bson_t's is the big thing I want to get rid of. Being able to run sanitizers sanely would be nice. Sorry, |
| Comment by Jerome Lebel [ 17/Dec/14 ] |
|
having a 32bit length is not issue : there is already a check to make sure a bson doesn't grow longer. Even with int32_t we already have the problem of checking the bson size. I've already done all the changes that needs to be done. MongoHub already works with size_t and ssize_t. Of course I still might have left some bugs, but so far so good. I kept asking for this patch because for everything the more we wait, the harder it will be. The idea of my patch was to avoid a lot of cast everywhere. But ok, I give up. |
| Comment by Mira Carey [ 17/Dec/14 ] |
|
Jerome, Sorry for the slow turnaround. In retrospect I'm not sure why I said I could take this for 1.1. Pre-2.0, I can't make any modifications to the public abi, so we'll have to cut this down to changes in private headers and .c files. Additionally, we can't really support a 64 bit api for libbson, simply because the bson specification uses 32 bit lengths internally. In retrospect, it might have been wiser to use size_t and ssize_t everywhere, but that would just be about enforcing narrowing conversions in libbson at runtime, rather than leaving it to the user. Sorry again about not being more prompt on this. But I can't really merge the spirit of this patch. Regards, |
| Comment by Jerome Lebel [ 17/Dec/14 ] |
|
I guess I have no hope to see one day APIs that support correctly 64bits? |
| Comment by Jerome Lebel [ 04/Nov/14 ] |
|
I have more stuff related to that. I forgot the issue with bson_iter_binary() The declaration should be: Do you need a pull request for that? This difference makes a lot of changes. |
| Comment by Mira Carey [ 04/Nov/14 ] |
|
good catch. I'll fix that for the 1.1 release |