What kind of macros are permissable?

K

kleutervreter

Other than the fact that the macro below implies fixed size buffers, is
it unsafe to use?

#define MEMSET( __v__, __s__ ) memset( (__v__), 0x00, (__s__) )
 
N

Noah Roberts

kleutervreter said:
Other than the fact that the macro below implies fixed size buffers, is
it unsafe to use?

#define MEMSET( __v__, __s__ ) memset( (__v__), 0x00, (__s__) )

I imagine there could be problems with the underscores as anything that
starts with two underscores is reserved for implementation use.

Such a macro doesn't imply a fixed size...it just does a cut and paste
routine in the code basically.
 
V

Victor Bazarov

Noah said:
I imagine there could be problems with the underscores as anything
that starts with two underscores is reserved for implementation use.

Correction: any name that _contains_ two consecutive underscores is
reserved by the implemenation. IOW, "v__" would also be reserved.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top