projects
/
ruby-ecore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made on_ecore_event static.
[ruby-ecore.git]
/
src
/
ecore
/
rb_animator.c
diff --git
a/src/ecore/rb_animator.c
b/src/ecore/rb_animator.c
index 6544baa9968e396c9c1f7ea59dedcf0e1e505097..41837ded1c0d5832864e647f2a7f1c06817e09ce 100644
(file)
--- a/
src/ecore/rb_animator.c
+++ b/
src/ecore/rb_animator.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_animator.c 1
46 2004-11-27 15:38:52
Z tilman $
+ * $Id: rb_animator.c 1
50 2004-12-03 13:45:00
Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
@@
-25,6
+25,8
@@
#include "rb_ecore.h"
#include "rb_ecore.h"
+void Init_stack (VALUE *addr);
+
typedef struct {
Ecore_Animator *real;
VALUE callback;
typedef struct {
Ecore_Animator *real;
VALUE callback;
@@
-35,6
+37,15
@@
static int on_animator (void *data)
{
VALUE r;
RbAnimator *animator = data;
{
VALUE r;
RbAnimator *animator = data;
+ static bool initted;
+
+ /* this fixes a weird segfault that occured when the animator's
+ * callback was called from a Ecore::Timer callback.
+ */
+ if (!initted) {
+ Init_stack (0);
+ initted = true;
+ }
r = rb_funcall (animator->callback, rb_intern ("call"), 0);
r = rb_funcall (animator->callback, rb_intern ("call"), 0);