Changeset 35
- Timestamp:
- 11/06/10 03:40:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pymigemo/pymigemo.c
r34 r35 187 187 Migemo_set_operator(Migemo *self, PyObject *args, PyObject *kwds) 188 188 { 189 PyObject *result ;189 PyObject *result = NULL; 190 190 char *op; 191 191 int index; … … 201 201 } 202 202 203 if (!result) {204 return NULL;205 }206 207 203 return result; 208 204 } … … 211 207 Migemo_get_operator(Migemo *self, PyObject *args, PyObject *kwds) 212 208 { 213 PyObject *result ;209 PyObject *result = NULL; 214 210 const unsigned char *op; 215 211 int index; … … 224 220 result = PyString_FromString(op); 225 221 } 226 227 if (!result) { 228 return NULL; 222 else { 223 PyErr_SetString(PyExc_ValueError, "invalid opindex"); 229 224 } 230 225 … … 235 230 Migemo_load(Migemo *self, PyObject *args, PyObject *kwds) 236 231 { 237 PyObject *result ;232 PyObject *result = NULL; 238 233 char *dict_file; 239 234 int dict_id; … … 247 242 if (dict_file) { 248 243 result = PyInt_FromLong((long)migemo_load(self->migemo_obj, dict_id, dict_file)); 249 }250 251 if (!result) {252 return NULL;253 244 } 254 245
Note: See TracChangeset
for help on using the changeset viewer.