Class: ChunkIO::Stream
- Inherits:
-
Object
- Object
- ChunkIO::Stream
- Defined in:
- ext/chunkio/chunkio_stream.c
Instance Method Summary collapse
- #initialize(context, name) ⇒ Object constructor
Constructor Details
#initialize(context, name) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'ext/chunkio/chunkio_stream.c', line 34
static VALUE chunkio_stream_initialize(VALUE self, VALUE context, VALUE name)
{
char *stream_name = RSTRING_PTR(name);
struct cio_ctx *ctx = UnwrapChunkIOContext(context);
struct cio_stream *st = cio_stream_create(ctx, stream_name, CIO_STORE_FS); /* TODO CIO_STORE_FS */
if (!st) {
rb_raise(rb_eStandardError, "chunkio: cannot create stream");
return Qnil;
}
DATA_PTR(self) = st;
return Qnil;
}
|