-
Notifications
You must be signed in to change notification settings - Fork 8
c_long
-> int64
for content_length
#12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks @milancurcic, I have only one concern regarding this matter. It appears that the size of Although 8-byte integers are typically used on 64-bit platforms, they are also available on 32-bit platforms in Fortran. Therefore, declaring the By using an 8-byte integer for content_length, the attribute can store larger values, which may be necessary for handling large HTTP messages. This approach ensures that the content_length attribute is accurately represented and can be used reliably in a Fortran program, regardless of the platform it is running on. @interkosmos has also commented on this matter in their remarks.
|
Thanks for that explanation, and indeed I missed that comment by @interkosmos. In that case, we can keep |
I think integer(kind=8), public :: content_length = 0 This syntax ensures that the variable is always 8 bytes in size, regardless of the platform and compiler being used, and avoids potential issues that could arise from using I'm aware that using |
I would prefer |
Thanks, that makes sense, we'll use |
c_long
-> c_size_t
for content_length
c_long
-> int64
for content_length
#7 introduced a missing import which broke the build (a case for why we need tests #9 and CI next).
While adding it, I realized that
content_length
should bec_size_t
instead ofc_long
. Probably no difference in practice, both seem to work, but I naively expectc_size_t
to be more correct since content length is unsigned.