mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.h, ruby.h, util.h: enable prototypes in C++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6d9e4a20e1
commit
e93b8f1c89
4 changed files with 33 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Dec 21 16:18:17 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
|
* dln.h, ruby.h, util.h: enable prototypes in C++.
|
||||||
|
|
||||||
Fri Dec 21 03:15:52 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
Fri Dec 21 03:15:52 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
* eval.c (rb_mod_define_method): must not convert Method to Proc.
|
* eval.c (rb_mod_define_method): must not convert Method to Proc.
|
||||||
|
|
9
dln.h
9
dln.h
|
@ -13,6 +13,15 @@
|
||||||
#ifndef DLN_H
|
#ifndef DLN_H
|
||||||
#define DLN_H
|
#define DLN_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# ifndef HAVE_PROTOTYPES
|
||||||
|
# define HAVE_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
# ifndef HAVE_STDARG_PROTOTYPES
|
||||||
|
# define HAVE_STDARG_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef _
|
#undef _
|
||||||
#ifdef HAVE_PROTOTYPES
|
#ifdef HAVE_PROTOTYPES
|
||||||
# define _(args) args
|
# define _(args) args
|
||||||
|
|
15
ruby.h
15
ruby.h
|
@ -52,6 +52,15 @@ extern "C" {
|
||||||
# define volatile
|
# define volatile
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# ifndef HAVE_PROTOTYPES
|
||||||
|
# define HAVE_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
# ifndef HAVE_STDARG_PROTOTYPES
|
||||||
|
# define HAVE_STDARG_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef _
|
#undef _
|
||||||
#ifdef HAVE_PROTOTYPES
|
#ifdef HAVE_PROTOTYPES
|
||||||
# define _(args) args
|
# define _(args) args
|
||||||
|
@ -582,7 +591,7 @@ EXTERN VALUE rb_eLoadError;
|
||||||
EXTERN VALUE rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo;
|
EXTERN VALUE rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo;
|
||||||
|
|
||||||
static inline VALUE
|
static inline VALUE
|
||||||
#if defined(__cplusplus)
|
#if defined(HAVE_PROTOTYPES)
|
||||||
rb_class_of(VALUE obj)
|
rb_class_of(VALUE obj)
|
||||||
#else
|
#else
|
||||||
rb_class_of(obj)
|
rb_class_of(obj)
|
||||||
|
@ -599,7 +608,7 @@ rb_class_of(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
#if defined(__cplusplus)
|
#if defined(HAVE_PROTOTYPES)
|
||||||
rb_type(VALUE obj)
|
rb_type(VALUE obj)
|
||||||
#else
|
#else
|
||||||
rb_type(obj)
|
rb_type(obj)
|
||||||
|
@ -616,7 +625,7 @@ rb_type(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
#if defined(__cplusplus)
|
#if defined(HAVE_PROTOTYPES)
|
||||||
rb_special_const_p(VALUE obj)
|
rb_special_const_p(VALUE obj)
|
||||||
#else
|
#else
|
||||||
rb_special_const_p(obj)
|
rb_special_const_p(obj)
|
||||||
|
|
8
util.h
8
util.h
|
@ -14,6 +14,14 @@
|
||||||
#define UTIL_H
|
#define UTIL_H
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# ifndef HAVE_PROTOTYPES
|
||||||
|
# define HAVE_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
# ifndef HAVE_STDARG_PROTOTYPES
|
||||||
|
# define HAVE_STDARG_PROTOTYPES 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#ifdef HAVE_PROTOTYPES
|
#ifdef HAVE_PROTOTYPES
|
||||||
# define _(args) args
|
# define _(args) args
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue