[Os-project-managers] Question about OSxLParserdata, OSInstance, OSOption
Horand Gassmann
Horand.Gassmann at Dal.Ca
Tue Dec 21 10:48:02 EST 2010
Kipp Martin <kmartin at chicagobooth.edu> wrote:
> Hi Gus:
>
>>>> }//getVariableLowerBounds
>>> I agree that this is faster. But remember what I wrote earlier about
>>> the danger of memory pollution? If you give the user access to your
>>> memory in this way, you run the risk that they overwrite your memory.
>>> I do not consider this safe.
>
> As mentioned in previous email, no they can't, this was made
> intentionally private.
Ah!!! I had not taken this point onboard. This is indeed significant.
>> Can I summarize the state of affairs as follows: The constitution
>> requires OSInstance, OSResult and OSOption, but for efficiency it may
>> be more expeditious to switch to a flat storage scheme. Is that fair?
>
> Yes, absolutely, Jun has made this point a number of times.
OK. Hope I will remember this time...
>> Can I also ask about set() methods? I noticed that OSParseosil.y
>> stores things into the OSInstance object directly; for example in line
>> 1109:
>>
>> osinstance->instanceHeader->name = pelementText;
>>
>> or in line 1440:
>> osinstance->instanceData->variables->var[varcount]->lb
>> = atofmod1( osillineno,attText, attTextEnd);
>>
>> One of the things that is slowing me down is the endless writing and
>> invoking of set() methods to get the data into the OSOption object.
>> Was that even necessary? Should I have left in the old
>
> No it was not necessary.
>>
>> osoption->general->serviceURI = $3;
>>
>> in place of
>>
>> if (osoption->setServiceURI($3) == false)
>> osolError(...)
>
> Yes, probably so. I even asked you about this specific point and we
> discussed it. I was surprised you wanted to use the set methods but did
> not object.
I clearly misunderstood. I was under the impression that the set()
methods would be prefereable, and that`s what you wanted me to use. My
bad. Could have saved enormous amounts of time...
But it`s too late now to switch. I will continue doing what I have
been doing so that we get something out of the door.
Cheers
gus
More information about the Os-project-managers
mailing list