diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-12-19 12:54:53 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-01-02 09:53:24 +0000 |
commit | fd96cea4fefeeee8bcccde663faa559151e2606e (patch) | |
tree | 92af865233f68773b3c28b47be19b5231f2b7343 /util/cairo-script/cairo-script-scanner.c | |
parent | ecb8dce27c769158fe4a92432a90b24a96f8afa9 (diff) |
[script] Improve array construction.
Limit the memory allocation to the initial array size and perform a direct
copy from the operand stack to the array.
Diffstat (limited to 'util/cairo-script/cairo-script-scanner.c')
-rw-r--r-- | util/cairo-script/cairo-script-scanner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cairo-script/cairo-script-scanner.c b/util/cairo-script/cairo-script-scanner.c index 3f8a271e..c08e447d 100644 --- a/util/cairo-script/cairo-script-scanner.c +++ b/util/cairo-script/cairo-script-scanner.c @@ -350,7 +350,7 @@ token_end (csi_t *ctx, csi_scanner_t *scan, csi_file_t *src) &scan->procedure_stack, &scan->build_procedure); - scan->status = csi_array_new (ctx, &scan->build_procedure); + scan->status = csi_array_new (ctx, 0, &scan->build_procedure); scan->build_procedure.type |= CSI_OBJECT_ATTR_EXECUTABLE; reset (scan); return; |