[Patches] [ python-Patches-477441 ] Mutable PyCObject

SourceForge.net noreply@sourceforge.net
Mon, 12 May 2003 19:05:39 -0700


Patches item #477441, was opened at 2001-11-02 01:02
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=477441&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Abbott (araneidae)
Assigned to: Nobody/Anonymous (nobody)
Summary: Mutable PyCObject

Initial Comment:
I'd like to add the following code to 
Core\Objects\cobject.c together with the associated 
declaration in include\cobject.h .

The purpose of this is to allow PyCObjects to be 
mutable when required.  Obviously this doesn't change 
the language semantics, but is a convenience in the 
implementation of certain Python extensions.


/* The void pointer already in the given PyCObject is 
replaced with the given
 * new value.  The caller is responsible for first 
checking that the given
 * PyObject really is a PyCObject. */

void PyCObject_SetVoidPtr(PyObject *self, void *cobj)
{
    ((PyCObject *)self)->cobject = cobj;
}


(I'm not to sure about the procedure for submissions 
of this type!)

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2003-05-12 19:05

Message:
Logged In: YES 
user_id=357491

Since the code is actually in the summary I am going to make this a patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=477441&group_id=5470