version 1.1 | | version 1.2 |
---|
| | |
if (!PyArg_ParseTuple(args,"sii",&txt,&x,&y)) | | if (!PyArg_ParseTuple(args,"sii",&txt,&x,&y)) |
return NULL; | | return NULL; |
op = cf_create_object_by_name(txt); | | op = cf_create_object_by_name(txt); |
| | if (op == NULL) |
| | { |
| | Py_INCREF(Py_None); |
| | return Py_None; |
| | } |
cf_map_insert_object(map->map,op,x,y); | | cf_map_insert_object(map->map,op,x,y); |
return Crossfire_Object_wrap(op); | | return Crossfire_Object_wrap(op); |
} | | } |
| | |
wrapper = PyObject_NEW(Crossfire_Map, &Crossfire_MapType); | | wrapper = PyObject_NEW(Crossfire_Map, &Crossfire_MapType); |
if(wrapper != NULL) | | if(wrapper != NULL) |
wrapper->map = what; | | wrapper->map = what; |
printf("Wrapping map: %s\n", wrapper->map->name); | | |
return (PyObject *)wrapper; | | return (PyObject *)wrapper; |
} | | } |
| | |