Example #1
0
    def ptr_getter(field):
        if field == b'context':
            ptr = lib.hexchat_list_str(lib.ph, list_, field)
            ctx = ffi.cast('hexchat_context*', ptr)
            return Context(ctx)

        return None
Example #2
0
    def ptr_getter(field):
        if field == b'context':
            ptr = lib.hexchat_list_str(lib.ph, list_, field)
            ctx = ffi.cast('hexchat_context*', ptr)
            return Context(ctx)

        return None
Example #3
0
    def string_getter(field):
        string = lib.hexchat_list_str(lib.ph, list_, field)
        if string != ffi.NULL:
            return __decode(ffi.string(string))

        return ''
Example #4
0
    def string_getter(field):
        string = lib.hexchat_list_str(lib.ph, list_, field)
        if string != ffi.NULL:
            return __decode(ffi.string(string))

        return ''