From 3f77a01fbfa8ca9fb5469743fe6c4abf6ccb6bcc Mon Sep 17 00:00:00 2001 From: Justin Boswell Date: Thu, 8 Jul 2021 09:57:07 -0700 Subject: [PATCH] Updated to aws-crt-ffi v0.1.6, updated http API (#39) * Updated to aws-crt-ffi v0.1.6, updated http API * clang-format --- crt/aws-crt-ffi | 2 +- ext/http.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crt/aws-crt-ffi b/crt/aws-crt-ffi index 6fca883..105be1d 160000 --- a/crt/aws-crt-ffi +++ b/crt/aws-crt-ffi @@ -1 +1 @@ -Subproject commit 6fca88358ad9a671a59de22538cbc8cf008c2259 +Subproject commit 105be1d1ce027d748c8834493533186300075160 diff --git a/ext/http.c b/ext/http.c index 732abf7..c76e9fd 100644 --- a/ext/http.c +++ b/ext/http.c @@ -21,11 +21,9 @@ PHP_FUNCTION(aws_crt_http_message_to_blob) { aws_php_parse_parameters("l", &php_msg); aws_crt_http_message *message = (void *)php_msg; - uint8_t *blob = NULL; - size_t blob_len = 0; - aws_crt_http_message_to_blob(message, &blob, &blob_len); - RETURN_STRINGL((const char *)blob, blob_len); - aws_crt_mem_release(blob); + aws_crt_buf blob; + aws_crt_http_message_to_blob(message, &blob); + RETURN_STRINGL((const char *)blob.blob, blob.length); } PHP_FUNCTION(aws_crt_http_message_release) {