lib/czmq-ffi-gen/czmq/ffi/zchunk.rb in czmq-ffi-gen-0.13.0 vs lib/czmq-ffi-gen/czmq/ffi/zchunk.rb in czmq-ffi-gen-0.14.0
- old
+ new
@@ -71,12 +71,12 @@
def __undef_finalizer
ObjectSpace.undefine_finalizer self
@finalizer = nil
end
- # Create a new chunk of the specified size. If you specify the data, it
- # is copied into the chunk. If you do not specify the data, the chunk is
+ # Create a new chunk of the specified size. If you specify the data, it
+ # is copied into the chunk. If you do not specify the data, the chunk is
# allocated and left empty, and you can then add data using zchunk_append.
# @param data [::FFI::Pointer, #to_ptr]
# @param size [Integer, #to_int, #to_i]
# @return [CZMQ::Zchunk]
def self.new(data, size)
@@ -136,11 +136,11 @@
result = ::CZMQ::FFI.zchunk_data(self_p)
result
end
# Set chunk data from user-supplied data; truncate if too large. Data may
- # be null. Returns actual size of chunk
+ # be null. Returns actual size of chunk
#
# @param data [::FFI::Pointer, #to_ptr]
# @param size [Integer, #to_int, #to_i]
# @return [Integer]
def set(data, size)
@@ -163,13 +163,13 @@
size = Integer(size)
result = ::CZMQ::FFI.zchunk_fill(self_p, filler, size)
result
end
- # Append user-supplied data to chunk, return resulting chunk size. If the
+ # Append user-supplied data to chunk, return resulting chunk size. If the
# data would exceeded the available space, it is truncated. If you want to
- # grow the chunk to accommodate new data, use the zchunk_extend method.
+ # grow the chunk to accommodate new data, use the zchunk_extend method.
#
# @param data [::FFI::Pointer, #to_ptr]
# @param size [Integer, #to_int, #to_i]
# @return [Integer]
def append(data, size)
@@ -179,11 +179,11 @@
result = ::CZMQ::FFI.zchunk_append(self_p, data, size)
result
end
# Append user-supplied data to chunk, return resulting chunk size. If the
- # data would exceeded the available space, the chunk grows in size.
+ # data would exceeded the available space, the chunk grows in size.
#
# @param data [::FFI::Pointer, #to_ptr]
# @param size [Integer, #to_int, #to_i]
# @return [Integer]
def extend(data, size)
@@ -192,14 +192,14 @@
size = Integer(size)
result = ::CZMQ::FFI.zchunk_extend(self_p, data, size)
result
end
- # Copy as much data from 'source' into the chunk as possible; returns the
- # new size of chunk. If all data from 'source' is used, returns exhausted
+ # Copy as much data from 'source' into the chunk as possible; returns the
+ # new size of chunk. If all data from 'source' is used, returns exhausted
# on the source chunk. Source can be consumed as many times as needed until
- # it is exhausted. If source was already exhausted, does not change chunk.
+ # it is exhausted. If source was already exhausted, does not change chunk.
#
# @param source [Zchunk, #__ptr]
# @return [Integer]
def consume(source)
raise DestroyedError unless @ptr
@@ -208,11 +208,11 @@
result = ::CZMQ::FFI.zchunk_consume(self_p, source)
result
end
# Returns true if the chunk was exhausted by consume methods, or if the
- # chunk has a size of zero.
+ # chunk has a size of zero.
#
# @return [Boolean]
def exhausted()
raise DestroyedError unless @ptr
self_p = @ptr
@@ -241,13 +241,13 @@
self_p = @ptr
result = ::CZMQ::FFI.zchunk_write(self_p, handle)
result
end
- # Try to slurp an entire file into a chunk. Will read up to maxsize of
- # the file. If maxsize is 0, will attempt to read the entire file and
- # fail with an assertion if that cannot fit into memory. Returns a new
+ # Try to slurp an entire file into a chunk. Will read up to maxsize of
+ # the file. If maxsize is 0, will attempt to read the entire file and
+ # fail with an assertion if that cannot fit into memory. Returns a new
# chunk containing the file data, or NULL if the file could not be read.
#
# @param filename [String, #to_s, nil]
# @param maxsize [Integer, #to_int, #to_i]
# @return [Zchunk]
@@ -256,13 +256,13 @@
result = ::CZMQ::FFI.zchunk_slurp(filename, maxsize)
result = Zchunk.__new result, true
result
end
- # Create copy of chunk, as new chunk object. Returns a fresh zchunk_t
+ # Create copy of chunk, as new chunk object. Returns a fresh zchunk_t
# object, or null if there was not enough heap memory. If chunk is null,
- # returns null.
+ # returns null.
#
# @return [Zchunk]
def dup()
raise DestroyedError unless @ptr
self_p = @ptr
@@ -270,11 +270,11 @@
result = Zchunk.__new result, true
result
end
# Return chunk data encoded as printable hex string. Caller must free
- # string when finished with it.
+ # string when finished with it.
#
# @return [::FFI::AutoPointer]
def strhex()
raise DestroyedError unless @ptr
self_p = @ptr
@@ -282,11 +282,11 @@
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
result
end
# Return chunk data copied into freshly allocated string
- # Caller must free string when finished with it.
+ # Caller must free string when finished with it.
#
# @return [::FFI::AutoPointer]
def strdup()
raise DestroyedError unless @ptr
self_p = @ptr
@@ -348,10 +348,10 @@
result = ::CZMQ::FFI.zchunk_fprint(self_p, file)
result
end
# Dump message to stderr, for debugging and tracing.
- # See zchunk_fprint for details
+ # See zchunk_fprint for details
#
# @return [void]
def print()
raise DestroyedError unless @ptr
self_p = @ptr