fix: noconfirm auto-selects first AUR match
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
|
||||
cdef extern from "storer.h":
|
||||
ctypedef struct Storer:
|
||||
pass
|
||||
|
||||
Storer* storer_new();
|
||||
void storer_destroy(Storer *s);
|
||||
int storer_get_value(Storer *s);
|
||||
void storer_set_value(Storer *s, int v);
|
||||
@@ -0,0 +1,12 @@
|
||||
pyx_c = custom_target('storer_pyx',
|
||||
output : 'storer_pyx.c',
|
||||
input : 'storer.pyx',
|
||||
depend_files : 'cstorer.pxd',
|
||||
command : [cython, '@INPUT@', '-o', '@OUTPUT@'],
|
||||
)
|
||||
|
||||
slib = py3_mod.extension_module('storer',
|
||||
'storer.c', pyx_c,
|
||||
dependencies : py3_dep)
|
||||
|
||||
pydir = meson.current_build_dir()
|
||||
@@ -0,0 +1,24 @@
|
||||
#include"storer.h"
|
||||
#include<stdlib.h>
|
||||
|
||||
struct _Storer {
|
||||
int value;
|
||||
};
|
||||
|
||||
Storer* storer_new() {
|
||||
Storer *s = malloc(sizeof(struct _Storer));
|
||||
s->value = 0;
|
||||
return s;
|
||||
}
|
||||
|
||||
void storer_destroy(Storer *s) {
|
||||
free(s);
|
||||
}
|
||||
|
||||
int storer_get_value(Storer *s) {
|
||||
return s->value;
|
||||
}
|
||||
|
||||
void storer_set_value(Storer *s, int v) {
|
||||
s->value = v;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct _Storer Storer;
|
||||
|
||||
Storer* storer_new();
|
||||
void storer_destroy(Storer *s);
|
||||
int storer_get_value(Storer *s);
|
||||
void storer_set_value(Storer *s, int v);
|
||||
@@ -0,0 +1,16 @@
|
||||
cimport cstorer
|
||||
|
||||
cdef class Storer:
|
||||
cdef cstorer.Storer* _c_storer
|
||||
|
||||
def __cinit__(self):
|
||||
self._c_storer = cstorer.storer_new()
|
||||
|
||||
def __dealloc__(self):
|
||||
cstorer.storer_destroy(self._c_storer)
|
||||
|
||||
cpdef int get_value(self):
|
||||
return cstorer.storer_get_value(self._c_storer)
|
||||
|
||||
cpdef set_value(self, int value):
|
||||
cstorer.storer_set_value(self._c_storer, value)
|
||||
Reference in New Issue
Block a user