X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_SequenceOfObjects.sip;h=3af3646bd3eb3b265bb0234737ee6ed8f9510389;hb=6450e251d00e2beaa02e0de026b0f1af2b948a0e;hp=be9b94cc356d14722af614fc388d238d9952470f;hpb=dee7322c7412f9734670502e479f62a1bd076705;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_SequenceOfObjects.sip b/src/HYDROPy/HYDROData_SequenceOfObjects.sip index be9b94cc..3af3646b 100644 --- a/src/HYDROPy/HYDROData_SequenceOfObjects.sip +++ b/src/HYDROPy/HYDROData_SequenceOfObjects.sip @@ -38,7 +38,7 @@ return NULL; // Set the list elements. - for (int i = 0; i < sipCpp->Length(); ++i) + for (int i = 1; i <= sipCpp->Length(); ++i) { HYDROData_Entity* aPntr = createPointer(sipCpp->Value(i)); @@ -54,7 +54,7 @@ return NULL; } - PyList_SET_ITEM(l, i, tobj); + PyList_SET_ITEM(l, i - 1, tobj); } return l; @@ -83,7 +83,7 @@ return 1; } - NCollection_Sequence *ql = + NCollection_Sequence *aSeq = new NCollection_Sequence; len = PySequence_Size(sipPy); @@ -100,17 +100,17 @@ { sipReleaseType(t, sipType_HYDROData_Entity, state); - delete ql; + delete aSeq; return 0; } Handle_HYDROData_Entity anEnt( t ); - ql->Append( anEnt ); + aSeq->Append( anEnt ); //sipReleaseType(t, sipType_HYDROData_Entity, state); } - *sipCppPtr = ql; + *sipCppPtr = aSeq; return sipGetState(sipTransferObj); %End