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; }
/** * */ @JRubyMethod(required = 1, visibility=PRIVATE) public IRubyObject initialize_copy(ThreadContext context, IRubyObject other) { if (this == other) { return this; } Buffer orig = (Buffer) other; this.typeSize = orig.typeSize; this.size = orig.size; this.inout = orig.inout; setMemoryIO(orig.getMemoryIO().dup()); return this; }
/** * */ @JRubyMethod(required = 1, visibility=PRIVATE) public IRubyObject initialize_copy(ThreadContext context, IRubyObject other) { if (this == other) { return this; } Buffer orig = (Buffer) other; this.typeSize = orig.typeSize; this.size = orig.size; this.inout = orig.inout; setMemoryIO(orig.getMemoryIO().dup()); return this; }
/** * */ @JRubyMethod(required = 1, visibility=PRIVATE) public IRubyObject initialize_copy(ThreadContext context, IRubyObject other) { if (this == other) { return this; } Buffer orig = (Buffer) other; this.typeSize = orig.typeSize; this.size = orig.size; this.inout = orig.inout; setMemoryIO(orig.getMemoryIO().dup()); return this; }
/** * */ @JRubyMethod(required = 1, visibility=PRIVATE) public IRubyObject initialize_copy(ThreadContext context, IRubyObject other) { if (this == other) { return this; } Buffer orig = (Buffer) other; this.typeSize = orig.typeSize; this.size = orig.size; this.inout = orig.inout; setMemoryIO(orig.getMemoryIO().dup()); 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; }
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; }