mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-10 21:47:06 +00:00
Add a method to get the contents of an XArray so we can index in
it really fast, or iterate over it. This is dangerous and breaks the nice abstraction (sigh). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11122
This commit is contained in:
@@ -125,6 +125,16 @@ extern void VG_(dropHeadXA) ( XArray*, Word );
|
||||
is NULL, in which case the parent's cost-center is used. */
|
||||
extern XArray* VG_(cloneXA)( HChar* cc, XArray* xa );
|
||||
|
||||
/* Get the raw array and size so callers can index it really fast.
|
||||
This is dangerous in the sense that there's no range or
|
||||
anything-else checking. It's also dangerous in that if
|
||||
VG_(addToXA) is used, the contents may be re-located without
|
||||
warning, hence making the contents address returned here
|
||||
invalid. */
|
||||
extern void VG_(getContentsXA_UNSAFE)( XArray* sr,
|
||||
/*OUT*/void** ctsP,
|
||||
/*OUT*/Word* usedP );
|
||||
|
||||
/* Convenience function: printf into an XArray of HChar, adding stuff
|
||||
at the end. This is very convenient for concocting arbitrary
|
||||
length printf output in an XArray. Note that the resulting string
|
||||
|
||||
Reference in New Issue
Block a user