From 0e96f0917ca45fa2bdd895eb155f5c77f0bbcd45 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 31 Jan 2010 12:41:28 +0100 Subject: [PATCH] core_pe.modules.block: Converted inttuple() to a vararg based function. --- core_pe/modules/block.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/core_pe/modules/block.c b/core_pe/modules/block.c index 9c5941f6..82930424 100644 --- a/core_pe/modules/block.c +++ b/core_pe/modules/block.c @@ -32,16 +32,18 @@ min(int a, int b) /* Create a tuple out of an array of integers. */ static PyObject* -inttuple(int numbers[], int count) +inttuple(int n, ...) { int i; PyObject *pnumber; PyObject *result; + va_list numbers; - result = PyTuple_New(count); + va_start(numbers, n); + result = PyTuple_New(n); - for (i=0; i