Пример #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
Пример #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
Пример #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 ''
Пример #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 ''