/* vi:set ts=8 sts=4 sw=4: * * VIM - Vi IMproved by Bram Moolenaar * * Ruby interface by Shugo Maeda * with improvements by SegPhault (Ryan Paul) * with improvements by Jon Maken * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */#ifdef HAVE_CONFIG_H#include"auto/config.h"#endif#include<stdio.h>#include<string.h>#ifdef _WIN32# if !defined(DYNAMIC_RUBY_VER) || (DYNAMIC_RUBY_VER < 18)# define NT# endif# ifndef DYNAMIC_RUBY# define IMPORT /* For static dll usage __declspec(dllimport) */# define RUBYEXTERN __declspec(dllimport)# endif#endif#ifndef RUBYEXTERN# define RUBYEXTERN extern#endif#ifdef DYNAMIC_RUBY/* * This is tricky. In ruby.h there is (inline) function rb_class_of() * definition. This function use these variables. But we want function to * use dll_* variables. */# define rb_cFalseClass (*dll_rb_cFalseClass)# define rb_cFixnum (*dll_rb_cFixnum)# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20# define rb_cFloat (*dll_rb_cFloat)# endif# define rb_cNilClass (*dll_rb_cNilClass)# define rb_cSymbol