diff options
author | Andrew Dolgov <[email protected]> | 2023-10-20 16:44:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-20 16:44:35 +0300 |
commit | 8bec661288b276c98bdb0e773e5f4d5275dc4c87 (patch) | |
tree | 8617ebe581c62fc46a7881aa61801ebce9d3c603 /vendor/aws/aws-crt-php/ext/crc.c | |
parent | 540438c2eb5452bacad30c247906bfa287f2da1d (diff) |
Diffstat (limited to 'vendor/aws/aws-crt-php/ext/crc.c')
-rw-r--r-- | vendor/aws/aws-crt-php/ext/crc.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/aws/aws-crt-php/ext/crc.c b/vendor/aws/aws-crt-php/ext/crc.c deleted file mode 100644 index 8e520f8..0000000 --- a/vendor/aws/aws-crt-php/ext/crc.c +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include "php_aws_crt.h" - -PHP_FUNCTION(aws_crt_crc32) { - zend_ulong prev = 0; - const char *input = NULL; - size_t len = 0; - - aws_php_parse_parameters("sl", &input, &len, &prev); - - if (prev > UINT32_MAX) { - aws_php_throw_exception("previous crc cannot be larger than UINT32_MAX"); - } - RETURN_LONG((zend_ulong)aws_crt_crc32((const uint8_t *)input, len, prev)); -} - -PHP_FUNCTION(aws_crt_crc32c) { - zend_ulong prev = 0; - const char *input = NULL; - size_t len = 0; - - aws_php_parse_parameters("sl", &input, &len, &prev); - - if (prev > UINT32_MAX) { - aws_php_throw_exception("previous crc cannot be larger than UINT32_MAX"); - } - RETURN_LONG((zend_ulong)aws_crt_crc32c((const uint8_t *)input, len, prev)); -} |