SOURCES: ruby-gnome2-glib-mainloop.patch (NEW) - added

aredridel aredridel at pld-linux.org
Tue Jul 26 06:59:49 CEST 2005


Author: aredridel                    Date: Tue Jul 26 04:59:49 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added

---- Files affected:
SOURCES:
   ruby-gnome2-glib-mainloop.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/ruby-gnome2-glib-mainloop.patch
diff -u /dev/null SOURCES/ruby-gnome2-glib-mainloop.patch:1.1
--- /dev/null	Tue Jul 26 06:59:49 2005
+++ SOURCES/ruby-gnome2-glib-mainloop.patch	Tue Jul 26 06:59:44 2005
@@ -0,0 +1,73 @@
+diff -urN ruby-gnome2-all-0.12.0-orig/glib/src/rbglib.c ruby-gnome2-all-0.12.0-mod/glib/src/rbglib.c
+--- ruby-gnome2-all-0.12.0-orig/glib/src/rbglib.c	2005-03-06 08:39:26.000000000 -0700
++++ ruby-gnome2-all-0.12.0-mod/glib/src/rbglib.c	2005-07-25 22:58:12.000000000 -0600
+@@ -25,6 +25,7 @@
+ extern void Init_glib_spawn();
+ extern void Init_glib_fileutils();
+ extern void Init_glib_utils();
++extern void Init_g_mainloop();
+ extern void Init_gobject();
+ 
+ char *
+@@ -148,6 +149,7 @@
+     Init_glib_spawn();
+     Init_glib_fileutils();
+     Init_glib_utils();
++    Init_g_mainloop();
+     Init_gobject();
+ 
+     /* This is called here once. */
+diff -urN ruby-gnome2-all-0.12.0-orig/glib/src/rbglib_mainloop.c ruby-gnome2-all-0.12.0-mod/glib/src/rbglib_mainloop.c
+--- ruby-gnome2-all-0.12.0-orig/glib/src/rbglib_mainloop.c	1969-12-31 17:00:00.000000000 -0700
++++ ruby-gnome2-all-0.12.0-mod/glib/src/rbglib_mainloop.c	2005-07-25 22:58:12.000000000 -0600
+@@ -0,0 +1,50 @@
++/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
++/************************************************
++
++  rbglib_mainloop.c -
++
++  $Author$
++  $Date$
++************************************************/
++
++#include "global.h"
++#include <glib/gmain.h>
++
++VALUE
++rbg_mainloop_allocate(klass)
++   VALUE klass;
++{
++	return Data_Wrap_Struct(klass, NULL, g_free, g_main_loop_new(NULL, FALSE));
++}
++
++VALUE
++rbg_mainloop_run(self)
++   VALUE self;
++{
++	GMainLoop *l;
++	Data_Get_Struct(self, GMainLoop, l);
++	g_main_loop_run(l);
++	return Qnil;
++}
++
++VALUE
++rbg_mainloop_quit(self)
++   VALUE self;
++{
++	GMainLoop *l;
++	Data_Get_Struct(self, GMainLoop, l);
++	g_main_loop_quit(l);
++	return Qnil;
++}
++
++void
++Init_g_mainloop()
++{
++	VALUE mGLib;
++	VALUE cGLibMainLoop;
++  mGLib = rb_define_module("GLib");
++  cGLibMainLoop = rb_define_class_under(mGLib, "MainLoop", rb_cObject);
++	rb_define_alloc_func (cGLibMainLoop, rbg_mainloop_allocate);
++  rb_define_method(cGLibMainLoop, "run", rbg_mainloop_run, 0);
++  rb_define_method(cGLibMainLoop, "quit", rbg_mainloop_quit, 0);
++}
================================================================



More information about the pld-cvs-commit mailing list