Пример #1
0
R_API bool r_binheap_push(RBinHeap *h, void *x) {
	if (!r_pvector_push (&h->a, NULL)) {
		return false;
	}
	_heap_up (h, h->a.v.len - 1, x);
	return true;
}
Пример #2
0
R_API void r_line_completion_push(RLineCompletion *completion, const char *str) {
	r_return_if_fail (completion && str);
	if (r_pvector_len (&completion->args) >= completion->args_limit) {
		return;
	}
	char *s = strdup (str);
	if (!s) {
		return;
	}
	r_pvector_push (&completion->args, (void *)s);
}