git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add support for writing python strings directly
[enigma2.git]
/
lib
/
base
/
console.cpp
diff --git
a/lib/base/console.cpp
b/lib/base/console.cpp
index cc994ea9e321eaedb850b01b76d0ba6518b8cbf4..a29772d8fac00a54d3453a67b2239f8fb9f5eea0 100644
(file)
--- a/
lib/base/console.cpp
+++ b/
lib/base/console.cpp
@@
-333,7
+333,18
@@
void eConsoleAppContainer::write( const char *data, int len )
char *tmp = new char[len];
memcpy(tmp, data, len);
outbuf.push(queue_data(tmp,len));
char *tmp = new char[len];
memcpy(tmp, data, len);
outbuf.push(queue_data(tmp,len));
- out->start();
+ if (out)
+ out->start();
+}
+
+void eConsoleAppContainer::write( PyObject *data )
+{
+ char *buffer;
+ int length;
+ if (PyString_AsStringAndSize(data, &buffer, &length))
+ return;
+ if (buffer && length)
+ write(buffer, length);
}
void eConsoleAppContainer::readyWrite(int what)
}
void eConsoleAppContainer::readyWrite(int what)