From 5c8ca303a38cc4b2a62020c920386f08d326bd98 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 29 Feb 2004 08:51:54 +0000 Subject: Patch from Bruce to return required allocation size when a NULL pointer is used as a stringresult argument. --- include/Scintilla.iface | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/Scintilla.iface') diff --git a/include/Scintilla.iface b/include/Scintilla.iface index aa3022173..e6ca585ef 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -53,7 +53,7 @@ ## position -> integer position in a document ## colour -> colour integer containing red, green and blue bytes. ## string -> pointer to const character -## stringresult -> pointer to character +## stringresult -> pointer to character, NULL-> return size of result ## cells -> pointer to array of cells, each cell containing a style byte and character byte ## textrange -> range of a min and a max position with an output string ## findtext -> searchrange, text -> foundposition @@ -74,7 +74,8 @@ ## argument and retrieve NUL characters. All retrieved strings except for those retrieved ## by GetLine also have a NUL appended but client code should calculate the size that ## will be returned rather than relying upon the NUL whenever possible. Allow for the -## extra NUL character when allocating buffers. +## extra NUL character when allocating buffers. The size to allocate for a stringresult +## can be determined by calling with a NULL (0) pointer. cat Basics -- cgit v1.2.3