public Buffer(Ruby runtime, int size, int flags) { this(runtime, runtime.getFFI().bufferClass, allocateMemoryIO(runtime, size), size, 1, flags); }
public Buffer(Ruby runtime, int size, int flags) { this(runtime, runtime.getFFI().bufferClass, allocateMemoryIO(runtime, size), size, 1, flags); }
public Buffer(Ruby runtime, int size, int flags) { this(runtime, runtime.getFFI().bufferClass, allocateMemoryIO(runtime, size), size, 1, flags); }
public Buffer(Ruby runtime, int size, int flags) { this(runtime, runtime.getFFI().bufferClass, allocateMemoryIO(runtime, size), size, 1, flags); }
private static Buffer allocate(ThreadContext context, IRubyObject recv, IRubyObject sizeArg, int count, int flags) { final int typeSize = calculateTypeSize(context, sizeArg); final int total = typeSize * count; return new Buffer(context.runtime, recv, allocateMemoryIO(context.runtime, total), total, typeSize, flags); }
private IRubyObject init(ThreadContext context, IRubyObject rbTypeSize, int count, int flags) { this.typeSize = calculateTypeSize(context, rbTypeSize); this.size = this.typeSize * count; this.inout = flags; setMemoryIO(allocateMemoryIO(context.runtime, (int) this.size)); return this; }
private static Buffer allocate(ThreadContext context, IRubyObject recv, IRubyObject sizeArg, int count, int flags) { final int typeSize = calculateTypeSize(context, sizeArg); final int total = typeSize * count; return new Buffer(context.runtime, recv, allocateMemoryIO(context.runtime, total), total, typeSize, flags); }
private static Buffer allocate(ThreadContext context, IRubyObject recv, IRubyObject sizeArg, int count, int flags) { final int typeSize = calculateTypeSize(context, sizeArg); final int total = typeSize * count; return new Buffer(context.runtime, recv, allocateMemoryIO(context.runtime, total), total, typeSize, flags); }
private static Buffer allocate(ThreadContext context, IRubyObject recv, IRubyObject sizeArg, int count, int flags) { final int typeSize = calculateTypeSize(context, sizeArg); final int total = typeSize * count; return new Buffer(context.runtime, recv, allocateMemoryIO(context.runtime, total), total, typeSize, flags); }
private IRubyObject init(ThreadContext context, IRubyObject rbTypeSize, int count, int flags, Block block) { this.typeSize = calculateTypeSize(context, rbTypeSize); this.size = this.typeSize * count; this.inout = flags; setMemoryIO(allocateMemoryIO(context.runtime, (int) this.size)); if (block.isGiven()) { block.yield(context, this); } return this; }
private IRubyObject init(ThreadContext context, IRubyObject rbTypeSize, int count, int flags, Block block) { this.typeSize = calculateTypeSize(context, rbTypeSize); this.size = this.typeSize * count; this.inout = flags; setMemoryIO(allocateMemoryIO(context.runtime, (int) this.size)); if (block.isGiven()) { block.yield(context, this); } return this; }
private IRubyObject init(ThreadContext context, IRubyObject rbTypeSize, int count, int flags, Block block) { this.typeSize = calculateTypeSize(context, rbTypeSize); this.size = this.typeSize * count; this.inout = flags; setMemoryIO(allocateMemoryIO(context.runtime, (int) this.size)); if (block.isGiven()) { block.yield(context, this); } return this; }