Verified Commit 9a9e4dc5 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Update callback functions for pacman 6

parent ddc0c9f2
......@@ -163,10 +163,10 @@ struct _alpm_cb_getset {
pyalpm_callback_id id;
};
void pyalpm_eventcb(alpm_event_t event, void* data1, void *data2);
void pyalpm_questioncb(alpm_question_t question,
void pyalpm_eventcb(void *ctx, alpm_event_t event, void* data1, void *data2);
void pyalpm_questioncb(void *ctx, alpm_question_t question,
void* data1, void *data2, void* data3, int* retcode);
void pyalpm_progresscb(alpm_progress_t op,
void pyalpm_progresscb(void *ctx, alpm_progress_t op,
const char* target_name, int percentage, size_t n_targets, size_t cur_target);
static struct _alpm_cb_getset cb_getsets[N_CALLBACKS] = {
......
......@@ -31,7 +31,7 @@
/** Transaction callbacks */
extern PyObject *global_py_callbacks[N_CALLBACKS];
void pyalpm_eventcb(alpm_event_t *event) {
void pyalpm_eventcb(void *ctx, alpm_event_t *event) {
const char *eventstr;
switch(event->type) {
case ALPM_EVENT_CHECKDEPS_START:
......@@ -153,11 +153,11 @@ void pyalpm_eventcb(alpm_event_t *event) {
}
}
void pyalpm_questioncb(alpm_question_t question,
void pyalpm_questioncb(void *ctx, alpm_question_t question,
void* data1, void *data2, void* data3, int* retcode) {
}
void pyalpm_progresscb(alpm_progress_t op,
void pyalpm_progresscb(void *ctx, alpm_progress_t op,
const char* target_name, int percentage, size_t n_targets, size_t cur_target) {
PyObject *result = NULL;
if (global_py_callbacks[CB_PROGRESS]) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment