Bug#289053: libglib2.0-doc: g_enum_complete_type_info example code

Kevin Ryde Kevin Ryde <user42@zip.com.au>, 289053-maintonly@bugs.debian.org
Fri, 07 Jan 2005 09:42:54 +1100


Package: libglib2.0-doc
Version: 2.4.8-1
Severity: minor

In the gobject reference manual under "Enums and Flags", 
g_enum_complete_type_info says for the values parameter that

    The array is terminated by a struct with all members being 0.

But the example code is

    static const GEnumValue values[] = {
      { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
      { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" }
    };
    g_enum_complete_type_info (type, info, values);

Perhaps there should be a "{ 0 }" element at the end of that array.

(I only noticed this while reading it, I haven't actually tried to use
the function.)


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.8-1-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libglib2.0-doc depends on:
di  communicator-smotif 4.75-2               Netscape Communicator 4.75 (static
ii  lynx [www-browser]  2.8.5-2              Text-mode WWW Browser
ii  mozilla-browser [ww 2:1.7.3-5            The Mozilla Internet application s
di  navigator-smotif-47 4.75-2               Netscape Navigator 4.75 (static Mo
ii  w3-el-e21 [www-brow 4.0pre.2001.10.27-16 Web browser for GNU Emacs 21
ii  w3m [www-browser]   0.5.1-3              WWW browsable pager with excellent

-- no debconf information