Commit a6683935d57006a8024db429e26121c91d8915fe

Authored by knodlseder
1 parent c639b603

return reference to model parameter to allow for change of its' properties

Showing 1 changed file with 2 additions and 2 deletions
pyext/GModel.i
... ... @@ -65,13 +65,13 @@ public:
65 65 char *__str__() {
66 66 return tochar(self->print());
67 67 }
68   - GModelPar __getitem__(const int& index) {
  68 + GModelPar& __getitem__(const int& index) {
69 69 if (index >= 0 && index < self->size())
70 70 return (*self)[index];
71 71 else
72 72 throw GException::out_of_range("__getitem__(int)", index, self->size());
73 73 }
74   - GModelPar __getitem__(const std::string& name) {
  74 + GModelPar& __getitem__(const std::string& name) {
75 75 return (*self)[name];
76 76 }
77 77 void __setitem__(const int& index, const GModelPar& val) {
... ...