From 06a1f23cada6791ec94d398df49c64814fc01b97 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 25 Jul 2004 13:15:54 +0000 Subject: [PATCH] Don't depend on header files for class information. --- src/esmart_trans_x11/rb_esmart_trans_x11.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/esmart_trans_x11/rb_esmart_trans_x11.c b/src/esmart_trans_x11/rb_esmart_trans_x11.c index 6f50866..fa29836 100644 --- a/src/esmart_trans_x11/rb_esmart_trans_x11.c +++ b/src/esmart_trans_x11/rb_esmart_trans_x11.c @@ -1,5 +1,5 @@ /* - * $Id: rb_esmart_trans_x11.c 36 2004-07-25 10:45:47Z tilman $ + * $Id: rb_esmart_trans_x11.c 41 2004-07-25 13:15:54Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -23,7 +23,6 @@ #include #include #include -#include #include "../rb_esmart.h" @@ -65,9 +64,14 @@ static VALUE c_type_set (VALUE self, VALUE val) static VALUE c_window_set (VALUE self, VALUE window) { + static VALUE c; + GET_OBJ (self, Evas_Object *, e); - CHECK_CLASS (window, cEcoreXWindow); + if (!c) + c = rb_eval_string ("Ecore::X::Window"); + + CHECK_CLASS (window, c); GET_OBJ (window, Ecore_X_Window, w); esmart_trans_x11_window_set (*e, *w); -- 2.30.2