Mercurial > pidgin
view finch/libgnt/pygnt/gntmodule.c @ 17284:37499e926a42
Add new MsimMessage element type, MSIM_TYPE_RAW, for fields in incoming
protocol messages that don't have any type information associated with them.
These elements will be unescaped if used as strings, in msim_msg_get_string(),
and won't be escaped if serialized into a protocol message in msim_msg_element_pack().
On the other hand, MSIM_TYPE_STRING will be escaped when packed. Previously,
everything was MSIM_TYPE_STRING, leading to more complicated escaping.
Now, an instant message "foo/bar\baz" will be represented as follows:
bm(raw): 1
f(raw): 180301984
cv(raw): 673
msg(raw): foo/1bar/2baz
And it will be interpreted by the receiving client correctly--
msim_msg_get_string(..., "msg") will be "foo/bar\baz".
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sat, 02 Jun 2007 02:43:43 +0000 |
parents | 8fd5ab3f9716 |
children | 6b16fca71f8b |
line wrap: on
line source
#include <pygobject.h> void gnt_register_classes (PyObject *d); extern PyMethodDef gnt_functions[]; DL_EXPORT(void) initgnt(void) { PyObject *m, *d; init_pygobject (); m = Py_InitModule ("gnt", gnt_functions); d = PyModule_GetDict (m); gnt_register_classes (d); if (PyErr_Occurred ()) { Py_FatalError ("can't initialise module sad"); } }