[Bug 535200] New: bindings for LibStorage::Environment::swig_logdir_set do not work
http://bugzilla.novell.com/show_bug.cgi?id=535200 Summary: bindings for LibStorage::Environment::swig_logdir_set do not work Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: mvidner@novell.com ReportedBy: aschnell@novell.com QAContact: jsrain@novell.com Found By: Development The swig/perl bindings for LibStorage::Environment::swig_logdir_set do not work. The code LibStorage::Environment::swig_logdir_set(env, Directory::logdir); gives this error: Storage.ycp:248 Perl wanted to die: RuntimeError Type error in argument 2 of Environment_logdir_set. Expected a REFERENCE to STRING. Note: The logdir variable is new in libstorage. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=535200 User aschnell@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=535200#c1 --- Comment #1 from Arvin Schnell <aschnell@novell.com> 2009-08-31 08:08:53 MDT --- Created an attachment (id=315998) --> (http://bugzilla.novell.com/attachment.cgi?id=315998) example script -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=535200 User mvidner@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=535200#c2 Martin Vidner <mvidner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |ASSIGNED --- Comment #2 from Martin Vidner <mvidner@novell.com> 2009-08-31 08:44:07 MDT --- It's this code in http://svn.opensuse.org/viewvc/yast/trunk/perl-bindings/pluglib-bindings/swig/stl/string.i?revision=57030&view=markup#l30 %typemap(in) std::string* (std::string temp), std::string& (std::string temp), const std::string* (std::string temp), const std::string& (std::string temp) { SV *sv; if (!SvROK($input) || !(sv = (SV*)SvRV($input)) || !SvPOK(sv) ) SWIG_croak("Type error in argument $argnum of $symname. Expected a REFERENCE to STRING.\n"); STRLEN len; const char *ptr = SvPV(sv, len); if (!ptr) SWIG_croak("Undefined variable in argument $argnum of $symname."); temp.assign(ptr, len); $1 = &temp; } Now, the typemap makes a copy of the referenced string anyway, so there is no point in requiring a reference instead of a plain string. I wonder how it can work in the other cases: $ grep "REFERENCE to STRING" LibStorage_wrap.cc | wc -l 200 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=535200 http://bugzilla.novell.com/show_bug.cgi?id=535200#c3 --- Comment #3 from Arvin Schnell <aschnell@novell.com> 2009-12-07 18:31:53 UTC --- Any progress here? I need the functionality for the testsuite. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=535200 http://bugzilla.novell.com/show_bug.cgi?id=535200#c4 Martin Vidner <mvidner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |aschnell@novell.com --- Comment #4 from Martin Vidner <mvidner@novell.com> 2009-12-08 12:37:32 UTC --- Sorry no progress (no webyast GM => no surprise). Can you please check whether the other cases are used and work?
I wonder how it can work in the other cases: $ grep ... 200
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=535200 http://bugzilla.novell.com/show_bug.cgi?id=535200#c5 Arvin Schnell <aschnell@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|aschnell@novell.com | --- Comment #5 from Arvin Schnell <aschnell@novell.com> 2009-12-09 17:40:27 UTC --- Setting member elements of classes is so far only used for booleans. Hope that's the information you asked for. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=535200 https://bugzilla.novell.com/show_bug.cgi?id=535200#c6 --- Comment #6 from Martin Vidner <mvidner@suse.com> 2012-03-06 15:14:41 CET --- Created an attachment (id=479749) --> (http://bugzilla.novell.com/attachment.cgi?id=479749) perl-bindings.patch Here's a patch by Pepa submitted in this message: http://lists.opensuse.org/yast-devel/2012-02/msg00066.html Thanks, Pepa! I am trying to enable and fix the testsuite along the way. http://svn.opensuse.org/viewvc/yast?view=revision&revision=67567 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com