You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2012/04/15 03:49:07 UTC
[lucy-commits] svn commit: r1326245 - /lucy/trunk/perl/xs/XSBind.c
Author: marvin
Date: Sun Apr 15 01:49:07 2012
New Revision: 1326245
URL: http://svn.apache.org/viewvc?rev=1326245&view=rev
Log:
Initialize a bit vector.
Zero out the bit vector we're using to keep track of whether required
parameters have been seen.
Modified:
lucy/trunk/perl/xs/XSBind.c
Modified: lucy/trunk/perl/xs/XSBind.c
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/xs/XSBind.c?rev=1326245&r1=1326244&r2=1326245&view=diff
==============================================================================
--- lucy/trunk/perl/xs/XSBind.c (original)
+++ lucy/trunk/perl/xs/XSBind.c Sun Apr 15 01:49:07 2012
@@ -475,7 +475,9 @@ chy_bool_t
XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
va_list args;
int32_t args_left = (num_stack_elems - start) / 2;
- void *verified_labels = alloca(sizeof(int64_t) + num_stack_elems / 64);
+ size_t size = sizeof(int64_t) + num_stack_elems / 64;
+ void *verified_labels = alloca(size);
+ memset(verified_labels, 0, size);
// Verify that our args come in pairs. Return success if there are no
// args.