Index: GParamSpec.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GParamSpec.xs,v retrieving revision 1.11 diff -u -r1.11 GParamSpec.xs --- GParamSpec.xs 2 Dec 2003 23:28:11 -0000 1.11 +++ GParamSpec.xs 7 Feb 2004 23:30:00 -0000 @@ -355,6 +355,28 @@ OUTPUT: RETVAL +=for apidoc +ParamSpec to be used for any generic perl scalar, including references to +complex objects. +=cut +GParamSpec* +scalar (class, name, nick, blurb, flags) + const gchar *name + const gchar *nick + const gchar *blurb + GParamFlags flags + PREINIT: + GType type = 0; + CODE: + RETVAL = NULL; + type = gperl_boxed_type_from_package ("Glib::Scalar"); + /* should never happen, but... */ + if (!type) + croak ("type Glib::Scalar is not registered with Glib-Perl"); + RETVAL = g_param_spec_boxed (name, nick, blurb, type, flags); + OUTPUT: + RETVAL + ### plain pointers are dangerous, and i don't even know how you'd create ### them from perl since there are no pointers in perl (references are SVs) ## GParamSpec* g_param_spec_pointer (const gchar *name, const gchar *nick, const gchar *blurb, GParamFlags flags)