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

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




On Feb 5, 2009, at 7:48 AM, Torsten Schoenfeld wrote:

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) {

Good find.  Ship it!


--
Sallah!  I said no camels!  That's five camels!  Can't you count?
  -- Indiana Jones



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