gst/gst.override: Only display the filename and not the full path

Original commit message from CVS:
* gst/gst.override: (pygst_debug_log):
Only display the filename and not the full path
This commit is contained in:
Edward Hervey 2005-08-11 13:23:20 +00:00
parent 762b581fcb
commit 1a39bca0ea
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-08-11 Edward Hervey <edward@fluendo.com>
* gst/gst.override: (pygst_debug_log):
Only display the filename and not the full path
2005-08-10 Edward Hervey <edward@fluendo.com>
* gst/gstmodule.c: (init_gst):

View file

@ -236,10 +236,12 @@ pygst_debug_log (PyObject *whatever, PyObject *string, GstDebugLevel level)
frame = PyEval_GetFrame();
function = PyString_AsString(frame->f_code->co_name);
filename = PyString_AsString(frame->f_code->co_filename);
filename = g_path_get_basename(PyString_AsString(frame->f_code->co_filename));
lineno = frame->f_code->co_firstlineno;
/* gst_debug_log : category, level, file, function, line, object, format, va_list */
gst_debug_log (GST_CAT_DEFAULT, level, filename, function, lineno, NULL, "%s", str);
if (filename)
g_free(filename);
Py_INCREF (Py_None);
return Py_None;
}