+
+
+%typemap(in) std::list<std::shared_ptr<GeomAPI_Pnt> > &thePoints (std::list<std::shared_ptr<GeomAPI_Pnt> > temp) {
+ std::shared_ptr<GeomAPI_Pnt> * temp_pnt;
+ int newmem = 0;
+ if (PySequence_Check($input)) {
+ for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
+ PyObject * item = PySequence_GetItem($input, i);
+ if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pnt, $descriptor(std::shared_ptr<GeomAPI_Pnt> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (!temp_pnt) {
+ PyErr_SetString(PyExc_TypeError, "argument must be list of GeomAPI_Pnt.");
+ return NULL;
+ }
+ temp.push_back(*temp_pnt);
+ if (newmem & SWIG_CAST_NEW_MEMORY) {
+ delete temp_pnt;
+ }
+ }
+ Py_DECREF(item);
+ }
+ $1 = &temp;
+ } else {
+ PyErr_SetString(PyExc_ValueError, "argument must be list of GeomAPI_Pnt.");
+ return NULL;
+ }
+}
+
+%typemap(in) double & (double temp) {
+ if (PyLong_Check($input)) {
+ temp = PyLong_AsLong($input);
+ $1 = &temp;
+ }
+}
+
+%typemap(argout) double & {
+ $result = PyFloat_FromDouble(*$1);
+}