By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

What kind of macros are permissable?

P: n/a
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__) )

Apr 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

kleutervreter wrote:
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.

Apr 11 '06 #2

P: n/a
Noah Roberts wrote:
kleutervreter wrote:
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.


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

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.