summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
63e2ce1)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return PyUnicode_FromString(name);
}
return PyUnicode_FromString(name);
}
+static int AS_set_name(ASObject* self, PyObject* args) {
+ const char* name = NULL;
+
+ if (!PyArg_ParseTuple(args, "s", &name))
+ return -1;
+
+ int r = loc_as_set_name(self->as, name);
+ if (r) {
+ PyErr_Format(PyExc_ValueError, "Could not set name: %s", name);
+ return r;
+ }
+
+ return 0;
+}
+
static PyObject* AS_richcompare(ASObject* self, ASObject* other, int op) {
int r = loc_as_cmp(self->as, other->as);
static PyObject* AS_richcompare(ASObject* self, ASObject* other, int op) {
int r = loc_as_cmp(self->as, other->as);
{
"name",
(getter)AS_get_name,
{
"name",
(getter)AS_get_name,