axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject Memory improvements?
Date Wed, 04 Aug 2004 19:55:49 GMT




Hi Folks,

would it be sensible to use the maximum length of string data members in
order to create attributes to the right size?
e.g.

            <element name="covgid__api__rqst__typ__cd">

                <simpleType>
                    <restriction base="string">
                        <maxLength value="10"/>
                    </restriction>
                </simpleType>
            </element>
            <element name="covgid__api__rc">

                <simpleType>
                    <restriction base="string">
                        <maxLength value="2"/>
                    </restriction>
                </simpleType>
            </element>

With the maximum lengths provided, the generation code can generate:

             char covgid__api_rqst__typ__cd [11];
             char covgid__api__rc [3];

These are better than the current:

             char* covgid__api_rqst__typ__cd;
             char* covgid__api__rc;


I guess we might have issues if the maximum length is not there so we would
end up with some that were correctly sized and some that weren't ?

thoughts?


John Hawkins


Mime
View raw message