| 15687 | #endif |
| 15688 | |
| 15689 | void * GMT_Get_Matrix (void *API, struct GMT_MATRIX *M) { |
| 15690 | /* Returns a pointer to the matrix. Users can consult |
| 15691 | * M->type to know what data type is pointed to. */ |
| 15692 | void *matrix = NULL; |
| 15693 | if (API == NULL) return_null (API, GMT_NOT_A_SESSION); |
| 15694 | if (M == NULL) return_null (API, GMT_PTR_IS_NULL); |
| 15695 | if ((matrix = gmtapi_retrieve_vector (API, &(M->data), M->type)) == NULL) |
| 15696 | return_null (API, GMT_NOT_A_VALID_TYPE); |
| 15697 | return matrix; |
| 15698 | } |
| 15699 | |
| 15700 | #ifdef FORTRAN_API |
| 15701 | void * GMT_Get_Matrix_ (struct GMT_MATRIX *M) { |