Remove unused var, take Matthew's advice in scheme_extract_struct_procedure.
svn: r18494
This commit is contained in:
parent
fcbcf0bb6f
commit
ef90b0f91d
|
@ -3850,7 +3850,7 @@ static Scheme_Object *procedure_rename(int argc, Scheme_Object *argv[])
|
||||||
|
|
||||||
static Scheme_Object *procedure_to_method(int argc, Scheme_Object *argv[])
|
static Scheme_Object *procedure_to_method(int argc, Scheme_Object *argv[])
|
||||||
{
|
{
|
||||||
Scheme_Object *p, *aty;
|
Scheme_Object *aty;
|
||||||
|
|
||||||
if (!SCHEME_PROCP(argv[0]))
|
if (!SCHEME_PROCP(argv[0]))
|
||||||
scheme_wrong_type("procedure->method", "procedure", 0, argc, argv);
|
scheme_wrong_type("procedure->method", "procedure", 0, argc, argv);
|
||||||
|
|
|
@ -3730,17 +3730,17 @@ Scheme_Object *scheme_extract_struct_procedure(Scheme_Object *obj, int num_rands
|
||||||
proc = a;
|
proc = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're wrapping the result of procedure->method, we need to
|
|
||||||
* account for that.
|
|
||||||
*/
|
|
||||||
if (scheme_reduced_procedure_struct
|
|
||||||
&& scheme_is_struct_instance(scheme_reduced_procedure_struct, obj))
|
|
||||||
meth_wrap = ((Scheme_Structure *)obj)->slots[3] == scheme_true;
|
|
||||||
|
|
||||||
if (num_rands >= 0) {
|
if (num_rands >= 0) {
|
||||||
/* num_rands is non-negative => do arity check */
|
/* num_rands is non-negative => do arity check */
|
||||||
if (!SCHEME_PROCP(proc)
|
if (!SCHEME_PROCP(proc)
|
||||||
|| !scheme_check_proc_arity(NULL, num_rands, -1, 0, &obj)) {
|
|| !scheme_check_proc_arity(NULL, num_rands, -1, 0, &obj)) {
|
||||||
|
/* If we're wrapping the result of procedure->method, we need to
|
||||||
|
* account for that.
|
||||||
|
*/
|
||||||
|
if (scheme_reduced_procedure_struct
|
||||||
|
&& scheme_is_struct_instance(scheme_reduced_procedure_struct, obj))
|
||||||
|
meth_wrap = SCHEME_TRUEP(((Scheme_Structure *)obj)->slots[3]);
|
||||||
|
|
||||||
scheme_wrong_count_m((char *)obj,
|
scheme_wrong_count_m((char *)obj,
|
||||||
-1 /* means "name argument is really a proc struct" */, 0,
|
-1 /* means "name argument is really a proc struct" */, 0,
|
||||||
num_rands, rands, meth_wrap);
|
num_rands, rands, meth_wrap);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user