After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336096 - Reduce non-shared data in xmlunicode.c
Reduce non-shared data in xmlunicode.c
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-26 17:13 UTC by Aivars Kalvans
Modified: 2006-03-27 09:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch generate script (2.40 KB, patch)
2006-03-26 17:14 UTC, Aivars Kalvans
none Details | Review
xmlunicode.c (62.89 KB, patch)
2006-03-26 17:16 UTC, Aivars Kalvans
none Details | Review
improved patch (81.02 KB, patch)
2006-03-27 08:18 UTC, Aivars Kalvans
none Details | Review

Description Aivars Kalvans 2006-03-26 17:13:06 UTC
Add const to arrays in xmlunicode.c where it makes sense (strings and function pointers in xmlUnicodeBlocks and xmlUnicodeCats will be relocated) That saves about 11kb per process.
Comment 1 Aivars Kalvans 2006-03-26 17:14:51 UTC
Created attachment 62052 [details] [review]
patch generate script

Patch for xmlunicode.c generate script
Comment 2 Aivars Kalvans 2006-03-26 17:16:12 UTC
Created attachment 62053 [details] [review]
xmlunicode.c

xmlunicode.c generated with new script
Comment 3 Daniel Veillard 2006-03-26 23:40:31 UTC
Compilation with full debug options raises a number of warnings like

xmlunicode.c:215: warning: initialization discards qualifiers from pointer target type
and
xmlunicode.c: In function 'xmlUCSIsCatC__internal_alias':
xmlunicode.c:2662: warning: passing argument 2 of 'xmlCharInRange__internal_alias' discards qualifiers from pointer target type

  Seems the types in include/libxml/chvalid.h need to be updated too,
I didn;t fixed those yet, so I didn't commited, but otherwise I agree
with the intend and method. I also checked there wasn't significant
changes in the Unicode data table updates.
  Still open, need just a bit more work,

Daniel
Comment 4 Aivars Kalvans 2006-03-27 08:18:50 UTC
Created attachment 62097 [details] [review]
improved patch

This patch should compile without (new) warnings.
Comment 5 Daniel Veillard 2006-03-27 09:30:59 UTC
Right, way better, looks fine, applied and commited,

  thanks a lot !

Daniel