mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Compilers, basically an annoying coworkers. Fixes #815
This commit is contained in:
parent
90e6e3e011
commit
e6cb1bc2bf
2 changed files with 8 additions and 2 deletions
|
@ -116,7 +116,7 @@ static VALUE buf_to_str(VALUE self) {
|
||||||
struct buf_int* b;
|
struct buf_int* b;
|
||||||
Data_Get_Struct(self, struct buf_int, b);
|
Data_Get_Struct(self, struct buf_int, b);
|
||||||
|
|
||||||
return rb_str_new(b->top, b->cur - b->top);
|
return rb_str_new((const char*)(b->top), b->cur - b->top);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE buf_used(VALUE self) {
|
static VALUE buf_used(VALUE self) {
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
#define RSTRING_NOT_MODIFIED 1
|
#define RSTRING_NOT_MODIFIED 1
|
||||||
|
|
||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
|
#include <ruby/version.h>
|
||||||
|
|
||||||
|
#if RUBY_API_VERSION_MAJOR == 1
|
||||||
#include <rubyio.h>
|
#include <rubyio.h>
|
||||||
|
#else
|
||||||
|
#include <ruby/io.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL_BIO_H
|
#ifdef HAVE_OPENSSL_BIO_H
|
||||||
|
|
||||||
|
@ -347,7 +353,7 @@ VALUE engine_peercert(VALUE self) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_cert_buf = rb_str_new(buf, bytes);
|
rb_cert_buf = rb_str_new((const char*)(buf), bytes);
|
||||||
if(!cert_buf) {
|
if(!cert_buf) {
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue