On 17 Nov, 09:40, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Paul Moore <[EMAIL PROTECTED]> writes:
>
> > OK, but that allocates the initial buffer, which I will then
> > throw away.
>
> Why don't you use a constructor argument that allows specifying
> the initial buffer size?
That's an option, b
Paul Moore <[EMAIL PROTECTED]> writes:
> OK, but that allocates the initial buffer, which I will then throw
> away.
Why don't you use a constructor argument that allows specifying the
initial buffer size?
> In practice, this isn't a significant issue (the overhead of one
> allocation and one de
I have a C extension type, "Pattern", where my type manages a
dynamically allocated memory block (of "instructions", the details
aren't important).
The basic constructor builds a pattern with a single instruction
("End") as follows:
static PyObject *
Pattern_new(PyTypeObject *type, PyObject *args