Boost logo

Boost :

From: conversy_at_[hidden]
Date: 2001-09-06 09:19:36


If I have that struct:

struct A {
  int field;
  int& getField() { return field; }
  A() : field(0) {}
what should I do to allow this kind of python code (if possible):

from whatever import *

f = a.getField()
f = 1
print a.getField()

currently this code prints "0", but I want it to print "1"...
is it possible ?



btw, how can I tell to python not to destroy a particular object when
this object is owns by my own library ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at