[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


internal

Description:

Controls the availability of symbols outside a module.

Compatibility:

This pragma is compatible with the following platform targets:

68K

PowerPC

NEC V800
Intel x86
MIPS
Embedded 68K

Prototype:
  #pragma internal on | off | reset | list names Remarks:

This pragma applies to Mac OS CFM programming only.

This pragma lets you specify that certain variables and functions are internal and not imported. The compiler generates smaller and faster code when it calls an internal function, even if you declared it as extern.

If you want to declare all the functions and variables declared or define within a certain range as internal, use #pragma internal on at the beginning of the range and use #pragma internal off at the end of the range. If you want to declare all the functions and variables in a list as internal, use #pragma internal list. If you want to declare a single variable or function as internal, use __declspec(internal) at the beginning of the declaration.

For example, the code in Listing 8.7 uses #pragma internal on and off to declare the variable w and the functions a1() and b1() as internal.

Example of #pragma internal on:
#pragma internal on
int a1(int x, double y);
double b1(int z);
int w;
#pragma internal off

Listing 8.8 uses #pragma internal list to declare the symbols as internal.

Example of #pragma internal list:
int a1(int x, double y);
double b1(int z);
int w;
#pragma internal list a1, b1, w

Listing 8.9 uses __declspec(internal) to declare the symbols as internal.

Example of __declspec(internal):
__declspec(internal) int a1(int x, double y);
__declspec(internal) double b1(int z);
__declspec(internal) int w;

This pragma does not correspond to an option in any settings panel. To check whether this option is on, use __option (internal), described in "Checking Options."


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000