This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Mutable PyCObject
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: araneidae, brett.cannon, loewis
Priority: normal Keywords: patch

Created on 2001-11-02 09:02 by araneidae, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg38097 - (view) Author: Michael Abbott (araneidae) Date: 2001-11-02 09:02
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!)
msg38098 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-05-13 02:05
Logged In: YES 
user_id=357491

Since the code is actually in the summary I am going to make this a patch.
msg38099 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-19 18:30
Logged In: YES 
user_id=21627

This is now implemented in

concrete.tex 1.29
cobject.h 2.12
NEWS 1.872
cobject.c 2.16
History
Date User Action Args
2022-04-10 16:04:36adminsetgithub: 35451
2001-11-02 09:02:07araneidaecreate