@classmethod
def _from_c(cls, ptr, iterator=None):
    """Builds the entry from a ``git_config_entry`` pointer.

        ``iterator`` must be a ``ConfigIterator`` instance if the entry was
        created during ``git_config_iterator`` actions.
        """
    entry = cls.__new__(cls)
    entry._entry = ptr
    entry.iterator = iterator
    if iterator is not None:
        entry.raw_name = entry.raw_name
        entry.raw_value = entry.raw_value
        entry.level = entry.level
    return entry
