Ruby
1.9.3p429(2013-05-15revision40747)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
openssl
ruby_missing.h
Go to the documentation of this file.
1
/*
2
* $Id: ruby_missing.h 31149 2011-03-22 11:09:43Z akr $
3
* 'OpenSSL for Ruby' project
4
* Copyright (C) 2001-2003 Michal Rokos <m.rokos@sh.cvut.cz>
5
* All rights reserved.
6
*/
7
/*
8
* This program is licenced under the same licence as Ruby.
9
* (See the file 'LICENCE'.)
10
*/
11
#if !defined(_OSSL_RUBY_MISSING_H_)
12
#define _OSSL_RUBY_MISSING_H_
13
14
#define rb_define_copy_func(klass, func) \
15
rb_define_method((klass), "initialize_copy", (func), 1)
16
17
18
#ifndef GetReadFile
19
#define FPTR_TO_FD(fptr) ((fptr)->fd)
20
#else
21
#define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr)))
22
#endif
23
24
#ifndef HAVE_RB_IO_T
25
#define rb_io_t OpenFile
26
#endif
27
28
#ifndef HAVE_RB_STR_SET_LEN
29
/* these methods should probably be backported to 1.8 */
30
#define rb_str_set_len(str, length) do { \
31
RSTRING(str)->ptr[(length)] = 0; \
32
RSTRING(str)->len = (length); \
33
} while(0)
34
#endif
/* ! HAVE_RB_STR_SET_LEN */
35
36
#ifndef HAVE_RB_BLOCK_CALL
37
/* the openssl module doesn't use arg[3-4] and arg2 is always rb_each */
38
#define rb_block_call(arg1, arg2, arg3, arg4, arg5, arg6) rb_iterate(rb_each, (arg1), (arg5), (arg6))
39
#endif
/* ! HAVE_RB_BLOCK_CALL */
40
41
#endif
/* _OSSL_RUBY_MISSING_H_ */
42
Generated on Thu May 23 2013 20:33:04 for Ruby by
1.8.3