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 2011/07/25 22:30:40 UTC
[lucy-commits] svn commit: r1150889 - /incubator/lucy/trunk/clownfish/src/CFCPerlSub.c
Author: marvin
Date: Mon Jul 25 20:30:39 2011
New Revision: 1150889
URL: http://svn.apache.org/viewvc?rev=1150889&view=rev
Log:
Fix problems with XS generation. Add a missing cast.
Modified:
incubator/lucy/trunk/clownfish/src/CFCPerlSub.c
Modified: incubator/lucy/trunk/clownfish/src/CFCPerlSub.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlSub.c?rev=1150889&r1=1150888&r2=1150889&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlSub.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlSub.c Mon Jul 25 20:30:39 2011
@@ -177,7 +177,7 @@ S_allot_params_arg(CFCType *type, const
+ strlen(vtable_var)
+ strlen(zcb_allocation)
+ 50;
- char *arg = MALLOCATE(size);
+ char *arg = (char*)MALLOCATE(size);
sprintf(arg, pattern, label, label, label_len, req_string, vtable_var,
zcb_allocation);
return arg;
@@ -214,7 +214,7 @@ CFCPerlSub_build_allot_params(CFCPerlSub
char *allot_params = CFCUtil_strdup("");
// Declare variables and assign default values.
- for (int i = 1; i < num_vars; i++) {
+ for (size_t i = 1; i < num_vars; i++) {
CFCVariable *arg_var = arg_vars[i];
const char *val = arg_inits[i];
const char *local_c = CFCVariable_local_c(arg_var);
@@ -223,9 +223,9 @@ CFCPerlSub_build_allot_params(CFCPerlSub
val = CFCType_is_object(arg_type)
? "NULL"
: "0";
- allot_params = CFCUtil_cat(allot_params, local_c, " = ", val,
- ";\n ", NULL);
}
+ allot_params = CFCUtil_cat(allot_params, local_c, " = ", val,
+ ";\n ", NULL);
}
// Iterate over args in param list.
@@ -234,7 +234,7 @@ CFCPerlSub_build_allot_params(CFCPerlSub
"chy_bool_t args_ok = XSBind_allot_params(\n"
" &(ST(0)), 1, items, \"",
self->perl_name, "_PARAMS\",\n", NULL);
- for (int i = 1; i < num_vars; i++) {
+ for (size_t i = 1; i < num_vars; i++) {
CFCVariable *var = arg_vars[i];
const char *val = arg_inits[i];
int required = val ? 0 : 1;