Cleanup: use "filepath" instead of "filename" for full paths
Reserve "filename" when only the name component is used.
This commit is contained in:
@@ -396,41 +396,41 @@ static PyObject *py_blf_shadow_offset(PyObject *UNUSED(self), PyObject *args)
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(py_blf_load_doc,
|
||||
".. function:: load(filename)\n"
|
||||
".. function:: load(filepath)\n"
|
||||
"\n"
|
||||
" Load a new font.\n"
|
||||
"\n"
|
||||
" :arg filename: the filename of the font.\n"
|
||||
" :type filename: string\n"
|
||||
" :arg filepath: the filepath of the font.\n"
|
||||
" :type filepath: string\n"
|
||||
" :return: the new font's fontid or -1 if there was an error.\n"
|
||||
" :rtype: integer\n");
|
||||
static PyObject *py_blf_load(PyObject *UNUSED(self), PyObject *args)
|
||||
{
|
||||
const char *filename;
|
||||
const char *filepath;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s:blf.load", &filename)) {
|
||||
if (!PyArg_ParseTuple(args, "s:blf.load", &filepath)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return PyLong_FromLong(BLF_load(filename));
|
||||
return PyLong_FromLong(BLF_load(filepath));
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(py_blf_unload_doc,
|
||||
".. function:: unload(filename)\n"
|
||||
".. function:: unload(filepath)\n"
|
||||
"\n"
|
||||
" Unload an existing font.\n"
|
||||
"\n"
|
||||
" :arg filename: the filename of the font.\n"
|
||||
" :type filename: string\n");
|
||||
" :arg filepath: the filepath of the font.\n"
|
||||
" :type filepath: string\n");
|
||||
static PyObject *py_blf_unload(PyObject *UNUSED(self), PyObject *args)
|
||||
{
|
||||
const char *filename;
|
||||
const char *filepath;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s:blf.unload", &filename)) {
|
||||
if (!PyArg_ParseTuple(args, "s:blf.unload", &filepath)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BLF_unload(filename);
|
||||
BLF_unload(filepath);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user