diff options
author | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-05-30 20:28:51 +0000 |
---|---|---|
committer | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-05-30 20:28:51 +0000 |
commit | 7977a4873729f73d4e6c882f2dc171a311cdd4a9 (patch) | |
tree | f3b8c11a49b45cf4a2dc4b703b8b63f8d8f90d77 /doc/example-smob | |
parent | 609c3d3095e2d81e7a0d26a1e0cb8baed7f45750 (diff) | |
download | guile-7977a4873729f73d4e6c882f2dc171a311cdd4a9.tar.gz |
* image-type.c: Adapted to new typing and naming convention.
Diffstat (limited to 'doc/example-smob')
-rw-r--r-- | doc/example-smob/ChangeLog | 4 | ||||
-rw-r--r-- | doc/example-smob/image-type.c | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/example-smob/ChangeLog b/doc/example-smob/ChangeLog index 12afa8813..60d10c03d 100644 --- a/doc/example-smob/ChangeLog +++ b/doc/example-smob/ChangeLog @@ -1,3 +1,7 @@ +2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de> + + * image-type.c: Adapted to new typing and naming convention. + 2001-04-26 Neil Jerram <neil@ossau.uklinux.net> * image-type.c (make_image): Don't need to use SCM_NIMP before diff --git a/doc/example-smob/image-type.c b/doc/example-smob/image-type.c index fe0a9b802..f9b783737 100644 --- a/doc/example-smob/image-type.c +++ b/doc/example-smob/image-type.c @@ -21,7 +21,7 @@ #include <stdlib.h> #include <libguile.h> -static long image_tag; +static scm_bits_t image_tag; struct image { int width, height; @@ -89,11 +89,11 @@ mark_image (SCM image_smob) return image->update_func; } -static scm_sizet +static size_t free_image (SCM image_smob) { struct image *image = (struct image *) SCM_SMOB_DATA (image_smob); - scm_sizet size = image->width * image->height + sizeof (struct image); + size_t size = image->width * image->height + sizeof (struct image); free (image->pixels); free (image); @@ -115,13 +115,13 @@ print_image (SCM image_smob, SCM port, scm_print_state *pstate) } void -init_image_type () +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_make_gsubr ("clear-image", 1, 0, 0, clear_image); - scm_make_gsubr ("make-image", 3, 0, 0, make_image); + scm_c_define_gsubr ("clear-image", 1, 0, 0, clear_image); + scm_c_define_gsubr ("make-image", 3, 0, 0, make_image); } |