| 100 | } |
| 101 | |
| 102 | void PropertyInteger::setPyObject(PyObject* value) |
| 103 | { |
| 104 | if (PyLong_Check(value)) { |
| 105 | aboutToSetValue(); |
| 106 | _lValue = PyLong_AsLong(value); |
| 107 | hasSetValue(); |
| 108 | } |
| 109 | else { |
| 110 | std::string error = std::string("type must be int, not "); |
| 111 | error += value->ob_type->tp_name; |
| 112 | throw Base::TypeError(error); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void PropertyInteger::Save(Base::Writer& writer) const |
| 117 | { |
no test coverage detected