Re: Glib->log() and %-style format strings



muppet wrote:
   g_log (log_domain, SvGLogLevelFlags (log_level), message);

Well, that should be

   g_log (log_domina, SvGLogLevelFlags (log_level), "%s", message);

In a similar vein: how about the attached patch?
Index: GClosure.xs
===================================================================
--- GClosure.xs (revision 1071)
+++ GClosure.xs (working copy)
@@ -390,7 +390,7 @@ gperl_callback_invoke (GPerlCallback * c
                                                   error);
                                g_free (error);
                                /* this won't return */
-                               croak (SvPV_nolen (errstr));
+                               croak ("%s", SvPV_nolen (errstr));
                        }
                        sv = gperl_sv_from_value (&v);
                        if (!sv) {


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