unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* guile-clutter: fixing ClutterMargin special wrapper
@ 2014-04-18 19:51 David Pirotte
  2014-04-18 22:34 ` Mark H Weaver
  0 siblings, 1 reply; 3+ messages in thread
From: David Pirotte @ 2014-04-18 19:51 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 80 bytes --]

Hello,

Please review and let me know, if it's ok, I'll push it.

Thanks,
David

[-- Attachment #2: 0001-fixing-ClutterMargin-special-wrapper.patch --]
[-- Type: text/x-patch, Size: 1196 bytes --]

From a8166f67bd752ff7c71af50b27cfc52b2de4fe37 Mon Sep 17 00:00:00 2001
From: David PIROTTE <david@altosw.be>
Date: Fri, 18 Apr 2014 16:24:43 -0300
Subject: [PATCH] fixing ClutterMargin special wrapper

* clutter/gnome/gw/clutter-support.c: scm_scm_to_clutter_margin to use
  scm_to_double (instead of scm_to_uint8) for all 4 ClutterMargin structure
  elements.
---
 clutter/gnome/gw/clutter-support.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clutter/gnome/gw/clutter-support.c b/clutter/gnome/gw/clutter-support.c
index 7650f9e..e895d1e 100644
--- a/clutter/gnome/gw/clutter-support.c
+++ b/clutter/gnome/gw/clutter-support.c
@@ -147,10 +147,10 @@ scm_scm_to_clutter_margin (SCM scm)
 {
     ClutterMargin ret;
     
-    ret.left = scm_to_uint8 (scm_car (scm));
-    ret.right = scm_to_uint8 (scm_cadr (scm));
-    ret.top = scm_to_uint8 (scm_caddr (scm));
-    ret.bottom = scm_to_uint8 (scm_cadddr (scm));
+    ret.left = scm_to_double (scm_car (scm));
+    ret.right = scm_to_double (scm_cadr (scm));
+    ret.top = scm_to_double (scm_caddr (scm));
+    ret.bottom = scm_to_double (scm_cadddr (scm));
 
     return clutter_margin_copy (&ret);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: guile-clutter: fixing ClutterMargin special wrapper
  2014-04-18 19:51 guile-clutter: fixing ClutterMargin special wrapper David Pirotte
@ 2014-04-18 22:34 ` Mark H Weaver
  2014-04-19  2:10   ` David Pirotte
  0 siblings, 1 reply; 3+ messages in thread
From: Mark H Weaver @ 2014-04-18 22:34 UTC (permalink / raw)
  To: David Pirotte; +Cc: guile-devel

Hi David,

David Pirotte <david@altosw.be> writes:
> From a8166f67bd752ff7c71af50b27cfc52b2de4fe37 Mon Sep 17 00:00:00 2001
> From: David PIROTTE <david@altosw.be>
> Date: Fri, 18 Apr 2014 16:24:43 -0300
> Subject: [PATCH] fixing ClutterMargin special wrapper

Rather:
scm_scm_to_clutter_margin: Use scm_to_double, not scm_to_uint8.

> * clutter/gnome/gw/clutter-support.c: scm_scm_to_clutter_margin to use

Rather:
* clutter/gnome/gw/clutter-support.c (scm_scm_to_clutter_margin): Use

>   scm_to_double (instead of scm_to_uint8) for all 4 ClutterMargin structure
>   elements.

Other than that, looks good to me.  Please push!

    Thanks,
      Mark


> ---
>  clutter/gnome/gw/clutter-support.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/clutter/gnome/gw/clutter-support.c b/clutter/gnome/gw/clutter-support.c
> index 7650f9e..e895d1e 100644
> --- a/clutter/gnome/gw/clutter-support.c
> +++ b/clutter/gnome/gw/clutter-support.c
> @@ -147,10 +147,10 @@ scm_scm_to_clutter_margin (SCM scm)
>  {
>      ClutterMargin ret;
>      
> -    ret.left = scm_to_uint8 (scm_car (scm));
> -    ret.right = scm_to_uint8 (scm_cadr (scm));
> -    ret.top = scm_to_uint8 (scm_caddr (scm));
> -    ret.bottom = scm_to_uint8 (scm_cadddr (scm));
> +    ret.left = scm_to_double (scm_car (scm));
> +    ret.right = scm_to_double (scm_cadr (scm));
> +    ret.top = scm_to_double (scm_caddr (scm));
> +    ret.bottom = scm_to_double (scm_cadddr (scm));
>  
>      return clutter_margin_copy (&ret);
>  }



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: guile-clutter: fixing ClutterMargin special wrapper
  2014-04-18 22:34 ` Mark H Weaver
@ 2014-04-19  2:10   ` David Pirotte
  0 siblings, 0 replies; 3+ messages in thread
From: David Pirotte @ 2014-04-19  2:10 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Hi Mark,

> Rather:
> scm_scm_to_clutter_margin: Use scm_to_double, not scm_to_uint8.
> 
> > * clutter/gnome/gw/clutter-support.c: scm_scm_to_clutter_margin to use
> 
> Rather:
> * clutter/gnome/gw/clutter-support.c (scm_scm_to_clutter_margin): Use

Thank you, I have changed the commit message as suggested and pushed.

Cheers,
David

[-- Attachment #2: 0001-fixing-ClutterMargin-special-wrapper.patch --]
[-- Type: text/x-patch, Size: 1186 bytes --]

From 28436efe5ba1472dcc199d87a6b07b993bb3c441 Mon Sep 17 00:00:00 2001
From: David PIROTTE <david@altosw.be>
Date: Fri, 18 Apr 2014 23:02:09 -0300
Subject: [PATCH] fixing ClutterMargin special wrapper

* clutter/gnome/gw/clutter-support.c (scm_scm_to_clutter_margin): Use
  scm_to_double, not scm_to_uint8, for all 4 ClutterMargin structure elements.
---
 clutter/gnome/gw/clutter-support.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clutter/gnome/gw/clutter-support.c b/clutter/gnome/gw/clutter-support.c
index 7650f9e..e895d1e 100644
--- a/clutter/gnome/gw/clutter-support.c
+++ b/clutter/gnome/gw/clutter-support.c
@@ -147,10 +147,10 @@ scm_scm_to_clutter_margin (SCM scm)
 {
     ClutterMargin ret;
     
-    ret.left = scm_to_uint8 (scm_car (scm));
-    ret.right = scm_to_uint8 (scm_cadr (scm));
-    ret.top = scm_to_uint8 (scm_caddr (scm));
-    ret.bottom = scm_to_uint8 (scm_cadddr (scm));
+    ret.left = scm_to_double (scm_car (scm));
+    ret.right = scm_to_double (scm_cadr (scm));
+    ret.top = scm_to_double (scm_caddr (scm));
+    ret.bottom = scm_to_double (scm_cadddr (scm));
 
     return clutter_margin_copy (&ret);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-19  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 19:51 guile-clutter: fixing ClutterMargin special wrapper David Pirotte
2014-04-18 22:34 ` Mark H Weaver
2014-04-19  2:10   ` David Pirotte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).