Re: mkvalue()

Guido.van.Rossum@cwi.nl
Mon, 07 Mar 1994 23:25:21 +0100

> If I am using mkvalue() to create an argument list to pass into
> call_object() is it necessary to free up the object returned after
> call_object() completes? If so, what is the appropriate method
> to use (from C) to free an object * type?

Yes. As the extensions manual attempts to explain, mkvalue() returns
a new object, and call_object() doesn't "eat" its argument, so you
have to DECREF() it when you are done with it.

Read system code for examples -- e.g. bltinmodule.c!

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>