diff options
author | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
commit | 0c8af4992cb0f7589dcafaad65ada12753c64594 (patch) | |
tree | 18e83d068c3e7dd2499331de977782b382279396 /vendor/aws/aws-crt-php/gen_api.php |
initial
Diffstat (limited to 'vendor/aws/aws-crt-php/gen_api.php')
-rw-r--r-- | vendor/aws/aws-crt-php/gen_api.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/aws/aws-crt-php/gen_api.php b/vendor/aws/aws-crt-php/gen_api.php new file mode 100644 index 0000000..d534434 --- /dev/null +++ b/vendor/aws/aws-crt-php/gen_api.php @@ -0,0 +1,24 @@ +<?php + +$source = "php://stdin"; +if (isset($argv[1])) { + $source = $argv[1]; +} + +$input_lines = file($source); +foreach ($input_lines as $line) { + // Strip AWS_EXTERN_C_BEGIN/END + if (preg_match('/AWS_EXTERN_C/', $line)) { + continue; + } + + // Strip macros/includes + if (preg_match('/^#/', $line)) { + continue; + } + + // Strip visibility attributes + $line = str_replace('AWS_CRT_API ', '', $line); + + echo($line); +} |