[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-120-g2
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-120-g28b9264 |
Date: |
Tue, 15 Feb 2011 15:40:40 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=28b9264d5b8ee29fd262288fe7cbd7c7431b8e66
The branch, master has been updated
via 28b9264d5b8ee29fd262288fe7cbd7c7431b8e66 (commit)
from c15fe4999aaeb63eb90c70d1af26e086c8c43362 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 28b9264d5b8ee29fd262288fe7cbd7c7431b8e66
Author: Ludovic Courtès <address@hidden>
Date: Tue Feb 15 16:40:27 2011 +0100
Update `doc/example-smob'.
* doc/example-smob/Makefile (CFLAGS, LIBS): Use `pkg-config' instead of
`guile-config'.
* doc/example-smob/image-type.c (mark_image, free_image): Remove.
(init_image_type): Don't call `scm_set_smob_mark' and
`scm_set_smob_free'.
-----------------------------------------------------------------------
Summary of changes:
doc/example-smob/Makefile | 6 +++---
doc/example-smob/image-type.c | 38 ++++++++------------------------------
2 files changed, 11 insertions(+), 33 deletions(-)
diff --git a/doc/example-smob/Makefile b/doc/example-smob/Makefile
index 548c5ed..3736dc0 100644
--- a/doc/example-smob/Makefile
+++ b/doc/example-smob/Makefile
@@ -1,7 +1,7 @@
-CFLAGS=`guile-config compile`
-LIBS=`guile-config link`
+CFLAGS = `pkg-config guile-2.0 --cflags`
+LIBS = `pkg-config guile-2.0 --libs`
-O_FILES=image-type.o myguile.o
+O_FILES = image-type.o myguile.o
all: myguile
diff --git a/doc/example-smob/image-type.c b/doc/example-smob/image-type.c
index 8dd998a..fc28a7d 100644
--- a/doc/example-smob/image-type.c
+++ b/doc/example-smob/image-type.c
@@ -1,17 +1,17 @@
/* image-type.c
- *
- * Copyright (C) 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
- *
+ *
+ * Copyright (C) 1998, 2000, 2004, 2006, 2011 Free Software Foundation, Inc.
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this software; see the file COPYING.LESSER. If
* not, write to the Free Software Foundation, Inc., 51 Franklin
@@ -23,7 +23,8 @@
static scm_t_bits image_tag;
-struct image {
+struct image
+{
int width, height;
char *pixels;
@@ -63,7 +64,7 @@ make_image (SCM name, SCM s_width, SCM s_height)
/* Step 4: Finish the initialization.
*/
image->name = name;
- image->pixels = scm_gc_malloc (width * height, "image pixels");
+ image->pixels = scm_gc_malloc_pointerless (width * height, "image pixels");
return smob;
}
@@ -90,27 +91,6 @@ clear_image (SCM image_smob)
return SCM_UNSPECIFIED;
}
-static SCM
-mark_image (SCM image_smob)
-{
- /* Mark the image's name and update function. */
- struct image *image = (struct image *) SCM_SMOB_DATA (image_smob);
-
- scm_gc_mark (image->name);
- return image->update_func;
-}
-
-static size_t
-free_image (SCM image_smob)
-{
- struct image *image = (struct image *) SCM_SMOB_DATA (image_smob);
-
- scm_gc_free (image->pixels, image->width * image->height, "image pixels");
- scm_gc_free (image, sizeof (struct image), "image");
-
- return 0;
-}
-
static int
print_image (SCM image_smob, SCM port, scm_print_state *pstate)
{
@@ -128,8 +108,6 @@ void
init_image_type (void)
{
image_tag = scm_make_smob_type ("image", sizeof (struct image));
- scm_set_smob_mark (image_tag, mark_image);
- scm_set_smob_free (image_tag, free_image);
scm_set_smob_print (image_tag, print_image);
scm_c_define_gsubr ("clear-image", 1, 0, 0, clear_image);
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-120-g28b9264,
Ludovic Courtès <=