lib/tidy/tidybuf.rb in tidy-1.0.1 vs lib/tidy/tidybuf.rb in tidy-1.1.0

- old
+ new

@@ -1,40 +1,40 @@ -# Buffer structure +# Buffer structure. # class Tidybuf extend DL::Importable - # Access TidyBuffer instance + # Access TidyBuffer instance. # attr_reader(:struct) - # Mimic TidyBuffer + # Mimic TidyBuffer. # TidyBuffer = struct [ "byte* bp", "uint size", "uint allocated", "uint next" ] - def initialize() + def initialize @struct = TidyBuffer.malloc end - # Free current contents and zero out + # Free current contents and zero out. # - def free() + def free Tidylib.buf_free(@struct) end - # Convert to array + # Convert to array. # def to_a to_s.split("\r\n") end - # Convert to string + # Convert to string. # def to_s @struct.bp.to_s end