Skip to content

Conversation

@rajkumardongre
Copy link
Contributor

No description provided.

Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @rajkumardongre, I only left one nit pick.

status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDS, json)
status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDSIZE_LARGE, json_length)
status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDS, data)
status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDSIZE_LARGE, data_length)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can do just len(data) and remove the temporary variable above since you're using it only once here.

Suggested change
status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDSIZE_LARGE, data_length)
status = curl_easy_setopt(curl_ptr, CURLOPT_POSTFIELDSIZE_LARGE, len(data))

@rajkumardongre rajkumardongre merged commit e172677 into fortran-lang:main Jun 20, 2023
@rajkumardongre rajkumardongre deleted the json_to_data branch July 2, 2023 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants