Changeset f54e82cf in sasview for src/sas/sascalc/calculator/c_extensions/sld2i_module.c
- Timestamp:
- Jul 31, 2018 4:36:52 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- d9b7197
- Parents:
- 3067196
- git-author:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (07/30/18 10:35:02)
- git-committer:
- Torin Cooper-Bennun <torin.cooper-bennun@…> (07/31/18 04:36:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/c_extensions/sld2i_module.c
r3010f68 rf54e82cf 4 4 #include <Python.h> 5 5 #include <stdio.h> 6 #include <sld2i.h>6 #include "sld2i.h" 7 7 8 8 #if PY_MAJOR_VERSION < 3 … … 68 68 double outspin; 69 69 double stheta; 70 GenI *sld2i; 70 71 71 72 if (!PyArg_ParseTuple(args, "iOOOOOOOOddd", &n_pix, &x_val_obj, &y_val_obj, &z_val_obj, &sldn_val_obj, &mx_val_obj, &my_val_obj, &mz_val_obj, &vol_pix_obj, &inspin, &outspin, &stheta)) return NULL; … … 78 79 OUTVECTOR(mz_val_obj, mz_val, n_x); 79 80 OUTVECTOR(vol_pix_obj, vol_pix, n_x); 80 GenI*sld2i = PyMem_Malloc(sizeof(GenI));81 sld2i = PyMem_Malloc(sizeof(GenI)); 81 82 if (sld2i != NULL) { 82 83 initGenI(sld2i, n_pix,x_val,y_val,z_val,sldn_val,mx_val,my_val,mz_val,vol_pix,inspin,outspin,stheta); … … 98 99 double *I_out; 99 100 PyObject *gen_obj; 101 GenI *sld2i; 100 102 101 103 if (!PyArg_ParseTuple(args, "OiOOO", &gen_obj, &npoints, &qx_obj, &qy_obj, &I_out_obj)) return NULL; … … 108 110 109 111 // Set the array pointers 110 GenI*sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI");112 sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI"); 111 113 112 114 genicomXY(sld2i, npoints, qx, qy, I_out); … … 126 128 double *I_out; 127 129 PyObject *gen_obj; 130 GenI *sld2i; 128 131 129 132 if (!PyArg_ParseTuple(args, "OiOO", &gen_obj, &npoints, &q_obj, &I_out_obj)) return NULL; … … 135 138 136 139 // Set the array pointers 137 GenI *sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI");140 sld2i = (GenI *)PyCapsule_GetPointer(gen_obj, "GenI"); 138 141 139 142 genicom(sld2i, npoints, q, I_out);
Note: See TracChangeset
for help on using the changeset viewer.