mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00

r44570 | nobu | 2014-01-12 17:11:32 +0900 (Sun, 12 Jan 2014) | 4 lines tcltklib.c: create_ip_exc format argument * ext/tk/tcltklib.c (create_ip_exc): format argument must not be a dynamic string, not to contain unescaped %. ------------------------------------------------------------------------ r44571 | nobu | 2014-01-12 17:11:34 +0900 (Sun, 12 Jan 2014) | 5 lines stubs.c: library name strings * ext/tk/stubs.c (ruby_open_tcl_dll, ruby_open_tk_dll): make library names by string literal concatenation at compilation time, not by sprintf() at runtime. ------------------------------------------------------------------------ r44572 | nobu | 2014-01-12 17:11:36 +0900 (Sun, 12 Jan 2014) | 1 line ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE * ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap depending on PRIsVALUE for 1.9. [Backport #9406] * ext/bigdecimal/bigdecimal.c (DECIMAL_SIZE_OF_BITS): fallback definition for 2.1 or older. [ruby-core:59750] [Backport #9406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/*
|
|
* $Id$
|
|
* 'OpenSSL for Ruby' project
|
|
* Copyright (C) 2001-2003 Michal Rokos <m.rokos@sh.cvut.cz>
|
|
* All rights reserved.
|
|
*/
|
|
/*
|
|
* This program is licenced under the same licence as Ruby.
|
|
* (See the file 'LICENCE'.)
|
|
*/
|
|
#if !defined(_OSSL_RUBY_MISSING_H_)
|
|
#define _OSSL_RUBY_MISSING_H_
|
|
|
|
#define rb_define_copy_func(klass, func) \
|
|
rb_define_method((klass), "initialize_copy", (func), 1)
|
|
|
|
|
|
#ifndef GetReadFile
|
|
#define FPTR_TO_FD(fptr) ((fptr)->fd)
|
|
#else
|
|
#define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr)))
|
|
#endif
|
|
|
|
#ifndef HAVE_RB_IO_T
|
|
#define rb_io_t OpenFile
|
|
#endif
|
|
|
|
#ifndef HAVE_RB_STR_SET_LEN
|
|
/* these methods should probably be backported to 1.8 */
|
|
#define rb_str_set_len(str, length) do { \
|
|
RSTRING(str)->ptr[(length)] = 0; \
|
|
RSTRING(str)->len = (length); \
|
|
} while(0)
|
|
#endif /* ! HAVE_RB_STR_SET_LEN */
|
|
|
|
#ifndef HAVE_RB_BLOCK_CALL
|
|
/* the openssl module doesn't use arg[3-4] and arg2 is always rb_each */
|
|
#define rb_block_call(arg1, arg2, arg3, arg4, arg5, arg6) rb_iterate(rb_each, (arg1), (arg5), (arg6))
|
|
#endif /* ! HAVE_RB_BLOCK_CALL */
|
|
|
|
#ifdef PRIsVALUE
|
|
# define RB_OBJ_CLASSNAME(obj) rb_obj_class(obj)
|
|
# define RB_OBJ_STRING(obj) (obj)
|
|
#else
|
|
# define PRIsVALUE "s"
|
|
# define RB_OBJ_CLASSNAME(obj) rb_obj_classname(obj)
|
|
# define RB_OBJ_STRING(obj) StringValueCStr(obj)
|
|
#endif
|
|
|
|
#endif /* _OSSL_RUBY_MISSING_H_ */
|