Pre-allocate and re-use Vals for bool, int, count, enum and empty string

This commit is contained in:
Jon Siwek 2019-01-09 14:47:58 -06:00
parent dcbef9cbe3
commit 2982765128
136 changed files with 1859 additions and 1811 deletions

View file

@ -13,7 +13,7 @@ function FileExtract::__set_limit%(file_id: string, args: any, n: count%): bool
RecordVal* rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
bool result = file_mgr->SetExtractionLimit(file_id->CheckString(), rv, n);
Unref(rv);
return new Val(result, TYPE_BOOL);
return val_mgr->GetBool(result);
%}
module GLOBAL;