code: def new_cbuf(self, input, null_if_empty=True):
          
          if not isinstance(input, bytes) and input:
              input = input.encode('utf-8')
          if not input and null_if_empty:
              return self._ffi.NULL, 0
  
          cbuf = self._ffi.new('char[]', input)
          self._bufs.append(cbuf)
          return cbuf, len(input)
docs: Converts the input into a raw C buffer
          :param input: The input
          :param null_if_empty: If the input is empty
          :return: A tuple of buffer,length