[g-a-devel]Why does AccessibleEditableText_insertText require a length argument?



Hello.

I'd like to understand why AccessibleEditableText_insertText
requires a length argument, whereas AccessibleEditableText_setTextConents
does not.  Here are the two prototypes from cspi/spi.h:

SPIBoolean
AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
                                        const char *newContents);

SPIBoolean
AccessibleEditableText_insertText (AccessibleEditableText *obj,
                                   long int position,
                                   const char *text,
                                   long int length);

The fact that AccessibleEditableText_setTextContents does
not need a length argument somewhat indicates that it assumes
a 0-byte terminated standard C string.  OTOH, the length argument
of AccessibleEditableText_insertText makes me thing it would require
some Unicode string.

Can anyone explain why the second function does require
a length argument, and if strlen(str) is sufficient to suppply this?

-- 
Thanks,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang db debian org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]