code: def new_cstr(self, input, null_if_empty=True):
          
          if input:
              enc = input.encode('utf-8')
          else:
              enc = ''.encode('utf-8')
          if not enc:
              if null_if_empty:
                  return self._ffi.NULL
          try:
              return self._cache[enc]
          except KeyError:
              cstr = self._ffi.new('char[]', enc)
              self._cache[enc] = cstr
              return cstr
docs: Converts the input into an encoded C String (NUL-terminated)
          :param input: The python string
          :param null_if_empty: If the input is empty, return NULL rather
              than the empty string
          :return: The C string