@@ -865,7 +865,7 @@ PyObject *connect(PyObject *self, PyObject *args) {
865865PyObject *disconnect (PyObject *self, PyObject *args) {
866866 char *pinname;
867867 if (!PyArg_ParseTuple (args, " s" , &pinname)) return NULL ;
868- if (!SHMPTR ( 0 ) ) {
868+ if (!hal_shmem_base ) {
869869 PyErr_Format (PyExc_RuntimeError,
870870 " Cannot call before creating component" );
871871 return NULL ;
@@ -1008,7 +1008,7 @@ PyObject *get_value(PyObject *self, PyObject *args) {
10081008 void *d_ptr;
10091009
10101010 if (!PyArg_ParseTuple (args, " s" , &name)) return NULL ;
1011- if (!SHMPTR ( 0 ) ) {
1011+ if (!hal_shmem_base ) {
10121012 PyErr_Format (PyExc_RuntimeError,
10131013 " Cannot call before creating component" );
10141014 return NULL ;
@@ -1085,7 +1085,7 @@ PyObject *get_value(PyObject *self, PyObject *args) {
10851085/* ######################################*/
10861086/* Get a dict of pin info for all pins in system */
10871087PyObject *get_info_pins (PyObject *self, PyObject *args) {
1088- int next;
1088+ SHMFIELD ( hal_pin_t ) next;
10891089 int type;
10901090 char str_n[] = " NAME" ;
10911091 char str_v[] = " VALUE" ;
@@ -1099,7 +1099,7 @@ PyObject *get_info_pins(PyObject *self, PyObject *args) {
10991099 PyObject* python_list = PyList_New (0 );
11001100 PyObject *obj;
11011101
1102- if (!SHMPTR ( 0 ) ) {
1102+ if (!hal_shmem_base ) {
11031103 PyErr_Format (PyExc_RuntimeError,
11041104 " Cannot call before creating component" );
11051105 return NULL ;
@@ -1109,7 +1109,7 @@ PyObject *get_info_pins(PyObject *self, PyObject *args) {
11091109 rtapi_mutex_get (&(hal_data->mutex ));
11101110 next = hal_data->pin_list_ptr ;
11111111 while (next != 0 ) {
1112- pin = ( hal_pin_t *) SHMPTR (next);
1112+ pin = SHMPTR (next);
11131113 type = pin->type ;
11141114 if (pin->signal != 0 ) {
11151115 sig = (hal_sig_t *)SHMPTR (pin->signal );
@@ -1174,7 +1174,7 @@ PyObject *get_info_pins(PyObject *self, PyObject *args) {
11741174/* ######################################*/
11751175/* Get a dict of signal info for all signals in system */
11761176PyObject *get_info_signals (PyObject *self, PyObject *args) {
1177- int next;
1177+ SHMFIELD ( hal_sig_t ) next;
11781178 int type;
11791179 char str_n[] = " NAME" ;
11801180 char str_v[] = " VALUE" ;
@@ -1186,7 +1186,7 @@ PyObject *get_info_signals(PyObject *self, PyObject *args) {
11861186 PyObject* python_list = PyList_New (0 );
11871187 PyObject *obj;
11881188
1189- if (!SHMPTR ( 0 ) ) {
1189+ if (!hal_shmem_base ) {
11901190 PyErr_Format (PyExc_RuntimeError,
11911191 " Cannot call before creating component" );
11921192 return NULL ;
@@ -1196,7 +1196,7 @@ PyObject *get_info_signals(PyObject *self, PyObject *args) {
11961196 rtapi_mutex_get (&(hal_data->mutex ));
11971197 next = hal_data->sig_list_ptr ;
11981198 while (next != 0 ) {
1199- sig = ( hal_sig_t *) SHMPTR (next);
1199+ sig = SHMPTR (next);
12001200 type = sig->type ;
12011201 d_ptr = SHMPTR (sig->data_ptr );
12021202
@@ -1259,7 +1259,7 @@ PyObject *get_info_signals(PyObject *self, PyObject *args) {
12591259/* ######################################*/
12601260/* Get a dict of parameter info for all parameters in system */
12611261PyObject *get_info_params (PyObject *self, PyObject *args) {
1262- int next;
1262+ SHMFIELD ( hal_param_t ) next;
12631263 int type;
12641264 char str_n[] = " NAME" ;
12651265 char str_v[] = " VALUE" ;
@@ -1269,7 +1269,7 @@ PyObject *get_info_params(PyObject *self, PyObject *args) {
12691269 PyObject* python_list = PyList_New (0 );
12701270 PyObject *obj;
12711271
1272- if (!SHMPTR ( 0 ) ) {
1272+ if (!hal_shmem_base ) {
12731273 PyErr_Format (PyExc_RuntimeError,
12741274 " Cannot call before creating component" );
12751275 return NULL ;
@@ -1279,7 +1279,7 @@ PyObject *get_info_params(PyObject *self, PyObject *args) {
12791279 rtapi_mutex_get (&(hal_data->mutex ));
12801280 next = hal_data->param_list_ptr ;
12811281 while (next != 0 ) {
1282- param = ( hal_param_t *) SHMPTR (next);
1282+ param = SHMPTR (next);
12831283 type = param->type ;
12841284 d_ptr = SHMPTR (param->data_ptr );
12851285
0 commit comments