Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Passing pointers from C to PL/I z/OS Language Environment Writing Interlanguage Communication Applications SA38-0684-00 |
|
Pointers can be passed and returned between C and PL/I routines. Because the C #pragma linkage(PLI) specifies that pointers, unlike other parameters, are passed directly, there is one level of indirection less on the PL/I side. In order for PL/I to receive a pointer to a PL/I data type, C must pass a pointer to a pointer to the C data type. Conversely, if PL/I returns a pointer to a data type, C receives a pointer to a pointer to the data type. Structures, arrays, and strings should be passed between C and PL/I only by using pointers. The non-address bits in all fullword pointers declared in PL/I source code must always be zero. If they are not, results are unpredictable. |
Copyright IBM Corporation 1990, 2014
|