OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 10:01 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: what the sharp sign in macro mean?
PostPosted: Mon Sep 16, 2019 2:44 pm 
Offline
Member
Member

Joined: Wed Nov 18, 2015 3:04 pm
Posts: 396
Location: San Jose San Francisco Bay Area
I came accross following defs, what are the meaning of these two sharp sign toward the end of define macro statement?

where:
SW_DEFINE_HANDLE - macro name
object - parameters passed to macro
object##_T - ##???

#define SW_DEFINE_HANDLE(object) typedef struct object##_T* object;

Now I see usages like:

SW_DEFINE_HANDLE(Instance)
SW_DEFINE_HANDLE(lDevice)
SW_DEFINE_HANDLE(Queue)

Thanks.,

_________________
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails


Top
 Profile  
 
 Post subject: Re: what the sharp sign in macro mean?
PostPosted: Mon Sep 16, 2019 3:29 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5103
That's the token concatenation operator.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group