From 53aa9c6e75395ffc695d0dc8ac4320b62189c9df Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 15 Nov 2007 11:34:43 +0000 Subject: [PATCH] * Fix some prototypes and use a header file for Init_cucul_canvas --- ruby/Makefile.am | 1 + ruby/cucul/cucul-canvas.c | 5 +++-- ruby/cucul/cucul-canvas.h | 6 ++++++ ruby/cucul/cucul.c | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 ruby/cucul/cucul-canvas.h diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 9ebcec4..8fa70b7 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -7,6 +7,7 @@ endif EXTRA_DIST = cucul/extconf.rb \ cucul/cucul.c \ cucul/cucul-canvas.c \ + cucul/cucul-canvas.h \ cucul/test.rb \ cucul/t/tc_frame.rb \ caca/extconf.rb diff --git a/ruby/cucul/cucul-canvas.c b/ruby/cucul/cucul-canvas.c index ad0740a..8114f68 100644 --- a/ruby/cucul/cucul-canvas.c +++ b/ruby/cucul/cucul-canvas.c @@ -12,6 +12,7 @@ #include #include #include +#include "cucul-canvas.h" #define _SELF (DATA_PTR(self)) @@ -514,7 +515,7 @@ static VALUE export_memory(VALUE self, VALUE format) return ret; } -static VALUE export_list() +static VALUE export_list(void) { VALUE ary, ary2; @@ -537,7 +538,7 @@ static VALUE export_list() return ary; } -static VALUE import_list() +static VALUE import_list(void) { VALUE ary, ary2; diff --git a/ruby/cucul/cucul-canvas.h b/ruby/cucul/cucul-canvas.h new file mode 100644 index 0000000..587ced3 --- /dev/null +++ b/ruby/cucul/cucul-canvas.h @@ -0,0 +1,6 @@ +#ifndef __CUCUL_CANVAS_H__ +#define __CUCUL_CANVAS_H__ + +extern void Init_cucul_canvas(VALUE); + +#endif diff --git a/ruby/cucul/cucul.c b/ruby/cucul/cucul.c index b479c1a..b0222a6 100644 --- a/ruby/cucul/cucul.c +++ b/ruby/cucul/cucul.c @@ -12,9 +12,9 @@ #include #include -static VALUE mCucul; +#include "cucul-canvas.h" -extern void Init_cucul_canvas(VALUE); +static VALUE mCucul; void Init_cucul() {