~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to goruby.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-05-16 12:37:06 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20080516123706-r4llcdfd35aobrjv
Tags: 1.9.0.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.
* debian/control:
  - ruby1.9 pkg: moved rdoc1.9 suggestion to depends. (LP: #228345)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
void Init_golf(void); 
2
 
#define RUBY_MAIN_INIT() Init_golf()
 
2
#define ruby_run_node goruby_run_node
3
3
#include "main.c"
 
4
#undef ruby_run_node
 
5
 
 
6
RUBY_EXTERN int ruby_run_node(void*);
 
7
RUBY_EXTERN void ruby_init_ext(const char *name, void (*init)(void));
 
8
 
 
9
static VALUE
 
10
init_golf(VALUE arg)
 
11
{
 
12
    ruby_init_ext("golf", Init_golf);
 
13
    return arg;
 
14
}
 
15
 
 
16
int
 
17
goruby_run_node(void *arg)
 
18
{
 
19
    int state;
 
20
    if (NIL_P(rb_protect(init_golf, Qtrue, &state))) {
 
21
        return state == EXIT_SUCCESS ? EXIT_FAILURE : state;
 
22
    }
 
23
    return ruby_run_node(arg);
 
24
}