Sha256: 1316f6fbe6ab8a6497ddb6cd22d302e9c154454f00175496afaf892af164187f
Contents?: true
Size: 397 Bytes
Versions: 2
Compression:
Stored size: 397 Bytes
Contents
#!/usr/bin/env bash src_dir="src/runtime" allocation_functions=( malloc calloc realloc free ) for function in ${allocation_functions[@]}; do usages=$(grep --line-number -E "\b${function}\(" -r "${src_dir}" --exclude alloc.h ) if [[ ! -z $usages ]]; then echo "The ${function} function should not be called directly, but is called here:" echo "$usages" exit 1 fi done
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tree-sitter-0.1.0 | ext/tree-sitter/tree-sitter/script/check-mallocs |
tree-sitter-0.0.1 | ext/tree-sitter/tree-sitter/script/check-mallocs |