Skip to content

Commit

Permalink
changes for latest c-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Oct 27, 2023
1 parent d9b2ad6 commit f1c53bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/s3_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ PyObject *aws_py_s3_is_env_ec2(PyObject *self, PyObject *args) {

/* This will grab the metadata s3 knows about. In the case this is Amazon EC2, the instance
type field will be populated. */
const struct aws_s3_compute_platform_info *compute_info = aws_s3_current_compute_platform_info();
const struct aws_s3_platform_info *platform_info = aws_s3_current_compute_platform_info();

if (compute_info->instance_type.len > 0) {
if (platform_info->instance_type.len > 0) {
Py_RETURN_TRUE;
}

Expand All @@ -29,10 +29,10 @@ PyObject *aws_py_s3_get_ec2_instance_type(PyObject *self, PyObject *args) {
(void)self;
(void)args;

const struct aws_s3_compute_platform_info *compute_info = aws_s3_current_compute_platform_info();
const struct aws_s3_platform_info *platform_info = aws_s3_current_compute_platform_info();

if (compute_info->instance_type.len) {
PyObject *ret_value = PyUnicode_FromAwsByteCursor(&compute_info->instance_type);
if (platform_info->instance_type.len) {
PyObject *ret_value = PyUnicode_FromAwsByteCursor(&platform_info->instance_type);
return ret_value;
}

Expand All @@ -43,9 +43,9 @@ PyObject *aws_py_s3_is_crt_s3_optimized_for_system(PyObject *self, PyObject *arg
(void)self;
(void)args;

const struct aws_s3_compute_platform_info *compute_info = aws_s3_current_compute_platform_info();
const struct aws_s3_platform_info *platform_info = aws_s3_current_compute_platform_info();

if (compute_info->has_recommended_configuration) {
if (platform_info->has_recommended_configuration) {
Py_RETURN_TRUE;
}

Expand Down

0 comments on commit f1c53bf

Please sign in to comment.