Changeset 1694 for trunk/lang/python/Rappture/PyRpEncode.cc
- Timestamp:
- Apr 13, 2010 12:36:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/python/Rappture/PyRpEncode.cc
r1384 r1694 30 30 31 31 static char *kwlist[] = { 32 33 32 (char *)"data", 33 NULL 34 34 }; 35 35 … … 65 65 66 66 static char *kwlist[] = { 67 (char *)"data", 68 (char *)"flags", 69 67 (char *)"data", 68 (char *)"flags", 69 NULL 70 70 }; 71 71 … … 83 83 Rappture::Buffer buf(data, dlen); 84 84 if (!Rappture::encoding::encode(err, buf, flags)) { 85 85 std::string outStr; 86 86 87 87 outStr = err.remark(); 88 89 88 outStr += "\n"; 89 outStr += err.context(); 90 90 PyErr_SetString(PyExc_RuntimeError, outStr.c_str()); 91 91 buf.clear(); … … 112 112 113 113 static char *kwlist[] = { 114 (char *)"data", 115 (char *)"flags", 116 114 (char *)"data", 115 (char *)"flags", 116 NULL 117 117 }; 118 118 … … 130 130 Rappture::Buffer buf(data, dlen); 131 131 if (!Rappture::encoding::decode(err, buf, flags)) { 132 132 std::string outStr; 133 133 134 134 outStr = err.remark(); 135 136 135 outStr += "\n"; 136 outStr += err.context(); 137 137 PyErr_SetString(PyExc_RuntimeError,outStr.c_str()); 138 138 return NULL; … … 173 173 if (ErrorObject == NULL) { 174 174 ErrorObject = PyErr_NewException((char *)"Rappture.encoding.error", 175 175 NULL, NULL); 176 176 if (ErrorObject == NULL) { 177 177 return; 178 178 } 179 179 } 180 180 Py_INCREF(ErrorObject);
Note: See TracChangeset
for help on using the changeset viewer.