Skip to content

Commit

Permalink
Fix some method declarations for Python API compat
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 24, 2024
1 parent bc612a5 commit 11160dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kitty/core_text.m
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ static CTFontRef nerd_font(CGFloat sz) {
}

static PyObject*
get_variation(CTFace *self) {
get_variation(CTFace *self, PyObject *args UNUSED) {
RAII_CoreFoundation(CFDictionaryRef, src, CTFontCopyVariation(self->ct_font));
return variation_to_python(src);
}
Expand All @@ -1062,7 +1062,7 @@ static CTFontRef nerd_font(CGFloat sz) {


static PyObject*
get_variable_data(CTFace *self) {
get_variable_data(CTFace *self, PyObject *args UNUSED) {
if (!ensure_name_table(self)) return NULL;
RAII_PyObject(output, PyDict_New());
if (!output) return NULL;
Expand All @@ -1078,7 +1078,7 @@ static CTFontRef nerd_font(CGFloat sz) {
}

static PyObject*
identify_for_debug(CTFace *self) {
identify_for_debug(CTFace *self, PyObject *args UNUSED) {
RAII_PyObject(features, PyTuple_New(self->font_features.count)); if (!features) return NULL;
char buf[128];
for (unsigned i = 0; i < self->font_features.count; i++) {
Expand All @@ -1095,13 +1095,13 @@ static CTFontRef nerd_font(CGFloat sz) {
// Boilerplate {{{

static PyObject*
display_name(CTFace *self) {
display_name(CTFace *self, PyObject *args UNUSED) {
CFStringRef dn = CTFontCopyDisplayName(self->ct_font);
return convert_cfstring(dn, true);
}

static PyObject*
postscript_name(CTFace *self) {
postscript_name(CTFace *self, PyObject *args UNUSED) {
return self->postscript_name ? Py_BuildValue("O", self->postscript_name) : PyUnicode_FromString("");
}

Expand Down

0 comments on commit 11160dd

Please sign in to comment.